Package ai.shipeasy.admin.model
Class OpsAlertContext
java.lang.Object
ai.shipeasy.admin.model.OpsAlertContext
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class OpsAlertContext
extends Object
Hydrated detail for an auto-filed `alert` ticket, resolving the rule → metric → event chain at request time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumAlert severity.static enumWhat kind of alert transitioned to active.static enumCurrent status of the underlying alert (`active` while the condition holds), or `null` if the alert row is gone. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactiveSince(String activeSince) booleanstatic OpsAlertContextCreate an instance of OpsAlertContext given an JSON stringISO-8601 timestamp the alert became active, or `null`.Return the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Stable per-condition key; with `source` forms the ticket's `sourceRef`.getHref()Dashboard deep link to the alert, or `null`.The metric the alert watches, hydrated with its backing event(s); `null` if not resolvable.The metric value that tripped the rule, or `null`.ISO-8601 timestamp the alert cleared, or `null` while still active.getRule()The alert rule condition that tripped (metric-rule alerts only); `null` for SRM/peek/guardrail alerts with no rule.Alert severity.What kind of alert transitioned to active.Current status of the underlying alert (`active` while the condition holds), or `null` if the alert row is gone.inthashCode()metric(OpsAlertMetricSummary metric) observedValue(BigDecimal observedValue) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.resolvedAt(String resolvedAt) rule(OpsAlertRuleSummary rule) voidsetActiveSince(String activeSince) voidsetDedupeKey(String dedupeKey) voidvoidsetMetric(OpsAlertMetricSummary metric) voidsetObservedValue(BigDecimal observedValue) voidsetResolvedAt(String resolvedAt) voidsetRule(OpsAlertRuleSummary rule) voidsetSeverity(OpsAlertContext.SeverityEnum severity) voidsetSource(OpsAlertContext.SourceEnum source) voidsetStatus(OpsAlertContext.StatusEnum status) severity(OpsAlertContext.SeverityEnum severity) source(OpsAlertContext.SourceEnum source) status(OpsAlertContext.StatusEnum status) toJson()Convert an instance of OpsAlertContext to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_SOURCE
- See Also:
-
SERIALIZED_NAME_DEDUPE_KEY
- See Also:
-
SERIALIZED_NAME_SEVERITY
- See Also:
-
SERIALIZED_NAME_OBSERVED_VALUE
- See Also:
-
SERIALIZED_NAME_HREF
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_ACTIVE_SINCE
- See Also:
-
SERIALIZED_NAME_RESOLVED_AT
- See Also:
-
SERIALIZED_NAME_RULE
- See Also:
-
SERIALIZED_NAME_METRIC
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OpsAlertContext
public OpsAlertContext()
-
-
Method Details
-
source
-
getSource
What kind of alert transitioned to active.- Returns:
- source
-
setSource
-
dedupeKey
-
getDedupeKey
Stable per-condition key; with `source` forms the ticket's `sourceRef`.- Returns:
- dedupeKey
-
setDedupeKey
-
severity
-
getSeverity
Alert severity.- Returns:
- severity
-
setSeverity
-
observedValue
-
getObservedValue
The metric value that tripped the rule, or `null`.- Returns:
- observedValue
-
setObservedValue
-
href
-
getHref
Dashboard deep link to the alert, or `null`.- Returns:
- href
-
setHref
-
status
-
getStatus
Current status of the underlying alert (`active` while the condition holds), or `null` if the alert row is gone.- Returns:
- status
-
setStatus
-
activeSince
-
getActiveSince
ISO-8601 timestamp the alert became active, or `null`.- Returns:
- activeSince
-
setActiveSince
-
resolvedAt
-
getResolvedAt
ISO-8601 timestamp the alert cleared, or `null` while still active.- Returns:
- resolvedAt
-
setResolvedAt
-
rule
-
getRule
The alert rule condition that tripped (metric-rule alerts only); `null` for SRM/peek/guardrail alerts with no rule.- Returns:
- rule
-
setRule
-
metric
-
getMetric
The metric the alert watches, hydrated with its backing event(s); `null` if not resolvable.- Returns:
- metric
-
setMetric
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the OpsAlertContext instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
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 OpsAlertContext
-
fromJson
Create an instance of OpsAlertContext given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OpsAlertContext
- Throws:
IOException- if the JSON string is invalid with respect to OpsAlertContext
-
toJson
Convert an instance of OpsAlertContext to an JSON string- Returns:
- JSON string
-