public class SecretDocument extends Object
SecretDocument
is basically an object with an id
and a body
represented as Map
of String
and Object
. It can be created
from
an Id and
VaultResponse
.
A secret document can hold simple properties, list
properties and nested objects as Map
s.
Constructor and Description |
---|
SecretDocument()
Create a new, empty
SecretDocument . |
SecretDocument(Map<String,Object> body)
Create a new
SecretDocument given a body map . |
SecretDocument(String id) |
SecretDocument(String id,
Map<String,Object> body)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static SecretDocument |
from(String id,
VaultResponse vaultResponse)
|
Object |
get(String key)
Retrieve a value from the secret document by its
key . |
Map<String,Object> |
getBody() |
String |
getId() |
int |
hashCode() |
void |
put(String key,
Object value)
Set a value in the secret document.
|
void |
setId(String id)
Set the Id.
|
String |
toString() |
public SecretDocument()
SecretDocument
.public SecretDocument(Map<String,Object> body)
SecretDocument
given a body map
.body
- must not be null.public SecretDocument(@Nullable String id, Map<String,Object> body)
id
- may be null.body
- must not be null.public SecretDocument(String id)
public static SecretDocument from(@Nullable String id, VaultResponse vaultResponse)
id
- must not be null.vaultResponse
- must not be null.SecretDocument
.@Nullable public String getId()
public void setId(@Nullable String id)
id
- may be null.public Map<String,Object> getBody()
SecretDocument
@Nullable public Object get(String key)
key
.key
- must not be null.public void put(String key, Object value)
key
- must not be null.value
- must not be null.Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.