public class SecretResponse extends VaultDataResponse
Constructor and Description |
---|
SecretResponse() |
Modifier and Type | Method and Description |
---|---|
Object |
get(String key)
Get a single value for given key.
|
<T> T |
get(String key,
Class<T> type)
Get response parsed as JSON
|
Map<String,Object> |
getData()
Get complete data object.
|
String |
getValue()
Get data element for key "value".
|
<T> T |
getValue(Class<T> type)
Get response parsed as JSON
|
void |
setData(Map<String,Object> data) |
getLeaseDuration, getLeaseId, getWarnings, isRenewable
public void setData(Map<String,Object> data) throws InvalidResponseException
setData
in class VaultDataResponse
InvalidResponseException
public Map<String,Object> getData()
public Object get(String key)
key
- the keypublic String getValue()
public <T> T getValue(Class<T> type) throws InvalidResponseException
T
- Class to parse responsetype
- Class to parse responseInvalidResponseException
- on parsing errorpublic <T> T get(String key, Class<T> type) throws InvalidResponseException
T
- Class to parse responsekey
- the keytype
- Class to parse responseInvalidResponseException
- on parsing errorCopyright © 2016. All rights reserved.