Package codes.grow.packages.vault
Record Class HealthResponse
java.lang.Object
java.lang.Record
codes.grow.packages.vault.HealthResponse
- Record Components:
state-active,standby,perfstandby,sealedoruninitializedinitialized- whether the server is initialisedsealed- whether it is sealedstandby- whether it is a standby nodeperformanceStandby- whether it is a performance standbyversion- server version, e.g.2.2.2clusterName- cluster nameclusterId- cluster idserverTime- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclusterIdrecord component.Returns the value of theclusterNamerecord component.final booleanIndicates whether some other object is "equal to" this one.static HealthResponsefrom(com.fasterxml.jackson.databind.JsonNode d) Converts a rawsys/healthbody.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinitializedrecord component.booleanReturns the value of theperformanceStandbyrecord component.booleansealed()Returns the value of thesealedrecord component.Returns the value of theserverTimerecord component.booleanstandby()Returns the value of thestandbyrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
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 aHealthResponserecord class.- Parameters:
state- the value for thestaterecord componentinitialized- the value for theinitializedrecord componentsealed- the value for thesealedrecord componentstandby- the value for thestandbyrecord componentperformanceStandby- the value for theperformanceStandbyrecord componentversion- the value for theversionrecord componentclusterName- the value for theclusterNamerecord componentclusterId- the value for theclusterIdrecord componentserverTime- the value for theserverTimerecord component
-
-
Method Details
-
from
Converts a rawsys/healthbody.- Parameters:
d- the body- Returns:
- the health
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
initialized
public boolean initialized()Returns the value of theinitializedrecord component.- Returns:
- the value of the
initializedrecord component
-
sealed
public boolean sealed()Returns the value of thesealedrecord component.- Returns:
- the value of the
sealedrecord component
-
standby
public boolean standby()Returns the value of thestandbyrecord component.- Returns:
- the value of the
standbyrecord component
-
performanceStandby
public boolean performanceStandby()Returns the value of theperformanceStandbyrecord component.- Returns:
- the value of the
performanceStandbyrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
clusterName
Returns the value of theclusterNamerecord component.- Returns:
- the value of the
clusterNamerecord component
-
clusterId
Returns the value of theclusterIdrecord component.- Returns:
- the value of the
clusterIdrecord component
-
serverTime
Returns the value of theserverTimerecord component.- Returns:
- the value of the
serverTimerecord component
-