{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coralogix/json-schema/coralogix-alert-def-to-replace-schema.json",
  "title": "Alert definition to replace",
  "description": "An alert definition along with its ID for replacement",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coralogix-alert-definitions-service-api-openapi.yml#/components/schemas/AlertDefToReplace",
  "type": "object",
  "properties": {
    "accessPolicy": {
      "allOf": [
        {
          "$ref": "#/$defs/AccessPolicyAction"
        }
      ],
      "description": "Change to the alert's access policy: upsert a raw policy, or delete (remove) the existing one. Optional; if omitted, the existing policy is left unchanged. Changing the access policy requires the alerts:UpdateAccessPolicy permission."
    },
    "alertDefProperties": {
      "allOf": [
        {
          "$ref": "#/$defs/AlertDefProperties"
        }
      ],
      "description": "The properties of the alert definition"
    },
    "id": {
      "description": "The alert definition ID",
      "maxLength": 36,
      "minLength": 1,
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      "type": "string",
      "x-coralogix-presence": true
    }
  },
  "$defs": {
    "AccessPolicyAction": {
      "title": "Access policy action",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "upsert"
          ],
          "type": "object"
        },
        {
          "required": [
            "delete"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "upsert"
                ],
                "type": "object"
              },
              {
                "required": [
                  "delete"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "delete": {
          "allOf": [
            {
              "$ref": "#/$defs/DeleteAccessPolicy"
            }
          ],
          "description": "Remove the alert's access policy entirely; a new policy and policy owner can be assigned afterward"
        },
        "upsert": {
          "maxLength": 65536,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "description": "Raw access policy JSON to set on the alert"
        }
      },
      "description": "A change to the alert's access policy: upsert a raw policy, or delete (remove) the existing policy. Changing the access policy requires the alerts:UpdateAccessPolicy permission."
    },
    "ActivitySchedule": {
      "title": "Alert activity schedule",
      "type": "object",
      "properties": {
        "dayOfWeek": {
          "maxItems": 7,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/DayOfWeek"
          },
          "description": "Day of the week."
        },
        "endTime": {
          "allOf": [
            {
              "$ref": "#/$defs/TimeOfDay"
            }
          ],
          "description": "End time of the alert activity"
        },
        "startTime": {
          "allOf": [
            {
              "$ref": "#/$defs/TimeOfDay"
            }
          ],
          "description": "Start time of the alert activity"
        }
      },
      "description": "Defines when an alert should be active based on days of the week and time windows"
    },
    "AlertDefCaseAutoResolveMode": {
      "enum": [
        "ALERT_DEF_CASE_AUTO_RESOLVE_MODE_UNSPECIFIED",
        "ALERT_DEF_CASE_AUTO_RESOLVE_MODE_ENABLED",
        "ALERT_DEF_CASE_AUTO_RESOLVE_MODE_DISABLED"
      ],
      "type": "string",
      "description": "Case auto resolve mode."
    },
    "AlertDefCaseDestination": {
      "title": "Alert definition case destination",
      "required": [
        "connectorId",
        "condition"
      ],
      "type": "object",
      "properties": {
        "condition": {
          "maxLength": 20000,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "description": "Notification Center routing condition, rendered to true or false against the case notification context to decide whether this destination is notified. Use \"true\" to notify on every case notification; otherwise filter on caseMetadata.notificationReason (for example caseActivated, caseResolved, casePriorityChanged, caseUnacknowledged). The expression syntax is documented with Notification Center routing conditions."
        },
        "connectorId": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$",
          "type": "string",
          "description": "ID of the Notification Center connector to notify. The connector must support the CASES entity type; list compatible connectors with GET /notifications/notification-center/v1/connectors?supported_by_entity_type=CASES."
        },
        "presetId": {
          "description": "Optional Notification Center preset ID used to render the notification. The preset must be defined for the CASES entity type and for the selected connector's type; list compatible presets with GET /notifications/notification-center/v1/presets:summariesList?entity_type=CASES&connector_type=<type>. When omitted, the connector type's default preset is used.",
          "maxLength": 128,
          "minLength": 0,
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$",
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "A Notification Center connector that receives notifications about cases opened by this alert."
    },
    "AlertDefCaseEnrichmentQuery": {
      "title": "Alert definition case enrichment query",
      "required": [
        "query"
      ],
      "type": "object",
      "properties": {
        "query": {
          "maxLength": 65535,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "description": "The enrichment query string"
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefCaseEnrichmentQueryType"
            }
          ],
          "description": "The query language of the enrichment query. Defaults to DataPrime when omitted."
        }
      },
      "description": "A query used to enrich the case created by the alert."
    },
    "AlertDefCaseEnrichmentQueryType": {
      "enum": [
        "ALERT_DEF_CASE_ENRICHMENT_QUERY_TYPE_UNSPECIFIED",
        "ALERT_DEF_CASE_ENRICHMENT_QUERY_TYPE_DATAPRIME"
      ],
      "type": "string",
      "description": "Enrichment query type."
    },
    "AlertDefCaseSettings": {
      "title": "Alert definition case settings",
      "type": "object",
      "properties": {
        "autoResolveMode": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefCaseAutoResolveMode"
            }
          ],
          "description": "Controls whether the associated case is automatically resolved when the alert resolves. Defaults to enabled when unspecified."
        },
        "destinations": {
          "maxItems": 100,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AlertDefCaseDestination"
          },
          "description": "Destinations notified about the cases opened by this alert. Independent of notificationGroup.destinations: both are delivered. Replace is a full overwrite: omitting destinations removes any previously configured case destinations."
        },
        "enrichmentQueries": {
          "maxItems": 1,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AlertDefCaseEnrichmentQuery"
          },
          "description": "Queries used to enrich the case created by this alert"
        }
      },
      "description": "Settings controlling how the alert interacts with cases."
    },
    "AlertDefDataSource": {
      "type": "object",
      "properties": {
        "dataSet": {
          "description": "File name of the dataset",
          "maxLength": 300,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "dataSpace": {
          "description": "Folder name of the datasource",
          "maxLength": 50,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        }
      }
    },
    "AlertDefIncidentSettings": {
      "title": "Alert definition incident settings",
      "type": "object",
      "properties": {
        "minutes": {
          "description": "The time in minutes before the alert can be retriggered",
          "format": "int64",
          "maximum": 10080,
          "minimum": 1,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "notifyOn": {
          "allOf": [
            {
              "$ref": "#/$defs/NotifyOn"
            }
          ],
          "description": "The condition to notify about the alert"
        }
      },
      "description": "Alert def incident settings."
    },
    "AlertDefNotificationGroup": {
      "title": "Alert definition notification group",
      "type": "object",
      "properties": {
        "destinations": {
          "maxItems": 100,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/NotificationDestination"
          },
          "description": "The destinations for notifications.  (Notification Center feature)"
        },
        "groupByKeys": {
          "maxItems": 100,
          "minItems": 0,
          "type": "array",
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "The keys to group the alerts by"
          },
          "description": "The keys to group the alerts by"
        },
        "router": {
          "allOf": [
            {
              "$ref": "#/$defs/NotificationRouter"
            }
          ],
          "description": "The router for notifications.  (Notification Center feature)"
        },
        "webhooks": {
          "maxItems": 100,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AlertDefWebhooksSettings"
          },
          "description": "The settings for webhooks associated with the alert definition"
        }
      },
      "description": "Alert def notification group."
    },
    "AlertDefOverride": {
      "title": "Alert definition priority update",
      "type": "object",
      "properties": {
        "priority": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefPriority"
            }
          ],
          "description": "The priority of the alert definition"
        }
      },
      "description": "Alert def override."
    },
    "AlertDefPriority": {
      "enum": [
        "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
        "ALERT_DEF_PRIORITY_P4",
        "ALERT_DEF_PRIORITY_P3",
        "ALERT_DEF_PRIORITY_P2",
        "ALERT_DEF_PRIORITY_P1"
      ],
      "type": "string",
      "description": "Alert def priority."
    },
    "AlertDefProperties": {
      "title": "Alert definition properties",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "logsImmediate"
          ],
          "type": "object"
        },
        {
          "required": [
            "tracingImmediate"
          ],
          "type": "object"
        },
        {
          "required": [
            "logsThreshold"
          ],
          "type": "object"
        },
        {
          "required": [
            "logsRatioThreshold"
          ],
          "type": "object"
        },
        {
          "required": [
            "logsTimeRelativeThreshold"
          ],
          "type": "object"
        },
        {
          "required": [
            "metricThreshold"
          ],
          "type": "object"
        },
        {
          "required": [
            "tracingThreshold"
          ],
          "type": "object"
        },
        {
          "required": [
            "flow"
          ],
          "type": "object"
        },
        {
          "required": [
            "logsAnomaly"
          ],
          "type": "object"
        },
        {
          "required": [
            "metricAnomaly"
          ],
          "type": "object"
        },
        {
          "required": [
            "logsNewValue"
          ],
          "type": "object"
        },
        {
          "required": [
            "logsUniqueCount"
          ],
          "type": "object"
        },
        {
          "required": [
            "sloThreshold"
          ],
          "type": "object"
        },
        {
          "required": [
            "analyticsImmediate"
          ],
          "type": "object"
        },
        {
          "required": [
            "analyticsThreshold"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "logsImmediate"
                ],
                "type": "object"
              },
              {
                "required": [
                  "tracingImmediate"
                ],
                "type": "object"
              },
              {
                "required": [
                  "logsThreshold"
                ],
                "type": "object"
              },
              {
                "required": [
                  "logsRatioThreshold"
                ],
                "type": "object"
              },
              {
                "required": [
                  "logsTimeRelativeThreshold"
                ],
                "type": "object"
              },
              {
                "required": [
                  "metricThreshold"
                ],
                "type": "object"
              },
              {
                "required": [
                  "tracingThreshold"
                ],
                "type": "object"
              },
              {
                "required": [
                  "flow"
                ],
                "type": "object"
              },
              {
                "required": [
                  "logsAnomaly"
                ],
                "type": "object"
              },
              {
                "required": [
                  "metricAnomaly"
                ],
                "type": "object"
              },
              {
                "required": [
                  "logsNewValue"
                ],
                "type": "object"
              },
              {
                "required": [
                  "logsUniqueCount"
                ],
                "type": "object"
              },
              {
                "required": [
                  "sloThreshold"
                ],
                "type": "object"
              },
              {
                "required": [
                  "analyticsImmediate"
                ],
                "type": "object"
              },
              {
                "required": [
                  "analyticsThreshold"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "activeOn": {
          "allOf": [
            {
              "$ref": "#/$defs/ActivitySchedule"
            }
          ],
          "description": "The schedule defining when the alert should be active"
        },
        "analyticsImmediate": {
          "allOf": [
            {
              "$ref": "#/$defs/AnalyticsImmediateType"
            }
          ],
          "description": "Configuration for analytics immediate alerts",
          "x-stability": "preview"
        },
        "analyticsThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/AnalyticsThresholdType"
            }
          ],
          "description": "Configuration for analytics threshold alerts",
          "x-stability": "preview"
        },
        "caseSettings": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefCaseSettings"
            }
          ],
          "description": "Settings controlling how the alert interacts with cases. When omitted on create, defaults apply (case auto-resolve enabled, no enrichment queries, no case destinations). Replace is a full overwrite: omitting this field on replace resets any previously configured case settings to those defaults. In read responses, this field is absent when no case settings were configured, meaning those same defaults are in effect.",
          "x-stability": "preview"
        },
        "dataSources": {
          "maxItems": 1,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AlertDefDataSource"
          },
          "description": "The sources from which to sample logs"
        },
        "deleted": {
          "default": false,
          "description": "Whether the alert has been marked as deleted",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "description": {
          "description": "A detailed description of what the alert monitors and when it triggers",
          "maxLength": 3000,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "enabled": {
          "default": true,
          "description": "Whether the alert is currently active and monitoring",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "entityLabels": {
          "type": "object",
          "additionalProperties": {
            "minLength": 0,
            "type": "string"
          },
          "description": "Labels used to identify and categorize the alert entity"
        },
        "flow": {
          "allOf": [
            {
              "$ref": "#/$defs/FlowType"
            }
          ],
          "description": "Configuration for flow-based alerts"
        },
        "groupByKeys": {
          "maxItems": 100,
          "minItems": 0,
          "type": "array",
          "items": {
            "maxLength": 1024,
            "minLength": 1,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "Keys used to group and aggregate alert data"
          },
          "description": "Keys used to group and aggregate alert data"
        },
        "incidentsSettings": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefIncidentSettings"
            }
          ],
          "description": "Incident creation and management settings"
        },
        "logsAnomaly": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsAnomalyType"
            }
          ],
          "description": "Configuration for log-based anomaly detection alerts"
        },
        "logsImmediate": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsImmediateType"
            }
          ],
          "description": "Configuration for immediate log-based alerts"
        },
        "logsNewValue": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsNewValueType"
            }
          ],
          "description": "Configuration for alerts triggered by new log values"
        },
        "logsRatioThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsRatioThresholdType"
            }
          ],
          "description": "Configuration for log-based ratio threshold alerts"
        },
        "logsThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsThresholdType"
            }
          ],
          "description": "Configuration for log-based threshold alerts"
        },
        "logsTimeRelativeThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeRelativeThresholdType"
            }
          ],
          "description": "Configuration for time-relative log threshold alerts"
        },
        "logsUniqueCount": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsUniqueCountType"
            }
          ],
          "description": "Configuration for alerts based on unique log value counts"
        },
        "metricAnomaly": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricAnomalyType"
            }
          ],
          "description": "Configuration for metric-based anomaly detection alerts"
        },
        "metricThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricThresholdType"
            }
          ],
          "description": "Configuration for metric-based threshold alerts"
        },
        "name": {
          "description": "The name of the alert definition",
          "maxLength": 512,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "notificationGroup": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefNotificationGroup"
            }
          ],
          "description": "Primary notification group for alert events"
        },
        "notificationGroupExcess": {
          "maxItems": 100,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AlertDefNotificationGroup"
          },
          "description": "Additional notification groups for alerts (deprecated)",
          "deprecated": true
        },
        "phantomMode": {
          "default": false,
          "description": "Whether the alert is in phantom mode (creating incidents or not)",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "priority": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefPriority"
            }
          ],
          "description": "The priority level of the alert"
        },
        "sloThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/SloThresholdType"
            }
          ],
          "description": "Configuration for SLO-based alerts"
        },
        "tracingImmediate": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingImmediateType"
            }
          ],
          "description": "Configuration for immediate tracing-based alerts"
        },
        "tracingThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingThresholdType"
            }
          ],
          "description": "Configuration for tracing-based threshold alerts"
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefType"
            }
          ],
          "description": "Alert type"
        }
      },
      "description": "User-configurable properties of an alert definition"
    },
    "AlertDefType": {
      "enum": [
        "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED",
        "ALERT_DEF_TYPE_LOGS_THRESHOLD",
        "ALERT_DEF_TYPE_LOGS_ANOMALY",
        "ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD",
        "ALERT_DEF_TYPE_LOGS_NEW_VALUE",
        "ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT",
        "ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD",
        "ALERT_DEF_TYPE_METRIC_THRESHOLD",
        "ALERT_DEF_TYPE_METRIC_ANOMALY",
        "ALERT_DEF_TYPE_TRACING_IMMEDIATE",
        "ALERT_DEF_TYPE_TRACING_THRESHOLD",
        "ALERT_DEF_TYPE_FLOW",
        "ALERT_DEF_TYPE_SLO_THRESHOLD",
        "ALERT_DEF_TYPE_ANALYTICS_IMMEDIATE",
        "ALERT_DEF_TYPE_ANALYTICS_THRESHOLD"
      ],
      "type": "string",
      "description": "Alert def type.\n- ALERT_DEF_TYPE_ANALYTICS_IMMEDIATE: preview\n- ALERT_DEF_TYPE_ANALYTICS_THRESHOLD: preview"
    },
    "AlertDefWebhooksSettings": {
      "title": "Alert definition webhook settings",
      "type": "object",
      "properties": {
        "integration": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.IntegrationType"
            }
          ],
          "description": "The integration type for webhook notifications"
        },
        "minutes": {
          "description": "The time in minutes before the alert can be retriggered",
          "format": "int64",
          "maximum": 10080,
          "minimum": 1,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "notifyOn": {
          "allOf": [
            {
              "$ref": "#/$defs/NotifyOn"
            }
          ],
          "description": "The condition under which the alert should be notified",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for webhook notifications for an alert"
    },
    "AlertsOp": {
      "enum": [
        "ALERTS_OP_AND_OR_UNSPECIFIED",
        "ALERTS_OP_OR"
      ],
      "type": "string",
      "description": "Alerts op."
    },
    "AnalyticsImmediateType": {
      "title": "Analytics immediate alert type",
      "type": "object",
      "properties": {
        "dataprimeQuery": {
          "allOf": [
            {
              "$ref": "#/$defs/DataprimeAlertQuery"
            }
          ],
          "description": "The DataPrime query to evaluate"
        },
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "noDataPolicy": {
          "allOf": [
            {
              "$ref": "#/$defs/NoDataPolicy"
            }
          ],
          "description": "Configuration for how to treat and what state to give to an alert with no data"
        },
        "timeframeMinutes": {
          "description": "The evaluation window duration in minutes",
          "format": "int32",
          "maximum": 2147483647,
          "minimum": 1,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "useRowsAsPermutations": {
          "description": "Whether each result row is treated as a separate permutation. Defaults to false for immediate alerts to avoid high-cardinality alerts by mistake.",
          "type": "boolean",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for analytics alerts that fire immediately when a DataPrime query returns a result"
    },
    "AnalyticsThresholdOperator": {
      "enum": [
        "ANALYTICS_THRESHOLD_OPERATOR_MORE_THAN_OR_UNSPECIFIED",
        "ANALYTICS_THRESHOLD_OPERATOR_LESS_THAN",
        "ANALYTICS_THRESHOLD_OPERATOR_MORE_THAN_OR_EQUALS",
        "ANALYTICS_THRESHOLD_OPERATOR_LESS_THAN_OR_EQUALS",
        "ANALYTICS_THRESHOLD_OPERATOR_EQUALS",
        "ANALYTICS_THRESHOLD_OPERATOR_NOT_EQUALS"
      ],
      "type": "string",
      "description": "The comparison operator applied to analytics threshold rules."
    },
    "AnalyticsThresholdRule": {
      "title": "Analytics threshold rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/AnalyticsThresholdRuleCondition"
            }
          ],
          "description": "The condition for the threshold rule"
        },
        "override": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefOverride"
            }
          ],
          "description": "The override settings for the alert"
        }
      },
      "description": "A rule that defines a threshold condition and its priority override"
    },
    "AnalyticsThresholdRuleCondition": {
      "title": "Analytics threshold rule condition",
      "type": "object",
      "properties": {
        "threshold": {
          "description": "The threshold value to compare against",
          "format": "double",
          "type": "number",
          "x-coralogix-presence": true
        }
      },
      "description": "Defines the threshold value to compare against"
    },
    "AnalyticsThresholdType": {
      "title": "Analytics threshold alert type",
      "type": "object",
      "properties": {
        "dataprimeQuery": {
          "allOf": [
            {
              "$ref": "#/$defs/DataprimeAlertQuery"
            }
          ],
          "description": "The DataPrime query to evaluate"
        },
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "noDataPolicy": {
          "allOf": [
            {
              "$ref": "#/$defs/NoDataPolicy"
            }
          ],
          "description": "Configuration for how to treat and what state to give to an alert with no data"
        },
        "operator": {
          "allOf": [
            {
              "$ref": "#/$defs/AnalyticsThresholdOperator"
            }
          ],
          "description": "The comparison operator applied to all threshold rules"
        },
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnalyticsThresholdRule"
          },
          "description": "The per-priority threshold rules"
        },
        "targetColumn": {
          "description": "The name of the numeric result column to compare",
          "maxLength": 255,
          "minLength": 0,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "timeframeMinutes": {
          "description": "The evaluation window duration in minutes",
          "format": "int32",
          "maximum": 2147483647,
          "minimum": 1,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "useRowsAsPermutations": {
          "description": "Whether each result row is treated as a separate permutation. Defaults to true for threshold alerts as permutation count is easier to estimate.",
          "type": "boolean",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for alerts that fire when a numeric column in a DataPrime query result violates a threshold"
    },
    "AnomalyAlertSettings": {
      "title": "Anomaly alert settings",
      "type": "object",
      "properties": {
        "percentageOfDeviation": {
          "description": "The percentage of deviation from the baseline for triggering the alert.",
          "format": "float",
          "minimum": 0,
          "type": "number",
          "x-coralogix-presence": true
        }
      },
      "description": "Common settings for anomaly-based alerts."
    },
    "BurnRateThreshold": {
      "title": "Burn Rate Threshold",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "dual"
          ],
          "type": "object"
        },
        {
          "required": [
            "single"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "dual"
                ],
                "type": "object"
              },
              {
                "required": [
                  "single"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "dual": {
          "allOf": [
            {
              "$ref": "#/$defs/BurnRateTypeDual"
            }
          ],
          "description": "Burn rate type dual"
        },
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/SloThresholdRule"
          },
          "description": "The rules for the burn rate threshold"
        },
        "single": {
          "allOf": [
            {
              "$ref": "#/$defs/BurnRateTypeSingle"
            }
          ],
          "description": "Burn rate type single"
        }
      },
      "description": "Burn rate threshold definition"
    },
    "BurnRateTypeDual": {
      "title": "Burn Rate Type Dual",
      "type": "object",
      "properties": {
        "timeDuration": {
          "$ref": "#/$defs/TimeDuration"
        }
      },
      "description": "Burn rate type dual definition"
    },
    "BurnRateTypeSingle": {
      "title": "Burn Rate Type Single",
      "type": "object",
      "properties": {
        "timeDuration": {
          "$ref": "#/$defs/TimeDuration"
        }
      },
      "description": "Burn rate type single definition"
    },
    "DataprimeAlertQuery": {
      "title": "DataPrime alert query",
      "type": "object",
      "properties": {
        "query": {
          "description": "The DataPrime query string",
          "maxLength": 65535,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "A DataPrime query"
    },
    "DayOfWeek": {
      "enum": [
        "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
        "DAY_OF_WEEK_TUESDAY",
        "DAY_OF_WEEK_WEDNESDAY",
        "DAY_OF_WEEK_THURSDAY",
        "DAY_OF_WEEK_FRIDAY",
        "DAY_OF_WEEK_SATURDAY",
        "DAY_OF_WEEK_SUNDAY"
      ],
      "type": "string"
    },
    "DeleteAccessPolicy": {
      "title": "Delete access policy",
      "type": "object",
      "additionalProperties": false,
      "description": "Marker to remove the alert's access policy entirely; carries no fields. Removal does not assign any replacement — a new access policy and policy owner can be assigned afterward."
    },
    "DurationUnit": {
      "enum": [
        "DURATION_UNIT_UNSPECIFIED",
        "DURATION_UNIT_HOURS"
      ],
      "type": "string",
      "description": "Duration unit."
    },
    "ErrorBudgetThreshold": {
      "title": "Error Budget Threshold",
      "type": "object",
      "properties": {
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/SloThresholdRule"
          },
          "description": "The rules for the error budget threshold"
        }
      },
      "description": "Error budget threshold definition"
    },
    "FlowStages": {
      "title": "Flow stages",
      "type": "object",
      "properties": {
        "flowStagesGroups": {
          "allOf": [
            {
              "$ref": "#/$defs/FlowStagesGroups"
            }
          ],
          "description": "The flow stages groups."
        },
        "timeframeMs": {
          "description": "The timeframe ms.",
          "maxLength": 20,
          "minLength": 1,
          "pattern": "^-?[0-9]+$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "timeframeType": {
          "allOf": [
            {
              "$ref": "#/$defs/TimeframeType"
            }
          ],
          "description": "The type of timeframe for the flow alert."
        }
      },
      "description": "Defines stages in a flow alert"
    },
    "FlowStagesGroup": {
      "title": "Flow stage group",
      "type": "object",
      "properties": {
        "alertDefs": {
          "maxItems": 30,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/FlowStagesGroupsAlertDefs"
          },
          "description": "The alert definitions for the flow stage group."
        },
        "alertsOp": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertsOp"
            }
          ],
          "description": "The logical operation to apply to the alerts in the group."
        },
        "nextOp": {
          "allOf": [
            {
              "$ref": "#/$defs/NextOp"
            }
          ],
          "description": "The logical operation to apply to the next stage."
        }
      },
      "description": "Defines a group of stages in a flow alert"
    },
    "FlowStagesGroups": {
      "title": "Flow stage groups",
      "type": "object",
      "properties": {
        "groups": {
          "maxItems": 30,
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/FlowStagesGroup"
          },
          "description": "List of groups."
        }
      },
      "description": "Groups of stages in a flow alert"
    },
    "FlowStagesGroupsAlertDefs": {
      "title": "Flow stage group alert definitions",
      "type": "object",
      "properties": {
        "id": {
          "description": "The alert definition ID",
          "maxLength": 36,
          "minLength": 1,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "not": {
          "description": "Whether to negate the alert definition or not.",
          "type": "boolean",
          "x-coralogix-presence": true
        }
      },
      "description": "Alert definitions for a flow stage group"
    },
    "FlowType": {
      "title": "Flow alert type",
      "type": "object",
      "properties": {
        "enforceSuppression": {
          "description": "The enforce suppression.",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "stages": {
          "maxItems": 30,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/FlowStages"
          },
          "description": "The stages of the flow alert."
        }
      },
      "description": "Configuration for flow-based alerts with multiple stages"
    },
    "LabelFilterType": {
      "title": "Label filter type",
      "type": "object",
      "properties": {
        "operation": {
          "allOf": [
            {
              "$ref": "#/$defs/LogFilterOperationType"
            }
          ],
          "description": "The operation to perform on the label value"
        },
        "value": {
          "description": "The value of the label to filter by",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Label filter type for log entries"
    },
    "LabelFilters": {
      "title": "Label filters",
      "type": "object",
      "properties": {
        "applicationName": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LabelFilterType"
          },
          "description": "The application name."
        },
        "severities": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogSeverity"
          },
          "description": "The severities."
        },
        "subsystemName": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LabelFilterType"
          },
          "description": "The subsystem name."
        }
      },
      "description": "Filters for application name, subsystem name, and log severities"
    },
    "LogFilterOperationType": {
      "enum": [
        "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
        "LOG_FILTER_OPERATION_TYPE_INCLUDES",
        "LOG_FILTER_OPERATION_TYPE_ENDS_WITH",
        "LOG_FILTER_OPERATION_TYPE_STARTS_WITH"
      ],
      "type": "string",
      "description": "Log filter operation type."
    },
    "LogSeverity": {
      "enum": [
        "LOG_SEVERITY_VERBOSE_UNSPECIFIED",
        "LOG_SEVERITY_DEBUG",
        "LOG_SEVERITY_INFO",
        "LOG_SEVERITY_WARNING",
        "LOG_SEVERITY_ERROR",
        "LOG_SEVERITY_CRITICAL"
      ],
      "type": "string"
    },
    "LogsAnomalyCondition": {
      "title": "Log-based anomaly condition",
      "type": "object",
      "properties": {
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsAnomalyConditionType"
            }
          ],
          "description": "The type of condition for the alert"
        },
        "minimumThreshold": {
          "description": "The threshold value for the alert condition",
          "format": "double",
          "type": "number",
          "x-coralogix-presence": true
        },
        "timeWindow": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeWindow"
            }
          ],
          "description": "The time window for the alert condition"
        }
      },
      "description": "Defines conditions for detecting log anomalies"
    },
    "LogsAnomalyConditionType": {
      "enum": [
        "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
      ],
      "type": "string",
      "description": "Logs anomaly condition type."
    },
    "LogsAnomalyRule": {
      "title": "Log-based anomaly rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsAnomalyCondition"
            }
          ],
          "description": "The condition for the threshold alert"
        }
      },
      "description": "Defines a rule for detecting log anomalies"
    },
    "LogsAnomalyType": {
      "title": "Log-based anomaly alert type",
      "type": "object",
      "properties": {
        "anomalyAlertSettings": {
          "allOf": [
            {
              "$ref": "#/$defs/AnomalyAlertSettings"
            }
          ],
          "description": "Anomaly alert settings configuration"
        },
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "logsFilter": {
          "$ref": "#/$defs/v3.LogsFilter"
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The filter to specify which fields to include in the notification payload"
          },
          "description": "The filter to specify which fields to include in the notification payload"
        },
        "rules": {
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogsAnomalyRule"
          },
          "description": "The rules for the log anomaly alert"
        }
      },
      "description": "Configuration for alerts triggered by anomalous log patterns"
    },
    "LogsImmediateType": {
      "title": "Logs immediate alert type",
      "type": "object",
      "properties": {
        "logsFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for immediate alerts."
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The notification payload filter."
          },
          "description": "The notification payload filter."
        }
      },
      "description": "Configuration for immediate alerts triggered on log entries matching specific filters."
    },
    "LogsNewValueCondition": {
      "title": "Log-based new value condition",
      "type": "object",
      "properties": {
        "keypathToTrack": {
          "description": "The keypath to track for new values",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "timeWindow": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsNewValueTimeWindow"
            }
          ],
          "description": "The time window for detecting new values"
        }
      },
      "description": "Defines conditions for detecting new values in logs"
    },
    "LogsNewValueRule": {
      "title": "Log-based new value rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsNewValueCondition"
            }
          ],
          "description": "The condition for detecting new values in logs."
        }
      },
      "description": "Defines the condition for detecting new values in logs"
    },
    "LogsNewValueTimeWindow": {
      "title": "Log-based new value alert time window",
      "type": "object",
      "properties": {
        "logsNewValueTimeWindowSpecificValue": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsNewValueTimeWindowValue"
            }
          ],
          "description": "A time window defined by a specific value"
        }
      },
      "description": "Time window configuration for log-based new value alerts"
    },
    "LogsNewValueTimeWindowValue": {
      "enum": [
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2",
        "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3"
      ],
      "type": "string",
      "description": "Logs new value time window value."
    },
    "LogsNewValueType": {
      "title": "Log-based new value alert type",
      "type": "object",
      "properties": {
        "logsFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for the alert."
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The filter to specify which fields to include in the notification payload."
          },
          "description": "The filter to specify which fields to include in the notification payload."
        },
        "rules": {
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogsNewValueRule"
          },
          "description": "The rules for the log new value alert."
        }
      },
      "description": "Configuration for alerts triggered by new values appearing in logs"
    },
    "LogsRatioCondition": {
      "title": "Log-based ratio condition",
      "type": "object",
      "properties": {
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsRatioConditionType"
            }
          ],
          "description": "The type of condition for the alert"
        },
        "threshold": {
          "description": "The threshold value for the alert condition",
          "format": "double",
          "minimum": 0,
          "type": "number",
          "x-coralogix-presence": true
        },
        "timeWindow": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsRatioTimeWindow"
            }
          ],
          "description": "The time window for the alert condition"
        }
      },
      "description": "Defines conditions for ratio-based alerts"
    },
    "LogsRatioConditionType": {
      "enum": [
        "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
        "LOGS_RATIO_CONDITION_TYPE_LESS_THAN"
      ],
      "type": "string",
      "description": "Logs ratio condition type."
    },
    "LogsRatioGroupByFor": {
      "enum": [
        "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
        "LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY",
        "LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY"
      ],
      "type": "string",
      "description": "Logs ratio group by for."
    },
    "LogsRatioRules": {
      "title": "Log-based ratio rules",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsRatioCondition"
            }
          ],
          "description": "The condition for the ratio alert"
        },
        "override": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefOverride"
            }
          ],
          "description": "The override settings for the alert"
        }
      },
      "description": "Defines the rules for log-based ratio alerts"
    },
    "LogsRatioThresholdType": {
      "title": "Log-based ratio threshold alert type",
      "type": "object",
      "properties": {
        "denominator": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for the denominator of the ratio"
        },
        "denominatorAlias": {
          "description": "The alias for the denominator filter, used for display purposes",
          "maxLength": 200,
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "groupByFor": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsRatioGroupByFor"
            }
          ],
          "description": "The group by settings for the numerator and denominator filters"
        },
        "ignoreInfinity": {
          "description": "The configuration for ignoring infinity values in the ratio",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The notification payload filter."
          },
          "description": "The notification payload filter."
        },
        "numerator": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for the numerator of the ratio"
        },
        "numeratorAlias": {
          "description": "The alias for the numerator filter, used for display purposes",
          "maxLength": 200,
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogsRatioRules"
          },
          "description": "The rules for the ratio alert"
        },
        "undetectedValuesManagement": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.UndetectedValuesManagement"
            }
          ],
          "description": "Configuration for handling the undetected values in the alert"
        }
      },
      "description": "Configuration for alerts based on the ratio between two log queries"
    },
    "LogsRatioTimeWindow": {
      "title": "Logs ratio time window",
      "type": "object",
      "properties": {
        "logsRatioTimeWindowSpecificValue": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsRatioTimeWindowValue"
            }
          ],
          "description": "Specifies the time window for the ratio alert"
        }
      },
      "description": "Time window configuration for ratio alerts"
    },
    "LogsRatioTimeWindowValue": {
      "enum": [
        "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED",
        "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10",
        "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15",
        "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24",
        "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36"
      ],
      "type": "string",
      "description": "Logs ratio time window value."
    },
    "LogsSimpleFilter": {
      "title": "Simple log filter",
      "type": "object",
      "properties": {
        "labelFilters": {
          "$ref": "#/$defs/LabelFilters"
        },
        "luceneQuery": {
          "description": "The lucene query.",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Basic filter configuration using a Lucene query and label filters"
    },
    "LogsThresholdCondition": {
      "title": "Logs Threshold Condition",
      "type": "object",
      "properties": {
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsThresholdConditionType"
            }
          ],
          "description": "The type of condition for the alert"
        },
        "threshold": {
          "description": "The threshold value for the alert condition",
          "format": "double",
          "minimum": 0,
          "type": "number",
          "x-coralogix-presence": true
        },
        "timeWindow": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeWindow"
            }
          ],
          "description": "The time window for the alert condition"
        }
      },
      "description": "LogsThresholdCondition is a message that defines the condition for log-based threshold alerts."
    },
    "LogsThresholdConditionType": {
      "enum": [
        "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
        "LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN",
        "LOGS_THRESHOLD_CONDITION_TYPE_EQUALS",
        "LOGS_THRESHOLD_CONDITION_TYPE_NOT_EQUALS"
      ],
      "type": "string",
      "description": "Logs threshold condition type."
    },
    "LogsThresholdRule": {
      "title": "Logs Threshold Rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsThresholdCondition"
            }
          ],
          "description": "The condition for the threshold alert"
        },
        "override": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefOverride"
            }
          ],
          "description": "The override settings for the alert"
        }
      },
      "description": "LogsThresholdRule is a message that defines a rule for log-based threshold alerts."
    },
    "LogsThresholdType": {
      "title": "Log-based threshold alert type",
      "type": "object",
      "properties": {
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "logsFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for threshold alerts"
        },
        "noDataPolicy": {
          "allOf": [
            {
              "$ref": "#/$defs/NoDataPolicy"
            }
          ],
          "description": "User configuration to decide how to treat and what state to give to an alert with no data."
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The filter to specify which fields to include in the notification payload"
          },
          "description": "The filter to specify which fields to include in the notification payload"
        },
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogsThresholdRule"
          },
          "description": "The rules for the threshold alert"
        },
        "undetectedValuesManagement": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.UndetectedValuesManagement"
            }
          ],
          "description": "Configuration for handling the undetected values in the alert"
        }
      },
      "description": "Configuration for alerts triggered when log counts exceed or fall below specified thresholds"
    },
    "LogsTimeRelativeComparedTo": {
      "enum": [
        "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED",
        "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY",
        "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK",
        "LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY",
        "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK",
        "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH"
      ],
      "type": "string",
      "description": "Logs time relative compared to."
    },
    "LogsTimeRelativeCondition": {
      "title": "Log-based time-relative condition",
      "type": "object",
      "properties": {
        "comparedTo": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeRelativeComparedTo"
            }
          ],
          "description": "The time frame to compare the current value against"
        },
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeRelativeConditionType"
            }
          ],
          "description": "The type of condition for the alert"
        },
        "threshold": {
          "description": "The threshold value for the alert condition.",
          "format": "double",
          "minimum": 0,
          "type": "number",
          "x-coralogix-presence": true
        }
      },
      "description": "Defines conditions for time-relative comparison alerts"
    },
    "LogsTimeRelativeConditionType": {
      "enum": [
        "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
        "LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN"
      ],
      "type": "string",
      "description": "Logs time relative condition type."
    },
    "LogsTimeRelativeRule": {
      "title": "Logs Time Relative Rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeRelativeCondition"
            }
          ],
          "description": "The condition for the time-relative alert."
        },
        "override": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefOverride"
            }
          ],
          "description": "The override settings for the alert."
        }
      },
      "description": "LogsTimeRelativeRule is a message that defines a rule for log-based time-relative alerts"
    },
    "LogsTimeRelativeThresholdType": {
      "title": "Log-based time-relative threshold alert type",
      "type": "object",
      "properties": {
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "ignoreInfinity": {
          "description": "Ignore infinity values in the alert",
          "type": "boolean",
          "x-coralogix-presence": true
        },
        "logsFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for the alert."
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The notification payload filter."
          },
          "description": "The notification payload filter."
        },
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogsTimeRelativeRule"
          },
          "description": "The rules for the time-relative alert"
        },
        "undetectedValuesManagement": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.UndetectedValuesManagement"
            }
          ],
          "description": "Configuration for handling the undetected values in the alert."
        }
      },
      "description": "Configuration for alerts that are triggered when a fixed ratio reaches a set threshold compared to a past time frame."
    },
    "LogsTimeWindow": {
      "title": "Log-based alert time window",
      "type": "object",
      "properties": {
        "logsTimeWindowSpecificValue": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsTimeWindowValue"
            }
          ],
          "description": "A time window defined by a specific value"
        }
      },
      "description": "Time window configuration for log-based alerts"
    },
    "LogsTimeWindowValue": {
      "enum": [
        "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED",
        "LOGS_TIME_WINDOW_VALUE_MINUTES_10",
        "LOGS_TIME_WINDOW_VALUE_MINUTES_20",
        "LOGS_TIME_WINDOW_VALUE_MINUTES_15",
        "LOGS_TIME_WINDOW_VALUE_MINUTES_30",
        "LOGS_TIME_WINDOW_VALUE_HOUR_1",
        "LOGS_TIME_WINDOW_VALUE_HOURS_2",
        "LOGS_TIME_WINDOW_VALUE_HOURS_4",
        "LOGS_TIME_WINDOW_VALUE_HOURS_6",
        "LOGS_TIME_WINDOW_VALUE_HOURS_12",
        "LOGS_TIME_WINDOW_VALUE_HOURS_24",
        "LOGS_TIME_WINDOW_VALUE_HOURS_36"
      ],
      "type": "string",
      "description": "Logs time window value."
    },
    "LogsUniqueCountCondition": {
      "title": "Logs unique count condition",
      "type": "object",
      "properties": {
        "maxUniqueCount": {
          "description": "The maximum unique count",
          "maxLength": 20,
          "minLength": 1,
          "pattern": "^-?[0-9]+$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "timeWindow": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsUniqueValueTimeWindow"
            }
          ],
          "description": "The time window for the unique count alert."
        }
      },
      "description": "Defines conditions for unique count alerts"
    },
    "LogsUniqueCountRule": {
      "title": "Log-based unique count rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsUniqueCountCondition"
            }
          ],
          "description": "The condition for detecting unique counts in logs."
        }
      },
      "description": "Defines the rule for detecting unique counts in logs"
    },
    "LogsUniqueCountType": {
      "title": "Log-based unique count alert type",
      "type": "object",
      "properties": {
        "logsFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.LogsFilter"
            }
          ],
          "description": "The filter to match log entries for the alert."
        },
        "maxUniqueCountPerGroupByKey": {
          "description": "The maximum unique count per group by key",
          "maxLength": 20,
          "minLength": 1,
          "pattern": "^-?[0-9]+$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The filter to specify which fields to include in the notification payload"
          },
          "description": "The filter to specify which fields to include in the notification payload"
        },
        "rules": {
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogsUniqueCountRule"
          },
          "description": "The rules for the log unique count alert"
        },
        "uniqueCountKeypath": {
          "description": "The keypath in the logs to be used for unique count",
          "minLength": 1,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for alerts based on unique value counts in logs"
    },
    "LogsUniqueValueTimeWindow": {
      "title": "Log-based unique value alert time window",
      "type": "object",
      "properties": {
        "logsUniqueValueTimeWindowSpecificValue": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsUniqueValueTimeWindowValue"
            }
          ],
          "description": "A time window defined by a specific value"
        }
      },
      "description": "Time window configuration for log-based unique value alerts"
    },
    "LogsUniqueValueTimeWindowValue": {
      "enum": [
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24",
        "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36"
      ],
      "type": "string",
      "description": "Logs unique value time window value."
    },
    "MetricAnomalyCondition": {
      "title": "Metric-based anomaly condition",
      "type": "object",
      "properties": {
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricAnomalyConditionType"
            }
          ],
          "description": "The type of condition for the alert."
        },
        "forOverPct": {
          "description": "The percentage of the metric that must exceed the threshold to trigger the alert",
          "format": "int64",
          "maximum": 100,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "minNonNullValuesPct": {
          "description": "The percentage of non-null values required to trigger the alert",
          "format": "int64",
          "maximum": 100,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "ofTheLast": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricTimeWindow"
            }
          ],
          "description": "The time window for the alert condition."
        },
        "threshold": {
          "description": "The threshold value for the alert condition",
          "format": "double",
          "type": "number",
          "x-coralogix-presence": true
        }
      },
      "description": "Metric anomaly condition."
    },
    "MetricAnomalyConditionType": {
      "enum": [
        "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED",
        "METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL"
      ],
      "type": "string",
      "description": "Metric anomaly condition type."
    },
    "MetricAnomalyRule": {
      "title": "Metric-based anomaly rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricAnomalyCondition"
            }
          ],
          "description": "The condition for the metric anomaly alert."
        }
      },
      "description": "A rule for metric-based anomaly detection alerts"
    },
    "MetricAnomalyType": {
      "title": "Metric-based anomaly alert type",
      "type": "object",
      "properties": {
        "anomalyAlertSettings": {
          "allOf": [
            {
              "$ref": "#/$defs/AnomalyAlertSettings"
            }
          ],
          "description": "Configuration for anomaly alert settings."
        },
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "metricFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricFilter"
            }
          ],
          "description": "The filter to match metric entries for the alert."
        },
        "rules": {
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/MetricAnomalyRule"
          },
          "description": "The rules for the metric anomaly alert."
        }
      },
      "description": "Configuration for alerts triggered by anomalous metric patterns"
    },
    "MetricFilter": {
      "title": "Metric filter configuration in alerts",
      "type": "object",
      "properties": {
        "promql": {
          "description": "A PromQL filter for metrics",
          "maxLength": 65535,
          "minLength": 1,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Metric filter."
    },
    "MetricMissingValues": {
      "title": "Metric Missing Values Configuration",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "replaceWithZero"
          ],
          "type": "object"
        },
        {
          "required": [
            "minNonNullValuesPct"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "replaceWithZero"
                ],
                "type": "object"
              },
              {
                "required": [
                  "minNonNullValuesPct"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "minNonNullValuesPct": {
          "description": "If set, specifies the minimum percentage of non-null values required for the alert to be triggered",
          "format": "int64",
          "maximum": 100,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "replaceWithZero": {
          "description": "If set to true, missing values will be replaced with zero",
          "type": "boolean",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for handling missing values in metric threshold alerts."
    },
    "MetricThresholdCondition": {
      "title": "Metric Threshold Condition",
      "type": "object",
      "properties": {
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricThresholdConditionType"
            }
          ],
          "description": "The type of the alert condition"
        },
        "forOverPct": {
          "description": "The percentage of values that must exceed the threshold to trigger the alert",
          "format": "int64",
          "maximum": 100,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "ofTheLast": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricTimeWindow"
            }
          ],
          "description": "The time window for the alert condition"
        },
        "threshold": {
          "description": "The threshold value for the alert condition",
          "format": "double",
          "type": "number",
          "x-coralogix-presence": true
        }
      },
      "description": "Defines conditions for metric threshold alerts"
    },
    "MetricThresholdConditionType": {
      "enum": [
        "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
        "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN",
        "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS",
        "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS",
        "METRIC_THRESHOLD_CONDITION_TYPE_EQUALS",
        "METRIC_THRESHOLD_CONDITION_TYPE_NOT_EQUALS"
      ],
      "type": "string",
      "description": "Metric threshold condition type."
    },
    "MetricThresholdRule": {
      "title": "Metric Threshold Rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricThresholdCondition"
            }
          ],
          "description": "The condition for the metric threshold alert"
        },
        "override": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefOverride"
            }
          ],
          "description": "Alert override settings"
        }
      },
      "description": "Defines a rule for metric-based threshold alerts"
    },
    "MetricThresholdType": {
      "title": "Metric-based threshold alert type",
      "type": "object",
      "properties": {
        "evaluationDelayMs": {
          "description": "The delay in milliseconds before evaluating the alert condition",
          "format": "int32",
          "maximum": 10800000,
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "metricFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricFilter"
            }
          ],
          "description": "The filter to match metric entries for the alert."
        },
        "missingValues": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricMissingValues"
            }
          ],
          "description": "Configuration for handling missing values in the alert."
        },
        "noDataPolicy": {
          "allOf": [
            {
              "$ref": "#/$defs/NoDataPolicy"
            }
          ],
          "description": "User configuration to decide how to treat and what state to give to an alert with no data."
        },
        "rules": {
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/MetricThresholdRule"
          },
          "description": "The rules for the metric threshold alert"
        },
        "undetectedValuesManagement": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.UndetectedValuesManagement"
            }
          ],
          "description": "Configuration for handling undetected values in the alert."
        }
      },
      "description": "Configuration for alerts based on metric threshold violations"
    },
    "MetricTimeWindow": {
      "title": "Metric time window",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "metricTimeWindowSpecificValue"
          ],
          "type": "object"
        },
        {
          "required": [
            "metricTimeWindowDynamicDuration"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "metricTimeWindowSpecificValue"
                ],
                "type": "object"
              },
              {
                "required": [
                  "metricTimeWindowDynamicDuration"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "metricTimeWindowDynamicDuration": {
          "description": "The time window as a dynamic value",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "metricTimeWindowSpecificValue": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricTimeWindowValue"
            }
          ],
          "description": "The time window as a specific value"
        }
      },
      "description": "Metric time window."
    },
    "MetricTimeWindowValue": {
      "enum": [
        "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED",
        "METRIC_TIME_WINDOW_VALUE_MINUTES_5",
        "METRIC_TIME_WINDOW_VALUE_MINUTES_10",
        "METRIC_TIME_WINDOW_VALUE_MINUTES_15",
        "METRIC_TIME_WINDOW_VALUE_MINUTES_20",
        "METRIC_TIME_WINDOW_VALUE_MINUTES_30",
        "METRIC_TIME_WINDOW_VALUE_HOUR_1",
        "METRIC_TIME_WINDOW_VALUE_HOURS_2",
        "METRIC_TIME_WINDOW_VALUE_HOURS_4",
        "METRIC_TIME_WINDOW_VALUE_HOURS_6",
        "METRIC_TIME_WINDOW_VALUE_HOURS_12",
        "METRIC_TIME_WINDOW_VALUE_HOURS_24",
        "METRIC_TIME_WINDOW_VALUE_HOURS_36"
      ],
      "type": "string",
      "description": "Metric time window value."
    },
    "NextOp": {
      "enum": [
        "NEXT_OP_AND_OR_UNSPECIFIED",
        "NEXT_OP_OR"
      ],
      "type": "string",
      "description": "Next op."
    },
    "NoDataPolicy": {
      "type": "object",
      "properties": {
        "autoRetireSeconds": {
          "description": "The timeframe in seconds for auto retiring values that were detected as no-data. accepts only multiples of 60 seconds",
          "format": "int32",
          "minimum": 60,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "state": {
          "allOf": [
            {
              "$ref": "#/$defs/NoDataPolicyState"
            }
          ],
          "description": "The state to which the alert falls back to when theres no data (replaces UndetectedValuesManagement - this feature is being released gradually and might not be available for all customers yet)"
        }
      },
      "description": "No data policy."
    },
    "NoDataPolicyState": {
      "enum": [
        "NO_DATA_POLICY_STATE_UNSPECIFIED",
        "NO_DATA_POLICY_STATE_OK",
        "NO_DATA_POLICY_STATE_ALERTING",
        "NO_DATA_POLICY_STATE_KEEP_LAST",
        "NO_DATA_POLICY_STATE_NO_DATA"
      ],
      "type": "string",
      "description": "No data policy state."
    },
    "NotificationDestination": {
      "title": "Notification destination configuration",
      "type": "object",
      "properties": {
        "connectorId": {
          "minLength": 0,
          "type": "string",
          "description": "The connector ID used to send notifications"
        },
        "notifyOn": {
          "allOf": [
            {
              "$ref": "#/$defs/NotifyOn"
            }
          ],
          "description": "The condition under which the notification should be sent"
        },
        "presetId": {
          "description": "Optional preset ID for the notification destination",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "resolvedRouteOverrides": {
          "allOf": [
            {
              "$ref": "#/$defs/NotificationRouting"
            }
          ],
          "description": "Optional routing configuration to override from the connector/preset for resolved notifications."
        },
        "retriggeringPeriodMinutes": {
          "description": "The time in minutes before a new notification is sent for this destination",
          "format": "int64",
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "triggeredRoutingOverrides": {
          "allOf": [
            {
              "$ref": "#/$defs/NotificationRouting"
            }
          ],
          "description": "The routing configuration to override from the connector/preset for triggered notifications."
        }
      },
      "description": "Configuration for where and how alert notifications should be sent"
    },
    "NotificationRouter": {
      "title": "Notification router",
      "type": "object",
      "properties": {
        "id": {
          "description": "The ID of the notification router",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "notifyOn": {
          "allOf": [
            {
              "$ref": "#/$defs/NotifyOn"
            }
          ],
          "description": "The condition under which the notification should be sent",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for routing notifications"
    },
    "NotificationRouting": {
      "title": "Notification routing",
      "type": "object",
      "properties": {
        "configOverrides": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.SourceOverrides"
            }
          ],
          "description": "Configuration for routing notifications"
        }
      },
      "description": "Notification routing."
    },
    "NotifyOn": {
      "enum": [
        "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
        "NOTIFY_ON_TRIGGERED_AND_RESOLVED"
      ],
      "type": "string",
      "description": "Notify on."
    },
    "Recipients": {
      "title": "Recipients",
      "type": "object",
      "properties": {
        "emails": {
          "maxItems": 100,
          "minItems": 1,
          "type": "array",
          "items": {
            "maxLength": 4096,
            "minLength": 1,
            "pattern": "^[\\s\\S]*$",
            "type": "string",
            "description": "The list of email recipients for alert notifications"
          },
          "description": "The list of email recipients for alert notifications"
        }
      },
      "description": "List of email recipients for alert notifications"
    },
    "SloThresholdCondition": {
      "title": "SLO Threshold Condition",
      "type": "object",
      "properties": {
        "threshold": {
          "description": "Threshold value.",
          "format": "double",
          "minimum": 0,
          "type": "number",
          "x-coralogix-presence": true
        }
      },
      "description": "Condition for the SLO threshold rule"
    },
    "SloThresholdRule": {
      "title": "SLO Threshold Rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/SloThresholdCondition"
            }
          ],
          "description": "Condition for the SLO threshold rule"
        },
        "override": {
          "allOf": [
            {
              "$ref": "#/$defs/AlertDefOverride"
            }
          ],
          "description": "The override settings for the alert"
        }
      },
      "description": "SLO threshold rule definition"
    },
    "SloThresholdType": {
      "title": "SLO Threshold Type",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "errorBudget"
          ],
          "type": "object"
        },
        {
          "required": [
            "burnRate"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "errorBudget"
                ],
                "type": "object"
              },
              {
                "required": [
                  "burnRate"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "burnRate": {
          "allOf": [
            {
              "$ref": "#/$defs/BurnRateThreshold"
            }
          ],
          "description": "Burn rate threshold"
        },
        "errorBudget": {
          "allOf": [
            {
              "$ref": "#/$defs/ErrorBudgetThreshold"
            }
          ],
          "description": "Error budget threshold"
        },
        "sloDefinition": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.SloDefinition"
            }
          ],
          "description": "SLO definition"
        }
      },
      "description": "SLO threshold type definition"
    },
    "TimeDuration": {
      "title": "Time duration",
      "type": "object",
      "properties": {
        "duration": {
          "description": "The duration value",
          "maxLength": 20,
          "minLength": 1,
          "pattern": "^[0-9]+$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "unit": {
          "allOf": [
            {
              "$ref": "#/$defs/DurationUnit"
            }
          ],
          "description": "The unit of the duration"
        }
      },
      "description": "Configuration for time duration"
    },
    "TimeOfDay": {
      "title": "Time of day",
      "type": "object",
      "properties": {
        "hours": {
          "maximum": 23,
          "minimum": 0,
          "type": "integer",
          "description": "The hours.",
          "format": "int32"
        },
        "minutes": {
          "maximum": 59,
          "minimum": 0,
          "type": "integer",
          "description": "The minutes.",
          "format": "int32"
        }
      },
      "description": "Represents a specific time in a 24-hour format"
    },
    "TimeframeType": {
      "enum": [
        "TIMEFRAME_TYPE_UNSPECIFIED",
        "TIMEFRAME_TYPE_UP_TO"
      ],
      "type": "string",
      "description": "Timeframe type."
    },
    "TracingFilter": {
      "title": "Tracing filter",
      "type": "object",
      "properties": {
        "simpleFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingSimpleFilter"
            }
          ],
          "description": "Simple filter using latency threshold and label filters"
        }
      },
      "description": "Filter configuration for tracing-based alerts"
    },
    "TracingFilterOperationType": {
      "enum": [
        "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
        "TRACING_FILTER_OPERATION_TYPE_INCLUDES",
        "TRACING_FILTER_OPERATION_TYPE_ENDS_WITH",
        "TRACING_FILTER_OPERATION_TYPE_STARTS_WITH",
        "TRACING_FILTER_OPERATION_TYPE_IS_NOT"
      ],
      "type": "string",
      "description": "Tracing filter operation type."
    },
    "TracingFilterType": {
      "title": "Tracing filter type",
      "type": "object",
      "properties": {
        "operation": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingFilterOperationType"
            }
          ],
          "description": "The operation to perform on the label value"
        },
        "values": {
          "minItems": 1,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "The values of the label to filter by"
          },
          "description": "The values of the label to filter by"
        }
      },
      "description": "Filter type for trace entries"
    },
    "TracingImmediateType": {
      "title": "Trace-based immediate alert type",
      "type": "object",
      "properties": {
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "Notification payload field filter"
          },
          "description": "Notification payload field filter"
        },
        "tracingFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingFilter"
            }
          ],
          "description": "A filter to match trace entries for immediate alerts"
        }
      },
      "description": "Configuration for immediate alerts triggered on trace entries"
    },
    "TracingLabelFilters": {
      "title": "Tracing label filters",
      "type": "object",
      "properties": {
        "applicationName": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TracingFilterType"
          },
          "description": "Filter by application names"
        },
        "operationName": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TracingFilterType"
          },
          "description": "Filter by operation names"
        },
        "serviceName": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TracingFilterType"
          },
          "description": "Filter by service names"
        },
        "spanFields": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TracingSpanFieldsFilterType"
          },
          "description": "Filter by span fields"
        },
        "subsystemName": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TracingFilterType"
          },
          "description": "Filter by subsystem names"
        }
      },
      "description": "Filters for application name, subsystem name, service name, operation name and span fields"
    },
    "TracingSimpleFilter": {
      "title": "Simple tracing filter",
      "type": "object",
      "properties": {
        "latencyThresholdMs": {
          "description": "The latency threshold to filter traces in milliseconds",
          "maxLength": 20,
          "minLength": 1,
          "pattern": "^[0-9]+$",
          "type": "string",
          "x-coralogix-presence": true
        },
        "tracingLabelFilters": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingLabelFilters"
            }
          ],
          "description": "Trace label filters"
        }
      },
      "description": "Basic filter configuration using a latency threshold and label filters"
    },
    "TracingSpanFieldsFilterType": {
      "title": "Tracing span fields filter type",
      "type": "object",
      "properties": {
        "filterType": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingFilterType"
            }
          ],
          "description": "The FilterType to filter by."
        },
        "key": {
          "description": "The key of the span field to filter by",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "A filter for span fields in trace entries"
    },
    "TracingThresholdCondition": {
      "title": "Trace-based alert threshold condition",
      "type": "object",
      "properties": {
        "conditionType": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingThresholdConditionType"
            }
          ],
          "description": "The type of condition for the alert"
        },
        "spanAmount": {
          "description": "The threshold value for the alert condition",
          "format": "double",
          "minimum": 0,
          "type": "number",
          "x-coralogix-presence": true
        },
        "timeWindow": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingTimeWindow"
            }
          ],
          "description": "The time window for the alert condition"
        }
      },
      "description": "Tracing threshold condition."
    },
    "TracingThresholdConditionType": {
      "enum": [
        "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
      ],
      "type": "string",
      "description": "Tracing threshold condition type."
    },
    "TracingThresholdRule": {
      "title": "Trace Threshold Rule",
      "type": "object",
      "properties": {
        "condition": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingThresholdCondition"
            }
          ],
          "description": "The condition for the threshold alert."
        }
      },
      "description": "A rule for trace-based threshold alerts"
    },
    "TracingThresholdType": {
      "title": "Trace-based threshold alert type",
      "type": "object",
      "properties": {
        "notificationPayloadFilter": {
          "minItems": 0,
          "type": "array",
          "items": {
            "minLength": 0,
            "type": "string",
            "description": "Notification payload field filter"
          },
          "description": "Notification payload field filter"
        },
        "rules": {
          "maxItems": 1,
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TracingThresholdRule"
          },
          "description": "The rules for the trace threshold alert."
        },
        "tracingFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingFilter"
            }
          ],
          "description": "The filter to match trace entries for the alert."
        }
      },
      "description": "Configuration for alerts based on trace count thresholds"
    },
    "TracingTimeWindow": {
      "title": "Tracing time window",
      "type": "object",
      "properties": {
        "tracingTimeWindowValue": {
          "allOf": [
            {
              "$ref": "#/$defs/TracingTimeWindowValue"
            }
          ],
          "description": "A time window defined by a specific value"
        }
      },
      "description": "Tracing time window."
    },
    "TracingTimeWindowValue": {
      "enum": [
        "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED",
        "TRACING_TIME_WINDOW_VALUE_MINUTES_10",
        "TRACING_TIME_WINDOW_VALUE_MINUTES_15",
        "TRACING_TIME_WINDOW_VALUE_MINUTES_20",
        "TRACING_TIME_WINDOW_VALUE_MINUTES_30",
        "TRACING_TIME_WINDOW_VALUE_HOUR_1",
        "TRACING_TIME_WINDOW_VALUE_HOURS_2",
        "TRACING_TIME_WINDOW_VALUE_HOURS_4",
        "TRACING_TIME_WINDOW_VALUE_HOURS_6",
        "TRACING_TIME_WINDOW_VALUE_HOURS_12",
        "TRACING_TIME_WINDOW_VALUE_HOURS_24",
        "TRACING_TIME_WINDOW_VALUE_HOURS_36"
      ],
      "type": "string",
      "description": "Tracing time window value."
    },
    "v3.AutoRetireTimeframe": {
      "enum": [
        "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED",
        "AUTO_RETIRE_TIMEFRAME_MINUTES_5",
        "AUTO_RETIRE_TIMEFRAME_MINUTES_10",
        "AUTO_RETIRE_TIMEFRAME_HOUR_1",
        "AUTO_RETIRE_TIMEFRAME_HOURS_2",
        "AUTO_RETIRE_TIMEFRAME_HOURS_6",
        "AUTO_RETIRE_TIMEFRAME_HOURS_12",
        "AUTO_RETIRE_TIMEFRAME_HOURS_24"
      ],
      "type": "string",
      "description": "Auto retire timeframe."
    },
    "v3.ConnectorConfigField": {
      "title": "Connector config field",
      "type": "object",
      "properties": {
        "fieldName": {
          "minLength": 0,
          "type": "string",
          "description": "The name of the configuration field"
        },
        "template": {
          "minLength": 0,
          "type": "string",
          "description": "The template for the configuration field"
        }
      }
    },
    "v3.IntegrationType": {
      "title": "Integration type",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "integrationId"
          ],
          "type": "object"
        },
        {
          "required": [
            "recipients"
          ],
          "type": "object"
        },
        {
          "type": "object",
          "not": {
            "anyOf": [
              {
                "required": [
                  "integrationId"
                ],
                "type": "object"
              },
              {
                "required": [
                  "recipients"
                ],
                "type": "object"
              }
            ]
          }
        }
      ],
      "properties": {
        "integrationId": {
          "description": "The integration ID for the notification",
          "format": "int64",
          "minimum": 0,
          "type": "integer",
          "x-coralogix-presence": true
        },
        "recipients": {
          "allOf": [
            {
              "$ref": "#/$defs/Recipients"
            }
          ],
          "description": "The recipients for the notification."
        }
      },
      "description": "Defines the type of integration to use for notifications"
    },
    "v3.LogsFilter": {
      "title": "Log filter",
      "type": "object",
      "properties": {
        "simpleFilter": {
          "allOf": [
            {
              "$ref": "#/$defs/LogsSimpleFilter"
            }
          ],
          "description": "A simple filter that uses a Lucene query and label filters"
        }
      },
      "description": "Filter configuration for log-based alerts"
    },
    "v3.MessageConfigField": {
      "title": "Message config field",
      "type": "object",
      "properties": {
        "fieldName": {
          "minLength": 0,
          "type": "string",
          "description": "The name of the configuration field"
        },
        "template": {
          "minLength": 0,
          "type": "string",
          "description": "The template for the configuration field"
        }
      },
      "description": "Configuration field for a notification message"
    },
    "v3.SloDefinition": {
      "title": "SLO Definition",
      "type": "object",
      "properties": {
        "sloId": {
          "description": "The SLO ID",
          "maxLength": 36,
          "minLength": 1,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for SLO definition"
    },
    "v3.SourceOverrides": {
      "title": "Source overrides",
      "type": "object",
      "properties": {
        "connectorConfigFields": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/v3.ConnectorConfigField"
          },
          "description": "Connector configuration fields"
        },
        "messageConfigFields": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/v3.MessageConfigField"
          },
          "description": "Notification message configuration fields"
        },
        "payloadType": {
          "minLength": 0,
          "type": "string",
          "description": "the payload type for the notification"
        }
      },
      "description": "Source overrides."
    },
    "v3.UndetectedValuesManagement": {
      "title": "Undetected value management",
      "type": "object",
      "properties": {
        "autoRetireTimeframe": {
          "allOf": [
            {
              "$ref": "#/$defs/v3.AutoRetireTimeframe"
            }
          ],
          "description": "The timeframe for auto-retiring the alert when undetected values are detected",
          "x-coralogix-presence": true
        },
        "triggerUndetectedValues": {
          "description": "Should trigger the alert when undetected values are detected",
          "type": "boolean",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for handling undetected values in alerts"
    }
  }
}