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.
  • Field Details

  • Constructor Details

    • OpsAlertContext

      public OpsAlertContext()
  • Method Details

    • source

      public OpsAlertContext source(@Nonnull OpsAlertContext.SourceEnum source)
    • getSource

      @Nonnull public OpsAlertContext.SourceEnum getSource()
      What kind of alert transitioned to active.
      Returns:
      source
    • setSource

      public void setSource(@Nonnull OpsAlertContext.SourceEnum source)
    • dedupeKey

      public OpsAlertContext dedupeKey(@Nonnull String dedupeKey)
    • getDedupeKey

      @Nonnull public String getDedupeKey()
      Stable per-condition key; with `source` forms the ticket's `sourceRef`.
      Returns:
      dedupeKey
    • setDedupeKey

      public void setDedupeKey(@Nonnull String dedupeKey)
    • severity

      public OpsAlertContext severity(@Nonnull OpsAlertContext.SeverityEnum severity)
    • getSeverity

      @Nonnull public OpsAlertContext.SeverityEnum getSeverity()
      Alert severity.
      Returns:
      severity
    • setSeverity

      public void setSeverity(@Nonnull OpsAlertContext.SeverityEnum severity)
    • observedValue

      public OpsAlertContext observedValue(@Nullable BigDecimal observedValue)
    • getObservedValue

      @Nullable public BigDecimal getObservedValue()
      The metric value that tripped the rule, or `null`.
      Returns:
      observedValue
    • setObservedValue

      public void setObservedValue(@Nullable BigDecimal observedValue)
    • href

      public OpsAlertContext href(@Nullable String href)
    • getHref

      @Nullable public String getHref()
      Dashboard deep link to the alert, or `null`.
      Returns:
      href
    • setHref

      public void setHref(@Nullable String href)
    • status

      public OpsAlertContext status(@Nullable OpsAlertContext.StatusEnum status)
    • getStatus

      @Nullable public OpsAlertContext.StatusEnum getStatus()
      Current status of the underlying alert (`active` while the condition holds), or `null` if the alert row is gone.
      Returns:
      status
    • setStatus

      public void setStatus(@Nullable OpsAlertContext.StatusEnum status)
    • activeSince

      public OpsAlertContext activeSince(@Nullable String activeSince)
    • getActiveSince

      @Nullable public String getActiveSince()
      ISO-8601 timestamp the alert became active, or `null`.
      Returns:
      activeSince
    • setActiveSince

      public void setActiveSince(@Nullable String activeSince)
    • resolvedAt

      public OpsAlertContext resolvedAt(@Nullable String resolvedAt)
    • getResolvedAt

      @Nullable public String getResolvedAt()
      ISO-8601 timestamp the alert cleared, or `null` while still active.
      Returns:
      resolvedAt
    • setResolvedAt

      public void setResolvedAt(@Nullable String resolvedAt)
    • rule

      public OpsAlertContext rule(@Nullable OpsAlertRuleSummary rule)
    • getRule

      @Nullable public OpsAlertRuleSummary getRule()
      The alert rule condition that tripped (metric-rule alerts only); `null` for SRM/peek/guardrail alerts with no rule.
      Returns:
      rule
    • setRule

      public void setRule(@Nullable OpsAlertRuleSummary rule)
    • metric

      public OpsAlertContext metric(@Nullable OpsAlertMetricSummary metric)
    • getMetric

      @Nullable public OpsAlertMetricSummary getMetric()
      The metric the alert watches, hydrated with its backing event(s); `null` if not resolvable.
      Returns:
      metric
    • setMetric

      public void setMetric(@Nullable OpsAlertMetricSummary metric)
    • putAdditionalProperty

      public OpsAlertContext putAdditionalProperty(String key, Object value)
      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 property
      value - value of the property
      Returns:
      the OpsAlertContext instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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

      public static OpsAlertContext fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of OpsAlertContext to an JSON string
      Returns:
      JSON string