Package ai.shipeasy.admin.model
Class CreateAlertRuleRequest
java.lang.Object
ai.shipeasy.admin.model.CreateAlertRuleRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CreateAlertRuleRequest
extends Object
CreateAlertRuleRequest
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the metric value is compared to the threshold (gt/gte/lt/lte).static classstatic enumSeverity of the raised alert. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomparator(CreateAlertRuleRequest.ComparatorEnum comparator) booleanstatic CreateAlertRuleRequestCreate an instance of CreateAlertRuleRequest given an JSON stringHow the metric value is compared to the threshold (gt/gte/lt/lte).Whether the rule is evaluated by the cron.Id of the metric to evaluate.getName()Human label for the rule, shown on the alert and the rules list.Get notifySeverity of the raised alert.Threshold the metric value is compared against.Lookback window (hours) the metric is aggregated over.inthashCode()notify(NotificationTarget notify) voidsetComparator(CreateAlertRuleRequest.ComparatorEnum comparator) voidsetEnabled(Boolean enabled) voidsetMetricId(String metricId) voidvoidsetNotify(NotificationTarget notify) voidvoidsetThreshold(BigDecimal threshold) voidsetWindowHours(Integer windowHours) severity(CreateAlertRuleRequest.SeverityEnum severity) threshold(BigDecimal threshold) toJson()Convert an instance of CreateAlertRuleRequest to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundwindowHours(Integer windowHours)
-
Field Details
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_METRIC_ID
- See Also:
-
SERIALIZED_NAME_COMPARATOR
- See Also:
-
SERIALIZED_NAME_THRESHOLD
- See Also:
-
SERIALIZED_NAME_WINDOW_HOURS
- See Also:
-
SERIALIZED_NAME_SEVERITY
- See Also:
-
SERIALIZED_NAME_ENABLED
- See Also:
-
SERIALIZED_NAME_NOTIFY
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CreateAlertRuleRequest
public CreateAlertRuleRequest()
-
-
Method Details
-
name
-
getName
Human label for the rule, shown on the alert and the rules list.- Returns:
- name
-
setName
-
metricId
-
getMetricId
Id of the metric to evaluate.- Returns:
- metricId
-
setMetricId
-
comparator
-
getComparator
How the metric value is compared to the threshold (gt/gte/lt/lte).- Returns:
- comparator
-
setComparator
-
threshold
-
getThreshold
Threshold the metric value is compared against.- Returns:
- threshold
-
setThreshold
-
windowHours
-
getWindowHours
Lookback window (hours) the metric is aggregated over. 1–720. minimum: 1 maximum: 720- Returns:
- windowHours
-
setWindowHours
-
severity
-
getSeverity
Severity of the raised alert.- Returns:
- severity
-
setSeverity
-
enabled
-
getEnabled
Whether the rule is evaluated by the cron.- Returns:
- enabled
-
setEnabled
-
notify
-
getNotify
Get notify- Returns:
- notify
-
setNotify
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to CreateAlertRuleRequest
-
fromJson
Create an instance of CreateAlertRuleRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateAlertRuleRequest
- Throws:
IOException- if the JSON string is invalid with respect to CreateAlertRuleRequest
-
toJson
Convert an instance of CreateAlertRuleRequest to an JSON string- Returns:
- JSON string
-