Class VaultResponseSupport<T>

java.lang.Object
org.springframework.vault.support.VaultResponseSupport<T>
Type Parameters:
T - type for data response.
Direct Known Subclasses:
VaultCertificateResponse, VaultResponse, VaultSignCertificateRequestResponse

public class VaultResponseSupport<T> extends Object
Value object to bind generic Vault HTTP API responses.
Author:
Spencer Gibb, Mark Paluch
  • Constructor Details

    • VaultResponseSupport

      public VaultResponseSupport()
  • Method Details

    • getAuth

      @Nullable public Map<String,Object> getAuth()
      Returns:
      authentication payload.
    • getRequiredAuth

      public Map<String,Object> getRequiredAuth()
      Returns:
      the authentication payload.
      Throws:
      IllegalStateException - if auth is null.
    • setAuth

      public void setAuth(@Nullable Map<String,Object> auth)
      Parameters:
      auth - the authentication payload.
    • getData

      @Nullable public T getData()
      Returns:
      secret data.
    • getRequiredData

      public T getRequiredData()
      Returns:
      the required secret data.
      Throws:
      IllegalStateException - if data is null.
    • setData

      public void setData(@Nullable T data)
      Parameters:
      data - secret data.
    • getMetadata

      @Nullable public Map<String,Object> getMetadata()
      Returns:
      request metadata.
    • setMetadata

      public void setMetadata(@Nullable Map<String,Object> metadata)
      Parameters:
      metadata - request metadata.
    • getLeaseDuration

      public long getLeaseDuration()
      Returns:
      the lease duration.
    • setLeaseDuration

      public void setLeaseDuration(long leaseDuration)
      Parameters:
      leaseDuration - the lease duration.
    • getLeaseId

      @Nullable public String getLeaseId()
      Returns:
      the lease Id.
    • setLeaseId

      public void setLeaseId(@Nullable String leaseId)
      Parameters:
      leaseId - the lease Id.
    • isRenewable

      public boolean isRenewable()
      Returns:
      true if the lease is renewable.
    • setRenewable

      public void setRenewable(boolean renewable)
      Parameters:
      renewable - true if the lease is renewable.
    • getWrapInfo

      @Nullable public Map<String,String> getWrapInfo()
      Returns:
      response wrapping details.
    • setWrapInfo

      public void setWrapInfo(@Nullable Map<String,String> wrapInfo)
      Parameters:
      wrapInfo - response wrapping details.
    • getRequestId

      @Nullable public String getRequestId()
      Returns:
      the request Id.
    • setRequestId

      public void setRequestId(@Nullable String requestId)
      Parameters:
      requestId - the request Id.
    • getWarnings

      @Nullable public List<String> getWarnings()
      Returns:
      the warnings.
    • setWarnings

      public void setWarnings(@Nullable List<String> warnings)
      Parameters:
      warnings - the warnings.