Package codes.grow.packages.vault
Record Class UnwrapResult
java.lang.Object
java.lang.Record
codes.grow.packages.vault.UnwrapResult
- Record Components:
data- wrapped data (for wrapped API responses the originaldata)auth- auth block when a login response was wrappedleaseId- lease id of the original responseleaseDuration- lease TTL of the original responserenewable- whether that lease is renewablewarnings- server warnings
public record UnwrapResult(Optional<Map<String,Object>> data, Optional<AuthInfo> auth, String leaseId, Duration leaseDuration, boolean renewable, List<String> warnings)
extends Record
The unwrapped response. Data values are never printed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauth()Returns the value of theauthrecord component.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.toString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
UnwrapResult
public UnwrapResult(Optional<Map<String, Object>> data, Optional<AuthInfo> auth, String leaseId, Duration leaseDuration, boolean renewable, List<String> warnings) Creates the record; collections are copied.- Parameters:
data- dataauth- authleaseId- lease idleaseDuration- TTLrenewable- renewable flagwarnings- warnings
-
-
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 '=='. -
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
auth
Returns the value of theauthrecord component.- Returns:
- the value of the
authrecord 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
-