Record Class Diagnosis.Definition

java.lang.Object
java.lang.Record
org.elasticsearch.health.Diagnosis.Definition
Record Components:
indicatorName - The name of the health indicator service that will generate this diagnosis
id - An identifier unique to this diagnosis across the health indicator that generates it
cause - A description of the cause of the problem
action - A description of the action to be taken to remedy the problem
helpURL - Optional evergreen url to a help document
Enclosing class:
Diagnosis

public static record Diagnosis.Definition(String indicatorName, String id, String cause, String action, String helpURL) extends Record
Details a diagnosis - cause and a potential action that a user could take to clear an issue identified by a HealthService.
  • Constructor Details

    • Definition

      public Definition(String indicatorName, String id, String cause, String action, String helpURL)
      Creates an instance of a Definition record class.
      Parameters:
      indicatorName - the value for the indicatorName record component
      id - the value for the id record component
      cause - the value for the cause record component
      action - the value for the action record component
      helpURL - the value for the helpURL record component
  • Method Details

    • getUniqueId

      public String getUniqueId()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • indicatorName

      public String indicatorName()
      Returns the value of the indicatorName record component.
      Returns:
      the value of the indicatorName record component
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • cause

      public String cause()
      Returns the value of the cause record component.
      Returns:
      the value of the cause record component
    • action

      public String action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • helpURL

      public String helpURL()
      Returns the value of the helpURL record component.
      Returns:
      the value of the helpURL record component