Package codes.grow.packages.vault
Record Class LeaseInfo
java.lang.Object
java.lang.Record
codes.grow.packages.vault.LeaseInfo
- Record Components:
id- lease idpath- secret path that created the lease (""on Vault, which does not report it)issueTime- issue timeexpireTime- expiry timelastRenewal- last renewal timerenewable- whether it can be renewedttl- remaining TTL
public record LeaseInfo(String id, String path, Optional<Instant> issueTime, Optional<Instant> expireTime, Optional<Instant> lastRenewal, boolean renewable, Duration ttl)
extends Record
Lease details (
PUT sys/leases/lookup).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpireTimerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theissueTimerecord component.Returns the value of thelastRenewalrecord component.path()Returns the value of thepathrecord component.booleanReturns the value of therenewablerecord component.final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.
-
Constructor Details
-
LeaseInfo
public LeaseInfo(String id, String path, Optional<Instant> issueTime, Optional<Instant> expireTime, Optional<Instant> lastRenewal, boolean renewable, Duration ttl) Creates an instance of aLeaseInforecord class.- Parameters:
id- the value for theidrecord componentpath- the value for thepathrecord componentissueTime- the value for theissueTimerecord componentexpireTime- the value for theexpireTimerecord componentlastRenewal- the value for thelastRenewalrecord componentrenewable- the value for therenewablerecord componentttl- the value for thettlrecord component
-
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
issueTime
Returns the value of theissueTimerecord component.- Returns:
- the value of the
issueTimerecord component
-
expireTime
Returns the value of theexpireTimerecord component.- Returns:
- the value of the
expireTimerecord component
-
lastRenewal
Returns the value of thelastRenewalrecord component.- Returns:
- the value of the
lastRenewalrecord component
-
renewable
public boolean renewable()Returns the value of therenewablerecord component.- Returns:
- the value of the
renewablerecord component
-
ttl
Returns the value of thettlrecord component.- Returns:
- the value of the
ttlrecord component
-