Record Class LeaseInfo

java.lang.Object
java.lang.Record
codes.grow.packages.vault.LeaseInfo
Record Components:
id - lease id
path - secret path that created the lease ("" on Vault, which does not report it)
issueTime - issue time
expireTime - expiry time
lastRenewal - last renewal time
renewable - whether it can be renewed
ttl - 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 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 a LeaseInfo record class.
      Parameters:
      id - the value for the id record component
      path - the value for the path record component
      issueTime - the value for the issueTime record component
      expireTime - the value for the expireTime record component
      lastRenewal - the value for the lastRenewal record component
      renewable - the value for the renewable record component
      ttl - the value for the ttl record component
  • Method Details

    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • issueTime

      public Optional<Instant> issueTime()
      Returns the value of the issueTime record component.
      Returns:
      the value of the issueTime record component
    • expireTime

      public Optional<Instant> expireTime()
      Returns the value of the expireTime record component.
      Returns:
      the value of the expireTime record component
    • lastRenewal

      public Optional<Instant> lastRenewal()
      Returns the value of the lastRenewal record component.
      Returns:
      the value of the lastRenewal record component
    • renewable

      public boolean renewable()
      Returns the value of the renewable record component.
      Returns:
      the value of the renewable record component
    • ttl

      public Duration ttl()
      Returns the value of the ttl record component.
      Returns:
      the value of the ttl record component