Skip to content

Commit 6315c0f

Browse files
committed
add serializable to some classes for use in jenkins etc.
1 parent 671d5c8 commit 6315c0f

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

src/main/java/com/bettercloud/vault/VaultConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.io.IOException;
77
import java.io.InputStream;
88
import java.io.InputStreamReader;
9+
import java.io.Serializable;
910
import java.nio.file.Files;
1011
import java.nio.file.Paths;
1112

@@ -38,13 +39,13 @@
3839
* <p>Note that when using the shorthand convenience constructor, you should NOT set additional properties on the
3940
* same instance afterward.</p>
4041
*/
41-
public class VaultConfig {
42+
public class VaultConfig implements Serializable {
4243

4344
/**
4445
* <p>The code used to load environment variables is encapsulated within an inner class,
4546
* so that a mock version of that environment loader can be used by unit tests.</p>
4647
*/
47-
static class EnvironmentLoader {
48+
static class EnvironmentLoader implements Serializable {
4849
public String loadVariable(final String name) {
4950
String value = null;
5051
if ("VAULT_TOKEN".equals(name)) {

src/main/java/com/bettercloud/vault/api/Auth.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.bettercloud.vault.rest.RestResponse;
1111
import com.bettercloud.vault.rest.Rest;
1212

13+
import java.io.Serializable;
1314
import java.io.UnsupportedEncodingException;
1415
import java.util.ArrayList;
1516
import java.util.List;
@@ -29,7 +30,7 @@ public class Auth {
2930
*
3031
* <p>All properties are optional and can be <code>null</code>.</p>
3132
*/
32-
public static class TokenRequest {
33+
public static class TokenRequest implements Serializable {
3334
/**
3435
* (optional) The ID of the client token. Can only be specified by a root token. Otherwise, the token ID is a randomly generated UUID.
3536
*/

src/main/java/com/bettercloud/vault/api/pki/Credential.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.bettercloud.vault.api.pki;
22

3+
import java.io.Serializable;
34
import java.util.List;
45

56
/**
@@ -18,7 +19,7 @@
1819
* }</pre>
1920
* </blockquote>
2021
*/
21-
public class Credential {
22+
public class Credential implements Serializable {
2223

2324
private String certificate;
2425
private String issuingCa;

src/main/java/com/bettercloud/vault/api/pki/RoleOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.bettercloud.vault.api.pki;
22

3+
import java.io.Serializable;
34
import java.util.ArrayList;
45
import java.util.List;
56

@@ -16,7 +17,7 @@
1617
* }</pre>
1718
* </blockquote>
1819
*/
19-
public class RoleOptions {
20+
public class RoleOptions implements Serializable {
2021

2122
private String ttl;
2223
private String maxTtl;

src/main/java/com/bettercloud/vault/response/HealthResponse.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
import com.bettercloud.vault.json.JsonObject;
66
import com.bettercloud.vault.rest.RestResponse;
77

8+
import java.io.Serializable;
9+
810
/**
911
* This class is a container for the information returned by Vault in <code>v1/sys/health</code>
1012
* operations.
1113
*/
12-
public class HealthResponse {
14+
public class HealthResponse implements Serializable {
1315

1416
private RestResponse restResponse;
1517
private int retries;

src/main/java/com/bettercloud/vault/response/VaultResponse.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.bettercloud.vault.json.Json;
44
import com.bettercloud.vault.rest.RestResponse;
55

6+
import java.io.Serializable;
7+
68
/**
79
* <p><code>VaultResponse</code> is a common base class for the response objects returned by
810
* all API methods. It contains the bare minimum of information common to all Vault
@@ -15,7 +17,7 @@
1517
* So the next major release will implement those fields directly in the subclasses where they're
1618
* used.
1719
*/
18-
public class VaultResponse {
20+
public class VaultResponse implements Serializable {
1921

2022
private RestResponse restResponse;
2123
private int retries;

src/main/java/com/bettercloud/vault/rest/RestResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package com.bettercloud.vault.rest;
22

3+
import java.io.Serializable;
34
import java.util.Arrays;
45

56
/**
67
* This class contains the metadata and data that was downloaded by <code>Rest</code>
78
* from an HTTP response.
89
*/
9-
public class RestResponse {
10+
public class RestResponse implements Serializable {
1011

1112
private int status;
1213
private String mimeType;

0 commit comments

Comments
 (0)