Class VaultResponseSupport<T>
java.lang.Object
org.springframework.vault.support.VaultResponseSupport<T>
- Type Parameters:
T
- type fordata
response.
- Direct Known Subclasses:
VaultCertificateResponse
,VaultResponse
,VaultSignCertificateRequestResponse
Value object to bind generic Vault HTTP API responses.
- Author:
- Spencer Gibb, Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAuth()
getData()
long
boolean
void
void
void
setLeaseDuration
(long leaseDuration) void
setLeaseId
(String leaseId) void
setMetadata
(Map<String, Object> metadata) void
setRenewable
(boolean renewable) void
setRequestId
(String requestId) void
setWarnings
(List<String> warnings) void
setWrapInfo
(Map<String, String> wrapInfo)
-
Constructor Details
-
VaultResponseSupport
public VaultResponseSupport()
-
-
Method Details
-
getAuth
- Returns:
- authentication payload.
-
getRequiredAuth
- Returns:
- the authentication payload.
- Throws:
IllegalStateException
- ifauth
is null.
-
setAuth
- Parameters:
auth
- the authentication payload.
-
getData
- Returns:
- secret data.
-
getRequiredData
- Returns:
- the required secret data.
- Throws:
IllegalStateException
- ifdata
is null.
-
setData
- Parameters:
data
- secret data.
-
getMetadata
- Returns:
- request metadata.
-
setMetadata
- Parameters:
metadata
- request metadata.
-
getLeaseDuration
public long getLeaseDuration()- Returns:
- the lease duration.
-
setLeaseDuration
public void setLeaseDuration(long leaseDuration) - Parameters:
leaseDuration
- the lease duration.
-
getLeaseId
- Returns:
- the lease Id.
-
setLeaseId
- 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
- Returns:
- response wrapping details.
-
setWrapInfo
- Parameters:
wrapInfo
- response wrapping details.
-
getRequestId
- Returns:
- the request Id.
-
setRequestId
- Parameters:
requestId
- the request Id.
-
getWarnings
- Returns:
- the warnings.
-
setWarnings
- Parameters:
warnings
- the warnings.
-