Record Class WrapInfo

java.lang.Object
java.lang.Record
codes.grow.packages.vault.WrapInfo
Record Components:
token - single-use wrapping token (redacted)
accessor - its accessor
ttl - validity
creationTime - creation time
creationPath - path that created the wrapped response

public record WrapInfo(Secret token, Optional<Secret> accessor, Duration ttl, Optional<Instant> creationTime, String creationPath) extends Record
A response-wrapping token (wrap_info).
  • Constructor Details

    • WrapInfo

      public WrapInfo(Secret token, Optional<Secret> accessor, Duration ttl, Optional<Instant> creationTime, String creationPath)
      Creates an instance of a WrapInfo record class.
      Parameters:
      token - the value for the token record component
      accessor - the value for the accessor record component
      ttl - the value for the ttl record component
      creationTime - the value for the creationTime record component
      creationPath - the value for the creationPath 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • token

      public Secret token()
      Returns the value of the token record component.
      Returns:
      the value of the token record component
    • accessor

      public Optional<Secret> accessor()
      Returns the value of the accessor record component.
      Returns:
      the value of the accessor record component
    • ttl

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

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

      public String creationPath()
      Returns the value of the creationPath record component.
      Returns:
      the value of the creationPath record component