Record Class RawResponse

java.lang.Object
java.lang.Record
codes.grow.packages.vault.RawResponse
Record Components:
status - HTTP status (204 = no content)
data - data of the envelope
leaseId - lease id
leaseDuration - lease TTL
renewable - whether the lease is renewable
warnings - server warnings
wrapInfo - set when the response was wrapped
auth - 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
  • 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 - status
      data - data
      leaseId - lease id
      leaseDuration - TTL
      renewable - renewable flag
      warnings - warnings
      wrapInfo - wrap info
      auth - auth block
  • Method Details

    • toString

      public 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.
    • status

      public int status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • data

      public Optional<com.fasterxml.jackson.databind.JsonNode> data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • leaseId

      public String leaseId()
      Returns the value of the leaseId record component.
      Returns:
      the value of the leaseId record component
    • leaseDuration

      public Duration leaseDuration()
      Returns the value of the leaseDuration record component.
      Returns:
      the value of the leaseDuration record component
    • renewable

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

      public List<String> warnings()
      Returns the value of the warnings record component.
      Returns:
      the value of the warnings record component
    • wrapInfo

      public Optional<WrapInfo> wrapInfo()
      Returns the value of the wrapInfo record component.
      Returns:
      the value of the wrapInfo record component
    • auth

      public Optional<AuthInfo> auth()
      Returns the value of the auth record component.
      Returns:
      the value of the auth record component