Package codes.grow.packages.vault
Record Class RawResponse
java.lang.Object
java.lang.Record
codes.grow.packages.vault.RawResponse
- Record Components:
status- HTTP status (204 = no content)data-dataof the envelopeleaseId- lease idleaseDuration- lease TTLrenewable- whether the lease is renewablewarnings- server warningswrapInfo- set when the response was wrappedauth- set for login-like responses
public record RawResponse(int status, Optional<com.fasterxml.jackson.databind.JsonNode> data, String leaseId, Duration leaseDuration, boolean renewable, List<String> warnings, Optional<WrapInfo> wrapInfo, Optional<AuthInfo> auth)
extends Record
Result of
VaultClient.request(java.lang.String, java.lang.String, java.lang.Object): the decoded Vault envelope.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauth()Returns the value of theauthrecord component.Optional<com.fasterxml.jackson.databind.JsonNode> data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theleaseDurationrecord component.leaseId()Returns the value of theleaseIdrecord component.booleanReturns the value of therenewablerecord component.intstatus()Returns the value of thestatusrecord component.toString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.wrapInfo()Returns the value of thewrapInforecord component.
-
Constructor Details
-
RawResponse
public RawResponse(int status, Optional<com.fasterxml.jackson.databind.JsonNode> data, String leaseId, Duration leaseDuration, boolean renewable, List<String> warnings, Optional<WrapInfo> wrapInfo, Optional<AuthInfo> auth) Creates the record; warnings are copied.- Parameters:
status- statusdata- dataleaseId- lease idleaseDuration- TTLrenewable- renewable flagwarnings- warningswrapInfo- wrap infoauth- auth block
-
-
Method Details
-
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 '=='. -
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
leaseId
Returns the value of theleaseIdrecord component.- Returns:
- the value of the
leaseIdrecord component
-
leaseDuration
Returns the value of theleaseDurationrecord component.- Returns:
- the value of the
leaseDurationrecord component
-
renewable
public boolean renewable()Returns the value of therenewablerecord component.- Returns:
- the value of the
renewablerecord component
-
warnings
Returns the value of thewarningsrecord component.- Returns:
- the value of the
warningsrecord component
-
wrapInfo
Returns the value of thewrapInforecord component.- Returns:
- the value of the
wrapInforecord component
-
auth
Returns the value of theauthrecord component.- Returns:
- the value of the
authrecord component
-