Module de.stklcode.jvault.connector
Class SecretResponse
java.lang.Object
de.stklcode.jvault.connector.model.response.VaultDataResponse
de.stklcode.jvault.connector.model.response.SecretResponse
- All Implemented Interfaces:
VaultResponse
- Direct Known Subclasses:
CredentialsResponse
Vault response for secret request.
- Since:
- 0.1
- Author:
- Stefan Kalscheuer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
Get a single value for given key.final <T> T
Get response parsed as JSON.getData()
Get complete data object.final VersionMetadata
Get secret metadata.final void
Set data.Methods inherited from class de.stklcode.jvault.connector.model.response.VaultDataResponse
getLeaseDuration, getLeaseId, getWarnings, isRenewable
-
Constructor Details
-
SecretResponse
public SecretResponse()
-
-
Method Details
-
setData
Description copied from class:VaultDataResponse
Set data. To be implemented in the specific subclasses, as data can be of arbitrary structure.- Specified by:
setData
in classVaultDataResponse
- Parameters:
data
- Raw response data- Throws:
InvalidResponseException
- on parsing errors
-
getData
Get complete data object.- Returns:
- data map
- Since:
- 0.4.0
-
getMetadata
Get secret metadata. This is only available for KV v2 secrets.- Returns:
- Metadata of the secret.
- Since:
- 0.8
-
get
Get a single value for given key.- Parameters:
key
- the key- Returns:
- the value or
null
if absent - Since:
- 0.4.0
-
get
Get response parsed as JSON.- Type Parameters:
T
- Class to parse response- Parameters:
key
- the keytype
- Class to parse response- Returns:
- Parsed object or
null
if absent - Throws:
InvalidResponseException
- on parsing error- Since:
- 0.4.0
-