com.bettercloud.vault.response.LogicalResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vault-java-driver Show documentation
Show all versions of vault-java-driver Show documentation
Zero-dependency Java client for HashiCorp's Vault
package com.bettercloud.vault.response;
import com.bettercloud.vault.rest.RestResponse;
import java.util.HashMap;
import java.util.Map;
/**
* This class is a container for the information returned by Vault in logical API
* operations (e.g. read, write).
*/
public class LogicalResponse extends VaultResponse {
private Map data = new HashMap();
/**
* This constructor simply exposes the common base class constructor.
*
* @param restResponse The raw HTTP response from Vault.
* @param retries The number of retry attempts that occurred during the API call (can be zero).
*/
public LogicalResponse(final RestResponse restResponse, final int retries) {
super(restResponse, retries);
}
/**
* This constructor also takes all of the values read by a Vault read operation.
*
* @param restResponse The raw HTTP response from Vault.
* @param retries The number of retry attempts that occurred during the API call (can be zero).
* @param data All name/value pairs found in the data
section of a Vault read operation response.
*/
public LogicalResponse(
final RestResponse restResponse,
final int retries,
final Map data
) {
super(restResponse, retries);
this.data.putAll(data);
}
public Map getData() {
return data;
}
@Deprecated
public void setData(final Map data) {
this.data = data;
}
}