Class TimeWindowCustomAlertRule

Direct Known Subclasses:
ActiveConnectionsNotInAllowedRange, AmqpC2DMessagesNotInAllowedRange, AmqpC2DRejectedMessagesNotInAllowedRange, AmqpD2CMessagesNotInAllowedRange, DirectMethodInvokesNotInAllowedRange, FailedLocalLoginsNotInAllowedRange, FileUploadsNotInAllowedRange, HttpC2DMessagesNotInAllowedRange, HttpC2DRejectedMessagesNotInAllowedRange, HttpD2CMessagesNotInAllowedRange, MqttC2DMessagesNotInAllowedRange, MqttC2DRejectedMessagesNotInAllowedRange, MqttD2CMessagesNotInAllowedRange, QueuePurgesNotInAllowedRange, TwinUpdatesNotInAllowedRange, UnauthorizedOperationsNotInAllowedRange

public class TimeWindowCustomAlertRule extends ThresholdCustomAlertRule
A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range.
  • Constructor Details

    • TimeWindowCustomAlertRule

      public TimeWindowCustomAlertRule()
  • Method Details

    • timeWindowSize

      public Duration timeWindowSize()
      Get the timeWindowSize property: The time window size in iso8601 format.
      Returns:
      the timeWindowSize value.
    • withTimeWindowSize

      public TimeWindowCustomAlertRule withTimeWindowSize(Duration timeWindowSize)
      Set the timeWindowSize property: The time window size in iso8601 format.
      Parameters:
      timeWindowSize - the timeWindowSize value to set.
      Returns:
      the TimeWindowCustomAlertRule object itself.
    • withMinThreshold

      public TimeWindowCustomAlertRule withMinThreshold(int minThreshold)
      Set the minThreshold property: The minimum threshold.
      Overrides:
      withMinThreshold in class ThresholdCustomAlertRule
      Parameters:
      minThreshold - the minThreshold value to set.
      Returns:
      the ThresholdCustomAlertRule object itself.
    • withMaxThreshold

      public TimeWindowCustomAlertRule withMaxThreshold(int maxThreshold)
      Set the maxThreshold property: The maximum threshold.
      Overrides:
      withMaxThreshold in class ThresholdCustomAlertRule
      Parameters:
      maxThreshold - the maxThreshold value to set.
      Returns:
      the ThresholdCustomAlertRule object itself.
    • withIsEnabled

      public TimeWindowCustomAlertRule withIsEnabled(boolean isEnabled)
      Set the isEnabled property: Status of the custom alert.
      Overrides:
      withIsEnabled in class ThresholdCustomAlertRule
      Parameters:
      isEnabled - the isEnabled value to set.
      Returns:
      the CustomAlertRule object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ThresholdCustomAlertRule
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.