From 378ec93e7d5fe21d3ae535e8962543a135db6c03 Mon Sep 17 00:00:00 2001 From: Sameeksha Vaity Date: Fri, 26 Jul 2019 10:11:47 -0700 Subject: [PATCH] adding withResponse in sync client --- .../security/keyvault/secrets/SecretClient.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java index 2894982afc1a8..20a8fb1d71c3f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java +++ b/sdk/keyvault/azure-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretClient.java @@ -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(); } /** @@ -152,7 +152,7 @@ public Response 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(); } /** @@ -230,7 +230,7 @@ public Response 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(); } /** @@ -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(); } /** @@ -286,7 +286,7 @@ public Response 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(); } /** @@ -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(); } /** @@ -399,7 +399,7 @@ public Response 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(); } /** @@ -435,7 +435,7 @@ public Response 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(); } /**