ThresholdCustomAlertRule Class

public class ThresholdCustomAlertRule
extends CustomAlertRule

A custom alert rule that checks if a value (depends on the custom alert type) is within the given range.

Constructor Summary

Constructor Description
ThresholdCustomAlertRule()

Creates an instance of ThresholdCustomAlertRule class.

Method Summary

Modifier and Type Method and Description
static ThresholdCustomAlertRule fromJson(JsonReader jsonReader)

Reads an instance of ThresholdCustomAlertRule from the JsonReader.

int maxThreshold()

Get the maxThreshold property: The maximum threshold.

int minThreshold()

Get the minThreshold property: The minimum threshold.

String ruleType()

Get the ruleType property: The ruleType property.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ThresholdCustomAlertRule withIsEnabled(boolean isEnabled)

Set the isEnabled property: Status of the custom alert.

ThresholdCustomAlertRule withMaxThreshold(int maxThreshold)

Set the maxThreshold property: The maximum threshold.

ThresholdCustomAlertRule withMinThreshold(int minThreshold)

Set the minThreshold property: The minimum threshold.

Methods inherited from CustomAlertRule

Methods inherited from java.lang.Object

Constructor Details

ThresholdCustomAlertRule

public ThresholdCustomAlertRule()

Creates an instance of ThresholdCustomAlertRule class.

Method Details

fromJson

public static ThresholdCustomAlertRule fromJson(JsonReader jsonReader)

Reads an instance of ThresholdCustomAlertRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ThresholdCustomAlertRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

maxThreshold

public int maxThreshold()

Get the maxThreshold property: The maximum threshold.

Returns:

the maxThreshold value.

minThreshold

public int minThreshold()

Get the minThreshold property: The minimum threshold.

Returns:

the minThreshold value.

ruleType

public String ruleType()

Get the ruleType property: The ruleType property.

Overrides:

ThresholdCustomAlertRule.ruleType()

Returns:

the ruleType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ThresholdCustomAlertRule.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

ThresholdCustomAlertRule.validate()

withIsEnabled

public ThresholdCustomAlertRule withIsEnabled(boolean isEnabled)

Set the isEnabled property: Status of the custom alert.

Overrides:

ThresholdCustomAlertRule.withIsEnabled(boolean isEnabled)

Parameters:

isEnabled

withMaxThreshold

public ThresholdCustomAlertRule withMaxThreshold(int maxThreshold)

Set the maxThreshold property: The maximum threshold.

Parameters:

maxThreshold - the maxThreshold value to set.

Returns:

the ThresholdCustomAlertRule object itself.

withMinThreshold

public ThresholdCustomAlertRule withMinThreshold(int minThreshold)

Set the minThreshold property: The minimum threshold.

Parameters:

minThreshold - the minThreshold value to set.

Returns:

the ThresholdCustomAlertRule object itself.

Applies to