Skip to content

Commit

Permalink
adding withResponse in sync client
Browse files Browse the repository at this point in the history
  • Loading branch information
samvaity committed Jul 26, 2019
1 parent cc610fb commit 378ec93
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Secret setSecret(Secret secret) {
* @return The {@link Secret created secret}.
*/
public Secret setSecret(String name, String value) {
return client.setSecret(name, value, Context.NONE).block().value();
return this.setSecretWithResponse(name, value, Context.NONE).value();
}

/**
Expand Down Expand Up @@ -152,7 +152,7 @@ public Response<Secret> getSecretWithResponse(SecretBase secretBase, Context con
* @return The requested {@link Secret secret}.
*/
public Secret getSecret(SecretBase secretBase) {
return client.getSecret(secretBase, Context.NONE).block().value();
return this.getSecretWithResponse(secretBase, Context.NONE).value();
}

/**
Expand Down Expand Up @@ -230,7 +230,7 @@ public Response<SecretBase> updateSecretWithResponse(SecretBase secret, Context
* @return The {@link SecretBase updated secret}.
*/
public SecretBase updateSecret(SecretBase secret) {
return client.updateSecret(secret, Context.NONE).block().value();
return this.updateSecretWithResponse(secret, Context.NONE).value();
}

/**
Expand All @@ -248,7 +248,7 @@ public SecretBase updateSecret(SecretBase secret) {
* @return A {@link Response} whose {@link Response#value() value} contains the {@link DeletedSecret deleted secret}.
*/
public DeletedSecret deleteSecret(String name) {
return client.deleteSecret(name, Context.NONE).block().value();
return this.deleteSecretWithResponse(name, Context.NONE).value();
}

/**
Expand Down Expand Up @@ -286,7 +286,7 @@ public Response<DeletedSecret> deleteSecretWithResponse(String name, Context con
* @return The {@link DeletedSecret deleted secret}.
*/
public DeletedSecret getDeletedSecret(String name) {
return client.getDeletedSecret(name, Context.NONE).block().value();
return this.getDeletedSecretWithResponse(name, Context.NONE).value();
}

/**
Expand Down Expand Up @@ -362,7 +362,7 @@ public VoidResponse purgeDeletedSecret(String name, Context context) {
* @return The {@link Secret recovered secret}.
*/
public Secret recoverDeletedSecret(String name) {
return client.recoverDeletedSecret(name, Context.NONE).block().value();
return this.recoverDeletedSecretWithResponse(name, Context.NONE).value();
}

/**
Expand Down Expand Up @@ -399,7 +399,7 @@ public Response<Secret> recoverDeletedSecretWithResponse(String name, Context co
* @return A {@link Response} whose {@link Response#value() value} contains the backed up secret blob.
*/
public byte[] backupSecret(String name) {
return client.backupSecret(name, Context.NONE).block().value();
return this.backupSecretWithResponse(name, Context.NONE).value();
}

/**
Expand Down Expand Up @@ -435,7 +435,7 @@ public Response<byte[]> backupSecretWithResponse(String name, Context context) {
* @return A {@link Response} whose {@link Response#value() value} contains the {@link Secret restored secret}.
*/
public Secret restoreSecret(byte[] backup) {
return client.restoreSecret(backup, Context.NONE).block().value();
return this.restoreSecretWithResponse(backup, Context.NONE).value();
}

/**
Expand Down

0 comments on commit 378ec93

Please sign in to comment.