Record Class HealthResponse

java.lang.Object
java.lang.Record
codes.grow.packages.vault.HealthResponse
Record Components:
state - active, standby, perfstandby, sealed or uninitialized
initialized - whether the server is initialised
sealed - whether it is sealed
standby - whether it is a standby node
performanceStandby - whether it is a performance standby
version - server version, e.g. 2.2.2
clusterName - cluster name
clusterId - cluster id
serverTime - server time

public record HealthResponse(String state, boolean initialized, boolean sealed, boolean standby, boolean performanceStandby, String version, String clusterName, String clusterId, Optional<Instant> serverTime) extends Record
Node health (GET sys/health).
  • Constructor Details

    • HealthResponse

      public HealthResponse(String state, boolean initialized, boolean sealed, boolean standby, boolean performanceStandby, String version, String clusterName, String clusterId, Optional<Instant> serverTime)
      Creates an instance of a HealthResponse record class.
      Parameters:
      state - the value for the state record component
      initialized - the value for the initialized record component
      sealed - the value for the sealed record component
      standby - the value for the standby record component
      performanceStandby - the value for the performanceStandby record component
      version - the value for the version record component
      clusterName - the value for the clusterName record component
      clusterId - the value for the clusterId record component
      serverTime - the value for the serverTime record component
  • Method Details

    • from

      public static HealthResponse from(com.fasterxml.jackson.databind.JsonNode d)
      Converts a raw sys/health body.
      Parameters:
      d - the body
      Returns:
      the health
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • initialized

      public boolean initialized()
      Returns the value of the initialized record component.
      Returns:
      the value of the initialized record component
    • sealed

      public boolean sealed()
      Returns the value of the sealed record component.
      Returns:
      the value of the sealed record component
    • standby

      public boolean standby()
      Returns the value of the standby record component.
      Returns:
      the value of the standby record component
    • performanceStandby

      public boolean performanceStandby()
      Returns the value of the performanceStandby record component.
      Returns:
      the value of the performanceStandby record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • clusterName

      public String clusterName()
      Returns the value of the clusterName record component.
      Returns:
      the value of the clusterName record component
    • clusterId

      public String clusterId()
      Returns the value of the clusterId record component.
      Returns:
      the value of the clusterId record component
    • serverTime

      public Optional<Instant> serverTime()
      Returns the value of the serverTime record component.
      Returns:
      the value of the serverTime record component