Class VaultResponseSupport<T>
java.lang.Object
org.springframework.vault.support.VaultResponseSupport<T>
- Type Parameters:
T
- type fordata
response.
- Direct Known Subclasses:
VaultCertificateResponse
,VaultIssuerCertificateRequestResponse
,VaultResponse
,VaultSignCertificateRequestResponse
Value object to bind generic Vault HTTP API responses.
- Author:
- Spencer Gibb, Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyMetadata
(VaultResponseSupport<?> other) Apply metadata such as auth or warnings without copying data.getAuth()
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
-
applyMetadata
Apply metadata such as auth or warnings without copying data.- Parameters:
other
-- Since:
- 3.1
-
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.
-