Class AbstractVaultResponse<T>

java.lang.Object
io.micronaut.discovery.vault.config.AbstractVaultResponse<T>
Type Parameters:
T - type of the data
Direct Known Subclasses:
VaultResponseV1, VaultResponseV2

public abstract class AbstractVaultResponse<T> extends Object
Vault Response Envelope.
Since:
1.2.0
Author:
thiagolocatelli
  • Field Details

    • data

      protected T data
    • leaseDuration

      protected Long leaseDuration
    • leaseId

      protected String leaseId
    • requestId

      protected String requestId
    • wrapInfo

      protected Map<String,String> wrapInfo
    • renewable

      protected boolean renewable
    • warnings

      protected List<String> warnings
  • Constructor Details

    • AbstractVaultResponse

      public AbstractVaultResponse(T data, Long leaseDuration, String leaseId, String requestId, Map<String,String> wrapInfo, boolean renewable, List<String> warnings)
      Constructor for AbstractVaultResponse.
      Parameters:
      data - The data object
      leaseDuration - The token lease duration
      leaseId - The token lease id
      requestId - The vault request id
      wrapInfo - The wrap info object
      renewable - The flag indicating the vault token is renewable
      warnings - The list of warnings
  • Method Details

    • getSecrets

      public abstract Map<String,Object> getSecrets()
      Returns:
      The data object
    • getData

      public T getData()
      Returns:
      The data
    • setData

      public void setData(T data)
      Set the data object.
      Parameters:
      data - the data object
    • getLeaseDuration

      public Long getLeaseDuration()
      Returns:
      The token lease duration
    • setLeaseDuration

      public void setLeaseDuration(Long leaseDuration)
      Set the token lease duration.
      Parameters:
      leaseDuration - token lease duration
    • getLeaseId

      public String getLeaseId()
      Returns:
      The token lease id
    • setLeaseId

      public void setLeaseId(String leaseId)
      Set the token release id.
      Parameters:
      leaseId - token release id
    • getRequestId

      public String getRequestId()
      Returns:
      The vault request id
    • setRequestId

      public void setRequestId(String requestId)
      Set the vault request id.
      Parameters:
      requestId - vault request id
    • getWrapInfo

      public Map<String,String> getWrapInfo()
      Returns:
      The wrap info object
    • setWrapInfo

      public void setWrapInfo(Map<String,String> wrapInfo)
      Set the wrap info object.
      Parameters:
      wrapInfo - wrap info object
    • isRenewable

      public boolean isRenewable()
      Returns:
      The flag indicating the vault token is renewable
    • setRenewable

      public void setRenewable(boolean renewable)
      Set the flag indicating the vault token is renewable.
      Parameters:
      renewable - flag indicating the vault token is renewable
    • getWarnings

      public List<String> getWarnings()
      Returns:
      List of warning
    • setWarnings

      public void setWarnings(List<String> warnings)
      Set the list of warnings.
      Parameters:
      warnings - list of warning