Class AbstractResourceAlertResponse

java.lang.Object
com.iland.core.web.rest.response.notification.AbstractResourceAlertResponse
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UserEdgeResourceAlertResponse, UserExtNetworkResourceAlertResponse, UserVappResourceAlertResponse, UserVdcResourceAlertResponse, UserVmResourceAlertResponse

public abstract class AbstractResourceAlertResponse extends Object implements Serializable
Abstract Resource Alert Response.
Author:
Nick Kasprzak
See Also:
  • Field Details

    • group

      @Since(1.0) @Expose protected String group
    • name

      @Since(1.0) @Expose protected String name
    • type

      @Since(1.0) @Expose protected String type
    • username

      @Since(1.0) @Expose protected String username
    • action

      @Since(1.0) @Expose protected String action
    • equalityRelation

      @Since(1.0) @Expose @SerializedName("equality") protected String equalityRelation
    • enabled

      @Since(1.0) @Expose protected boolean enabled
    • breachPeriod

      @Since(1.0) @Expose @SerializedName("breach") protected int breachPeriod
  • Constructor Details

    • AbstractResourceAlertResponse

      public AbstractResourceAlertResponse(String group, String name, String type, String username, String action, String equalityRelation, boolean enabled, int breachPeriod)
  • Method Details

    • getGroup

      public String getGroup()
      Get the performance counter group attached to this alert.
      Returns:
      String performance counter group
    • getName

      public String getName()
      Get the performance counter name attached to this alert.
      Returns:
      String performance counter name
    • getType

      public String getType()
      Get the performance counter type attached to this alert.
      Returns:
      String performance counter type
    • getUsername

      public String getUsername()
      Get the username associated with the alert.
      Returns:
      String username
    • getRelation

      public String getRelation()
      Get equality relation.

      e.g. '<=' or '>='

      Returns:
      String equality relation
    • getAction

      public String getAction()
      Get action to perform when alert is triggered.
      Returns:
      String action
    • getBreachPeriod

      public int getBreachPeriod()
      Get the breach period that is required in order for the alert to be triggered.

      i.e. the number of consecutive periods in which the threshold must be met before alert is sent.

      Returns:
      breach period
    • isEnabled

      public boolean isEnabled()
      Set whether the alert is enabled.
      Returns:
      enabled
    • 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
    • toStringHelper

      protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()