diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/CHANGELOG.md b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/CHANGELOG.md
index f6230465e9620..e9dcb3a93ec0d 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/CHANGELOG.md
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-04-05)
+- Azure Resource Manager RecoveryServices client library for Java. This package contains Microsoft Azure SDK for RecoveryServices Management SDK. Recovery Services Client. Package tag package-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2020-12-18)
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/README.md b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/README.md
index 1520bad97953e..0b489b8c283a0 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/README.md
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/README.md
@@ -2,7 +2,21 @@
Azure Resource Manager RecoveryServices client library for Java.
-This package contains Microsoft Azure SDK for RecoveryServices Management SDK. Recovery Services Client. Package tag package-2016-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for RecoveryServices Management SDK. Recovery Services Client. Package tag package-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
## Getting started
@@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for RecoveryServices Management SDK. R
com.azure.resourcemanager
azure-resourcemanager-recoveryservices
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -60,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/recoveryservices/azure-resourcemanager-recoveryservices/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
@@ -75,6 +92,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/SAMPLE.md b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/SAMPLE.md
new file mode 100644
index 0000000000000..a7341803da6c3
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/SAMPLE.md
@@ -0,0 +1,769 @@
+# Code snippets and samples
+
+
+## Operations
+
+- [List](#operations_list)
+
+## PrivateLinkResourcesOperation
+
+- [Get](#privatelinkresourcesoperation_get)
+- [List](#privatelinkresourcesoperation_list)
+
+## RecoveryServices
+
+- [CheckNameAvailability](#recoveryservices_checknameavailability)
+
+## RegisteredIdentities
+
+- [Delete](#registeredidentities_delete)
+
+## ReplicationUsages
+
+- [List](#replicationusages_list)
+
+## ResourceProvider
+
+- [GetOperationResult](#resourceprovider_getoperationresult)
+- [GetOperationStatus](#resourceprovider_getoperationstatus)
+
+## Usages
+
+- [ListByVaults](#usages_listbyvaults)
+
+## VaultCertificates
+
+- [Create](#vaultcertificates_create)
+
+## VaultExtendedInfo
+
+- [CreateOrUpdate](#vaultextendedinfo_createorupdate)
+- [Get](#vaultextendedinfo_get)
+- [Update](#vaultextendedinfo_update)
+
+## Vaults
+
+- [CreateOrUpdate](#vaults_createorupdate)
+- [Delete](#vaults_delete)
+- [GetByResourceGroup](#vaults_getbyresourcegroup)
+- [List](#vaults_list)
+- [ListByResourceGroup](#vaults_listbyresourcegroup)
+- [Update](#vaults_update)
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/ListOperations.json
+ */
+ /**
+ * Sample code: ListOperations.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void listOperations(com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResourcesOperation_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResourcesOperation Get. */
+public final class PrivateLinkResourcesOperationGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/GetPrivateLinkResources.json
+ */
+ /**
+ * Sample code: Get PrivateLinkResource.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getPrivateLinkResource(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .privateLinkResourcesOperations()
+ .getWithResponse("petesting", "pemsi-ecy-rsv2", "backupResource", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResourcesOperation_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResourcesOperation List. */
+public final class PrivateLinkResourcesOperationListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/ListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: List PrivateLinkResources.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void listPrivateLinkResources(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.privateLinkResourcesOperations().list("petesting", "pemsi-ecy-rsv2", Context.NONE);
+ }
+}
+```
+
+### RecoveryServices_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservices.models.CheckNameAvailabilityParameters;
+
+/** Samples for RecoveryServices CheckNameAvailability. */
+public final class RecoveryServicesCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/CheckNameAvailability_Available.json
+ */
+ /**
+ * Sample code: Availability status of Resource Name when no resource with same name, type and subscription exists,
+ * nor has been deleted within last 24 hours.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void
+ availabilityStatusOfResourceNameWhenNoResourceWithSameNameTypeAndSubscriptionExistsNorHasBeenDeletedWithinLast24Hours(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .recoveryServices()
+ .checkNameAvailabilityWithResponse(
+ "resGroupFoo",
+ "westus",
+ new CheckNameAvailabilityParameters()
+ .withType("Microsoft.RecoveryServices/Vaults")
+ .withName("swaggerExample"),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/CheckNameAvailability_NotAvailable.json
+ */
+ /**
+ * Sample code: Availability status of Resource Name when resource with same name, type and subscription exists.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void availabilityStatusOfResourceNameWhenResourceWithSameNameTypeAndSubscriptionExists(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .recoveryServices()
+ .checkNameAvailabilityWithResponse(
+ "resGroupBar",
+ "westus",
+ new CheckNameAvailabilityParameters()
+ .withType("Microsoft.RecoveryServices/Vaults")
+ .withName("swaggerExample2"),
+ Context.NONE);
+ }
+}
+```
+
+### RegisteredIdentities_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RegisteredIdentities Delete. */
+public final class RegisteredIdentitiesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/DeleteRegisteredIdentities.json
+ */
+ /**
+ * Sample code: Delete registered Identity.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void deleteRegisteredIdentity(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.registeredIdentities().deleteWithResponse("BCDRIbzRG", "BCDRIbzVault", "dpmcontainer01", Context.NONE);
+ }
+}
+```
+
+### ReplicationUsages_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ReplicationUsages List. */
+public final class ReplicationUsagesListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/ListReplicationUsages.json
+ */
+ /**
+ * Sample code: Gets Replication usages of vault.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getsReplicationUsagesOfVault(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.replicationUsages().list("avrai7517RG1", "avrai7517Vault1", Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_GetOperationResult
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceProvider GetOperationResult. */
+public final class ResourceProviderGetOperationResultSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/GetOperationResult.json
+ */
+ /**
+ * Sample code: Get Operation Result.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getOperationResult(com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .resourceProviders()
+ .getOperationResultWithResponse(
+ "HelloWorld",
+ "swaggerExample",
+ "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==",
+ Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_GetOperationStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceProvider GetOperationStatus. */
+public final class ResourceProviderGetOperationStatusSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/GetOperationStatus.json
+ */
+ /**
+ * Sample code: Get Operation Status.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getOperationStatus(com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .resourceProviders()
+ .getOperationStatusWithResponse(
+ "HelloWorld",
+ "swaggerExample",
+ "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==",
+ Context.NONE);
+ }
+}
+```
+
+### Usages_ListByVaults
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Usages ListByVaults. */
+public final class UsagesListByVaultsSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/ListUsages.json
+ */
+ /**
+ * Sample code: Gets vault usages.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getsVaultUsages(com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.usages().listByVaults("Default-RecoveryServices-ResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### VaultCertificates_Create
+
+```java
+import com.azure.resourcemanager.recoveryservices.models.AuthType;
+import com.azure.resourcemanager.recoveryservices.models.RawCertificateData;
+
+/** Samples for VaultCertificates Create. */
+public final class VaultCertificatesCreateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PUTVaultCred.json
+ */
+ /**
+ * Sample code: Download vault credential file.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void downloadVaultCredentialFile(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaultCertificates()
+ .define("BCDRIbzVault77777777-d41f-4550-9f70-7708a3a2283b-12-18-2017-vaultcredentials")
+ .withExistingVault("BCDRIbzRG", "BCDRIbzVault")
+ .withProperties(
+ new RawCertificateData()
+ .withAuthType(AuthType.AAD)
+ .withCertificate(
+ "MTTC3TCCAcWgAwIBAgIQEj9h+ZLlXK9KrqZX9UkAnzANBgkqhkiG9w0BAQUFADAeMRwwGgYDVQQDExNXaW5kb3dzIEF6dXJlIFRvb2xzMB4XDTE3MTIxODA5MTc1M1oXDTE3MTIyMzA5Mjc1M1owHjEcMBoGA1UEAxMTV2luZG93cyBBenVyZSBUb29sczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK773/eZZ69RbZZAT05r9MjUxu9y1L1Pn1EgPk62IPJyHlO3OZA922eSBahhP4bgmFljN4LVReqQ5eT/wqO0Zhc+yFkUy4U4RdbQLeUZt2W7yy9XLXgVvqeYDgsjg/QhHetgHArQBW+tlQq5+zPdU7zchI4rbShSJrWhLrZFWiOyFPsuAE4joUQHNlRifdCTsBGKk8HRCY3j1S3c4bfEn3zxlrvrXXssRuW5mJM95rMk0tskoRxXSCi6i9bnlki2Cs9mpVMmBFeofs41KwzlWU0TgpdD8s1QEdvfGB5NbByfetPX7MfJaTBeHZEGbv/Iq8l72u8sPBoOhcaH7qDE/mECAwEAAaMXMBUwEwYDVR0lBAwwCgYIKwYBBQUHAwIwDQYJKoZIhvcNAQEFBQADggEBAILfgHluye1Q+WelhgWhpBBdIq2C0btfV8eFsZaTlBUrM0fwpxQSlAWc2oYHVMQI4A5iUjbDOY35O4yc+TnWKDBKf+laqDP+yos4aiUPuadGUZfvDk7kuw7xeECs64JpHAIEKdRHFW9rD3gwG+nIWaDnEL/7rTyhL3kXrRW2MSUAL8g3GX8Z45c+MQY0jmASIqWdhGn1vpAGyA9mKkzsqg7FXjg8GZb24tGl5Ky85+ip4dkBfXinDD8WwaGyjhGGK97ErvNmN36qly/H0H1Qngiovg1FbHDmkcFO5QclnEJsFFmcO2CcHp5Fqh2wXn5O1cQaxCIRTpQ/uXRpDjl2wKs="
+ .getBytes()))
+ .create();
+ }
+}
+```
+
+### VaultExtendedInfo_CreateOrUpdate
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VaultExtendedInfo CreateOrUpdate. */
+public final class VaultExtendedInfoCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/UpdateVaultExtendedInfo.json
+ */
+ /**
+ * Sample code: Put ExtendedInfo of Resource.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void putExtendedInfoOfResource(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaultExtendedInfoes()
+ .createOrUpdateWithResponse("Default-RecoveryServices-ResourceGroup", "swaggerExample", null, Context.NONE);
+ }
+}
+```
+
+### VaultExtendedInfo_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VaultExtendedInfo Get. */
+public final class VaultExtendedInfoGetSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/GETVaultExtendedInfo.json
+ */
+ /**
+ * Sample code: Get ExtendedInfo of Resource.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getExtendedInfoOfResource(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaultExtendedInfoes()
+ .getWithResponse("Default-RecoveryServices-ResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### VaultExtendedInfo_Update
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for VaultExtendedInfo Update. */
+public final class VaultExtendedInfoUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/UpdateVaultExtendedInfo.json
+ */
+ /**
+ * Sample code: PATCH ExtendedInfo of Resource.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void pATCHExtendedInfoOfResource(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaultExtendedInfoes()
+ .updateWithResponse("Default-RecoveryServices-ResourceGroup", "swaggerExample", null, Context.NONE);
+ }
+}
+```
+
+### Vaults_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.recoveryservices.models.CmkKekIdentity;
+import com.azure.resourcemanager.recoveryservices.models.CmkKeyVaultProperties;
+import com.azure.resourcemanager.recoveryservices.models.IdentityData;
+import com.azure.resourcemanager.recoveryservices.models.InfrastructureEncryptionState;
+import com.azure.resourcemanager.recoveryservices.models.ResourceIdentityType;
+import com.azure.resourcemanager.recoveryservices.models.Sku;
+import com.azure.resourcemanager.recoveryservices.models.SkuName;
+import com.azure.resourcemanager.recoveryservices.models.UserIdentity;
+import com.azure.resourcemanager.recoveryservices.models.VaultProperties;
+import com.azure.resourcemanager.recoveryservices.models.VaultPropertiesEncryption;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Vaults CreateOrUpdate. */
+public final class VaultsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PUTVault_WithCMK.json
+ */
+ /**
+ * Sample code: Create or Update Vault with CustomerManagedKeys.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void createOrUpdateVaultWithCustomerManagedKeys(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaults()
+ .define("swaggerExample")
+ .withRegion("West US")
+ .withExistingResourceGroup("Default-RecoveryServices-ResourceGroup")
+ .withIdentity(
+ new IdentityData()
+ .withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
+ new UserIdentity())))
+ .withProperties(
+ new VaultProperties()
+ .withEncryption(
+ new VaultPropertiesEncryption()
+ .withKeyVaultProperties(
+ new CmkKeyVaultProperties()
+ .withKeyUri(
+ "https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"))
+ .withKekIdentity(
+ new CmkKekIdentity()
+ .withUserAssignedIdentity(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"))
+ .withInfrastructureEncryption(InfrastructureEncryptionState.ENABLED)))
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PUTVault.json
+ */
+ /**
+ * Sample code: Create or Update Recovery Services vault.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void createOrUpdateRecoveryServicesVault(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaults()
+ .define("swaggerExample")
+ .withRegion("West US")
+ .withExistingResourceGroup("Default-RecoveryServices-ResourceGroup")
+ .withIdentity(new IdentityData().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(new VaultProperties())
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PUTVault_WithUserAssignedIdentity.json
+ */
+ /**
+ * Sample code: Create or Update Vault with User Assigned Identity.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void createOrUpdateVaultWithUserAssignedIdentity(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaults()
+ .define("swaggerExample")
+ .withRegion("West US")
+ .withExistingResourceGroup("Default-RecoveryServices-ResourceGroup")
+ .withIdentity(
+ new IdentityData()
+ .withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
+ new UserIdentity())))
+ .withProperties(new VaultProperties())
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Vaults_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Vaults Delete. */
+public final class VaultsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/DeleteVault.json
+ */
+ /**
+ * Sample code: Delete Recovery Services Vault.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void deleteRecoveryServicesVault(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.vaults().deleteWithResponse("Default-RecoveryServices-ResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### Vaults_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Vaults GetByResourceGroup. */
+public final class VaultsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/GETVault.json
+ */
+ /**
+ * Sample code: Get Recovery Services Resource.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void getRecoveryServicesResource(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager
+ .vaults()
+ .getByResourceGroupWithResponse("Default-RecoveryServices-ResourceGroup", "swaggerExample", Context.NONE);
+ }
+}
+```
+
+### Vaults_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Vaults List. */
+public final class VaultsListSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/ListBySubscriptionIds.json
+ */
+ /**
+ * Sample code: List of Recovery Services Resources in SubscriptionId.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void listOfRecoveryServicesResourcesInSubscriptionId(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.vaults().list(Context.NONE);
+ }
+}
+```
+
+### Vaults_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Vaults ListByResourceGroup. */
+public final class VaultsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/ListResources.json
+ */
+ /**
+ * Sample code: List of Recovery Services Resources in ResourceGroup.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void listOfRecoveryServicesResourcesInResourceGroup(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ manager.vaults().listByResourceGroup("Default-RecoveryServices-ResourceGroup", Context.NONE);
+ }
+}
+```
+
+### Vaults_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservices.models.CmkKekIdentity;
+import com.azure.resourcemanager.recoveryservices.models.CmkKeyVaultProperties;
+import com.azure.resourcemanager.recoveryservices.models.IdentityData;
+import com.azure.resourcemanager.recoveryservices.models.InfrastructureEncryptionState;
+import com.azure.resourcemanager.recoveryservices.models.ResourceIdentityType;
+import com.azure.resourcemanager.recoveryservices.models.UserIdentity;
+import com.azure.resourcemanager.recoveryservices.models.Vault;
+import com.azure.resourcemanager.recoveryservices.models.VaultProperties;
+import com.azure.resourcemanager.recoveryservices.models.VaultPropertiesEncryption;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Vaults Update. */
+public final class VaultsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PATCHVault_WithCMK.json
+ */
+ /**
+ * Sample code: Update Resource With CustomerManagedKeys.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void updateResourceWithCustomerManagedKeys(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ Vault resource =
+ manager.vaults().getByResourceGroupWithResponse("HelloWorld", "swaggerExample", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("PatchKey", "PatchKeyUpdated"))
+ .withProperties(
+ new VaultProperties()
+ .withEncryption(
+ new VaultPropertiesEncryption()
+ .withKeyVaultProperties(
+ new CmkKeyVaultProperties()
+ .withKeyUri(
+ "https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"))
+ .withKekIdentity(
+ new CmkKekIdentity()
+ .withUserAssignedIdentity(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"))
+ .withInfrastructureEncryption(InfrastructureEncryptionState.ENABLED)))
+ .withIdentity(
+ new IdentityData()
+ .withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
+ new UserIdentity())))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PatchVault_WithCMK2.json
+ */
+ /**
+ * Sample code: Update Resource With CustomerManagedKeys2.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void updateResourceWithCustomerManagedKeys2(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ Vault resource =
+ manager.vaults().getByResourceGroupWithResponse("HelloWorld", "swaggerExample", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("PatchKey", "PatchKeyUpdated"))
+ .withProperties(
+ new VaultProperties()
+ .withEncryption(
+ new VaultPropertiesEncryption()
+ .withKekIdentity(new CmkKekIdentity().withUseSystemAssignedIdentity(true))))
+ .withIdentity(new IdentityData().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PATCHVault_WithCMK3.json
+ */
+ /**
+ * Sample code: Update Resource With CustomerManagedKeys3.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void updateResourceWithCustomerManagedKeys3(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ Vault resource =
+ manager.vaults().getByResourceGroupWithResponse("HelloWorld", "swaggerExample", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("PatchKey", "PatchKeyUpdated"))
+ .withProperties(
+ new VaultProperties()
+ .withEncryption(
+ new VaultPropertiesEncryption()
+ .withKeyVaultProperties(
+ new CmkKeyVaultProperties()
+ .withKeyUri(
+ "https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"))))
+ .withIdentity(
+ new IdentityData()
+ .withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
+ new UserIdentity())))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PATCHVault.json
+ */
+ /**
+ * Sample code: Update Resource.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void updateResource(com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ Vault resource =
+ manager.vaults().getByResourceGroupWithResponse("HelloWorld", "swaggerExample", Context.NONE).getValue();
+ resource.update().withTags(mapOf("PatchKey", "PatchKeyUpdated")).apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2022-02-01/examples/PATCHVault_WithUserAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update Resource With User Assigned Identity.
+ *
+ * @param manager Entry point to RecoveryServicesManager.
+ */
+ public static void updateResourceWithUserAssignedIdentity(
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager) {
+ Vault resource =
+ manager.vaults().getByResourceGroupWithResponse("HelloWorld", "swaggerExample", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("PatchKey", "PatchKeyUpdated"))
+ .withIdentity(
+ new IdentityData()
+ .withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
+ new UserIdentity())))
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml
index f3d2e237c6e69..22e93394eeaac 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/pom.xml
@@ -1,50 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-recoveryservices
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-recoveryservices
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for RecoveryServices Management
- This package contains Microsoft Azure SDK for RecoveryServices Management SDK. Recovery Services Client. Package tag package-2016-06. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for RecoveryServices Management
+ This package contains Microsoft Azure SDK for RecoveryServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Recovery Services Client. Package tag package-2022-02.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core-management
- 1.5.4
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.27.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.4
+
+
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/RecoveryServicesManager.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/RecoveryServicesManager.java
index 80e1cac928634..e7c6200c35cbd 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/RecoveryServicesManager.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/RecoveryServicesManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -27,6 +28,7 @@
import com.azure.resourcemanager.recoveryservices.implementation.RecoveryServicesManagementClientBuilder;
import com.azure.resourcemanager.recoveryservices.implementation.RegisteredIdentitiesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.ReplicationUsagesImpl;
+import com.azure.resourcemanager.recoveryservices.implementation.ResourceProvidersImpl;
import com.azure.resourcemanager.recoveryservices.implementation.UsagesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.VaultCertificatesImpl;
import com.azure.resourcemanager.recoveryservices.implementation.VaultExtendedInfoesImpl;
@@ -36,6 +38,7 @@
import com.azure.resourcemanager.recoveryservices.models.RecoveryServices;
import com.azure.resourcemanager.recoveryservices.models.RegisteredIdentities;
import com.azure.resourcemanager.recoveryservices.models.ReplicationUsages;
+import com.azure.resourcemanager.recoveryservices.models.ResourceProviders;
import com.azure.resourcemanager.recoveryservices.models.Usages;
import com.azure.resourcemanager.recoveryservices.models.VaultCertificates;
import com.azure.resourcemanager.recoveryservices.models.VaultExtendedInfoes;
@@ -45,6 +48,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to RecoveryServicesManager. Recovery Services Client. */
public final class RecoveryServicesManager {
@@ -64,6 +68,8 @@ public final class RecoveryServicesManager {
private VaultExtendedInfoes vaultExtendedInfoes;
+ private ResourceProviders resourceProviders;
+
private Usages usages;
private final RecoveryServicesManagementClient clientObject;
@@ -104,11 +110,12 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -148,6 +155,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -166,9 +184,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -184,25 +204,53 @@ public RecoveryServicesManager authenticate(TokenCredential credential, AzurePro
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.recoveryservices")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
- policies
- .add(
- new UserAgentPolicy(
- null,
- "com.azure.resourcemanager.recoveryservices",
- "1.0.0-beta.1",
- Configuration.getGlobalConfiguration()));
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -279,6 +327,14 @@ public VaultExtendedInfoes vaultExtendedInfoes() {
return vaultExtendedInfoes;
}
+ /** @return Resource collection API of ResourceProviders. */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
/** @return Resource collection API of Usages. */
public Usages usages() {
if (this.usages == null) {
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/OperationsClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/OperationsClient.java
index 4bc1a2ee13850..3cae8217116af 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/OperationsClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/PrivateLinkResourcesOperationsClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/PrivateLinkResourcesOperationsClient.java
index aff819a4682f5..123eb4b2d9bad 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/PrivateLinkResourcesOperationsClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/PrivateLinkResourcesOperationsClient.java
@@ -21,7 +21,8 @@ public interface PrivateLinkResourcesOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String vaultName);
@@ -35,7 +36,8 @@ public interface PrivateLinkResourcesOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String vaultName, Context context);
@@ -64,7 +66,7 @@ public interface PrivateLinkResourcesOperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information of the private link resource.
+ * @return information of the private link resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesClient.java
index 5ac1944198278..c24ef8c9f5021 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesClient.java
@@ -42,7 +42,7 @@ CheckNameAvailabilityResultInner checkNameAvailability(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response for check name availability API.
+ * @return response for check name availability API along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkNameAvailabilityWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesManagementClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesManagementClient.java
index e3e15634178d4..40080bea285f1 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesManagementClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RecoveryServicesManagementClient.java
@@ -100,6 +100,13 @@ public interface RecoveryServicesManagementClient {
*/
VaultExtendedInfoesClient getVaultExtendedInfoes();
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
/**
* Gets the UsagesClient object to access its operations.
*
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RegisteredIdentitiesClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RegisteredIdentitiesClient.java
index ee406e13f77bd..07792a5683d39 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RegisteredIdentitiesClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/RegisteredIdentitiesClient.java
@@ -34,7 +34,7 @@ public interface RegisteredIdentitiesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String vaultName, String identityName, Context context);
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ReplicationUsagesClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ReplicationUsagesClient.java
index aad20335ba814..ff9912811c52c 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ReplicationUsagesClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ReplicationUsagesClient.java
@@ -20,7 +20,7 @@ public interface ReplicationUsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String vaultName);
@@ -34,7 +34,7 @@ public interface ReplicationUsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String vaultName, Context context);
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ResourceProvidersClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ResourceProvidersClient.java
new file mode 100644
index 0000000000000..24838c9d99e51
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/ResourceProvidersClient.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.recoveryservices.fluent.models.OperationResourceInner;
+import com.azure.resourcemanager.recoveryservices.fluent.models.VaultInner;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public interface ResourceProvidersClient {
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResourceInner getOperationStatus(String resourceGroupName, String vaultName, String operationId);
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getOperationStatusWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context);
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VaultInner getOperationResult(String resourceGroupName, String vaultName, String operationId);
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getOperationResultWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context);
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/UsagesClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/UsagesClient.java
index ffc34e7d1d6e8..bee86b4348d70 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/UsagesClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/UsagesClient.java
@@ -20,7 +20,7 @@ public interface UsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByVaults(String resourceGroupName, String vaultName);
@@ -34,7 +34,7 @@ public interface UsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByVaults(String resourceGroupName, String vaultName, Context context);
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultCertificatesClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultCertificatesClient.java
index 3c55c10b94702..f236d6f1a3c29 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultCertificatesClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultCertificatesClient.java
@@ -40,7 +40,8 @@ VaultCertificateResponseInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault.
+ * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault
+ * along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultExtendedInfoesClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultExtendedInfoesClient.java
index afb8d2f101285..7b4eb68cc647d 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultExtendedInfoesClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultExtendedInfoesClient.java
@@ -34,7 +34,7 @@ public interface VaultExtendedInfoesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the vault extended info.
+ * @return the vault extended info along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -65,7 +65,7 @@ VaultExtendedInfoResourceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -99,7 +99,7 @@ VaultExtendedInfoResourceInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultsClient.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultsClient.java
index 23dda15b6a603..abd7025996bcb 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultsClient.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/VaultsClient.java
@@ -8,7 +8,9 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultInner;
import com.azure.resourcemanager.recoveryservices.models.PatchVault;
@@ -19,7 +21,7 @@ public interface VaultsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response model for a list of Vaults.
+ * @return the response model for a list of Vaults as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -31,7 +33,7 @@ public interface VaultsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response model for a list of Vaults.
+ * @return the response model for a list of Vaults as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -43,7 +45,7 @@ public interface VaultsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response model for a list of Vaults.
+ * @return the response model for a list of Vaults as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -56,7 +58,7 @@ public interface VaultsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response model for a list of Vaults.
+ * @return the response model for a list of Vaults as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -83,11 +85,42 @@ public interface VaultsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the Vault details.
+ * @return the Vault details along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName, Context context);
+ /**
+ * Creates or updates a Recovery Services vault.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param vault Recovery Services Vault to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information, as returned by the resource provider.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VaultInner> beginCreateOrUpdate(
+ String resourceGroupName, String vaultName, VaultInner vault);
+
+ /**
+ * Creates or updates a Recovery Services vault.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param vault Recovery Services Vault to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information, as returned by the resource provider.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VaultInner> beginCreateOrUpdate(
+ String resourceGroupName, String vaultName, VaultInner vault, Context context);
+
/**
* Creates or updates a Recovery Services vault.
*
@@ -115,8 +148,7 @@ public interface VaultsClient {
* @return resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String resourceGroupName, String vaultName, VaultInner vault, Context context);
+ VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultInner vault, Context context);
/**
* Deletes a vault.
@@ -139,11 +171,42 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(String resourceGroupName, String vaultName, Context context);
+ /**
+ * Updates the vault.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param vault Recovery Services Vault to be created.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information, as returned by the resource provider.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VaultInner> beginUpdate(
+ String resourceGroupName, String vaultName, PatchVault vault);
+
+ /**
+ * Updates the vault.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param vault Recovery Services Vault to be created.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of resource information, as returned by the resource provider.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, VaultInner> beginUpdate(
+ String resourceGroupName, String vaultName, PatchVault vault, Context context);
+
/**
* Updates the vault.
*
@@ -171,6 +234,5 @@ Response createOrUpdateWithResponse(
* @return resource information, as returned by the resource provider.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String vaultName, PatchVault vault, Context context);
+ VaultInner update(String resourceGroupName, String vaultName, PatchVault vault, Context context);
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/CheckNameAvailabilityResultInner.java
index 558d40daf9805..25e75d1f01433 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/CheckNameAvailabilityResultInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/CheckNameAvailabilityResultInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.recoveryservices.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Response for check name availability API. Resource provider will set availability as true | false. */
@Fluent
public final class CheckNameAvailabilityResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResultInner.class);
-
/*
* The nameAvailable property.
*/
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ClientDiscoveryValueForSingleApiInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ClientDiscoveryValueForSingleApiInner.java
index d72d790ef3bc2..f18ea30ea0526 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ClientDiscoveryValueForSingleApiInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ClientDiscoveryValueForSingleApiInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.recoveryservices.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.models.ClientDiscoveryDisplay;
import com.azure.resourcemanager.recoveryservices.models.ClientDiscoveryForProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Available operation details. */
@Fluent
public final class ClientDiscoveryValueForSingleApiInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryValueForSingleApiInner.class);
-
/*
* Name of the Operation.
*/
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/OperationResourceInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/OperationResourceInner.java
new file mode 100644
index 0000000000000..2a0da865e9c99
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/OperationResourceInner.java
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Operation Resource. */
+@Fluent
+public final class OperationResourceInner {
+ /*
+ * End time of the operation
+ */
+ @JsonProperty(value = "endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Required if status == failed or status == canceled. This is the OData v4
+ * error format, used by the RPC and will go into the v2.2 Azure REST API
+ * guidelines.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /*
+ * It should match what is used to GET the operation result
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * It must match the last segment of the "id" field, and will typically be
+ * a GUID / system generated value
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The status of the operation. (InProgress/Success/Failed/Cancelled)
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * Start time of the operation
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /**
+ * Get the endTime property: End time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: End time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the error property: Required if status == failed or status == canceled. This is the OData v4 error format,
+ * used by the RPC and will go into the v2.2 Azure REST API guidelines.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: Required if status == failed or status == canceled. This is the OData v4 error format,
+ * used by the RPC and will go into the v2.2 Azure REST API guidelines.
+ *
+ * @param error the error value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get the id property: It should match what is used to GET the operation result.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: It should match what is used to GET the operation result.
+ *
+ * @param id the id value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: It must match the last segment of the "id" field, and will typically be a GUID / system
+ * generated value.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: It must match the last segment of the "id" field, and will typically be a GUID / system
+ * generated value.
+ *
+ * @param name the name value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the operation. (InProgress/Success/Failed/Cancelled).
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status of the operation. (InProgress/Success/Failed/Cancelled).
+ *
+ * @param status the status value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: Start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceInner.java
index 2b62e074729b1..947782f48cb54 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceInner.java
@@ -4,18 +4,18 @@
package com.azure.resourcemanager.recoveryservices.fluent.models;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Information of the private link resource. */
-@JsonFlatten
-@Immutable
-public class PrivateLinkResourceInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
+@Fluent
+public final class PrivateLinkResourceInner {
+ /*
+ * Resource properties
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties innerProperties;
/*
* Fully qualified identifier of the resource.
@@ -35,24 +35,14 @@ public class PrivateLinkResourceInner {
@JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
- /*
- * e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or
- * f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery)
- */
- @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY)
- private String groupId;
-
- /*
- * [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1]
- */
- @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
- private List requiredMembers;
-
- /*
- * The private link resource Private link DNS zone name.
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY)
- private List requiredZoneNames;
+ private PrivateLinkResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the id property: Fully qualified identifier of the resource.
@@ -88,7 +78,7 @@ public String type() {
* @return the groupId value.
*/
public String groupId() {
- return this.groupId;
+ return this.innerProperties() == null ? null : this.innerProperties().groupId();
}
/**
@@ -97,7 +87,7 @@ public String groupId() {
* @return the requiredMembers value.
*/
public List requiredMembers() {
- return this.requiredMembers;
+ return this.innerProperties() == null ? null : this.innerProperties().requiredMembers();
}
/**
@@ -106,7 +96,7 @@ public List requiredMembers() {
* @return the requiredZoneNames value.
*/
public List requiredZoneNames() {
- return this.requiredZoneNames;
+ return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
}
/**
@@ -115,5 +105,8 @@ public List requiredZoneNames() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceProperties.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 0000000000000..a677cf04d250f
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the private link resource. */
+@Immutable
+public final class PrivateLinkResourceProperties {
+ /*
+ * e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or
+ * f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery)
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1]
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredZoneNames;
+
+ /**
+ * Get the groupId property: e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or
+ * f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery).
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1].
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ReplicationUsageInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ReplicationUsageInner.java
index f66c1db514a38..63dd19efbae51 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ReplicationUsageInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/ReplicationUsageInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.recoveryservices.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.models.JobsSummary;
import com.azure.resourcemanager.recoveryservices.models.MonitoringSummary;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Replication usages of a vault. */
@Fluent
public final class ReplicationUsageInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationUsageInner.class);
-
/*
* Summary of the replication monitoring data for this vault.
*/
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultCertificateResponseInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultCertificateResponseInner.java
index dfcf5d161a7c3..be1d5c995d4b2 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultCertificateResponseInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultCertificateResponseInner.java
@@ -6,16 +6,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.models.ResourceCertificateDetails;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Certificate corresponding to a vault that can be used by clients to register themselves with the vault. */
@Fluent
public final class VaultCertificateResponseInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultCertificateResponseInner.class);
-
/*
* Certificate details representing the Vault credentials.
*/
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfo.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfo.java
new file mode 100644
index 0000000000000..24ec93e7470c7
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfo.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Vault extended information. */
+@Fluent
+public final class VaultExtendedInfo {
+ /*
+ * Integrity key.
+ */
+ @JsonProperty(value = "integrityKey")
+ private String integrityKey;
+
+ /*
+ * Encryption key.
+ */
+ @JsonProperty(value = "encryptionKey")
+ private String encryptionKey;
+
+ /*
+ * Encryption key thumbprint.
+ */
+ @JsonProperty(value = "encryptionKeyThumbprint")
+ private String encryptionKeyThumbprint;
+
+ /*
+ * Algorithm for Vault ExtendedInfo
+ */
+ @JsonProperty(value = "algorithm")
+ private String algorithm;
+
+ /**
+ * Get the integrityKey property: Integrity key.
+ *
+ * @return the integrityKey value.
+ */
+ public String integrityKey() {
+ return this.integrityKey;
+ }
+
+ /**
+ * Set the integrityKey property: Integrity key.
+ *
+ * @param integrityKey the integrityKey value to set.
+ * @return the VaultExtendedInfo object itself.
+ */
+ public VaultExtendedInfo withIntegrityKey(String integrityKey) {
+ this.integrityKey = integrityKey;
+ return this;
+ }
+
+ /**
+ * Get the encryptionKey property: Encryption key.
+ *
+ * @return the encryptionKey value.
+ */
+ public String encryptionKey() {
+ return this.encryptionKey;
+ }
+
+ /**
+ * Set the encryptionKey property: Encryption key.
+ *
+ * @param encryptionKey the encryptionKey value to set.
+ * @return the VaultExtendedInfo object itself.
+ */
+ public VaultExtendedInfo withEncryptionKey(String encryptionKey) {
+ this.encryptionKey = encryptionKey;
+ return this;
+ }
+
+ /**
+ * Get the encryptionKeyThumbprint property: Encryption key thumbprint.
+ *
+ * @return the encryptionKeyThumbprint value.
+ */
+ public String encryptionKeyThumbprint() {
+ return this.encryptionKeyThumbprint;
+ }
+
+ /**
+ * Set the encryptionKeyThumbprint property: Encryption key thumbprint.
+ *
+ * @param encryptionKeyThumbprint the encryptionKeyThumbprint value to set.
+ * @return the VaultExtendedInfo object itself.
+ */
+ public VaultExtendedInfo withEncryptionKeyThumbprint(String encryptionKeyThumbprint) {
+ this.encryptionKeyThumbprint = encryptionKeyThumbprint;
+ return this;
+ }
+
+ /**
+ * Get the algorithm property: Algorithm for Vault ExtendedInfo.
+ *
+ * @return the algorithm value.
+ */
+ public String algorithm() {
+ return this.algorithm;
+ }
+
+ /**
+ * Set the algorithm property: Algorithm for Vault ExtendedInfo.
+ *
+ * @param algorithm the algorithm value to set.
+ * @return the VaultExtendedInfo object itself.
+ */
+ public VaultExtendedInfo withAlgorithm(String algorithm) {
+ this.algorithm = algorithm;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfoResourceInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfoResourceInner.java
index 2a6489d1bec26..e4aad7c0b6e83 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfoResourceInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultExtendedInfoResourceInner.java
@@ -5,47 +5,52 @@
package com.azure.resourcemanager.recoveryservices.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Vault extended information. */
-@JsonFlatten
@Fluent
-public class VaultExtendedInfoResourceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultExtendedInfoResourceInner.class);
-
+public final class VaultExtendedInfoResourceInner extends ProxyResource {
/*
- * Integrity key.
+ * Vault extended information.
*/
- @JsonProperty(value = "properties.integrityKey")
- private String integrityKey;
+ @JsonProperty(value = "properties")
+ private VaultExtendedInfo innerProperties;
/*
- * Encryption key.
+ * Optional ETag.
*/
- @JsonProperty(value = "properties.encryptionKey")
- private String encryptionKey;
+ @JsonProperty(value = "etag")
+ private String etag;
- /*
- * Encryption key thumbprint.
+ /**
+ * Get the innerProperties property: Vault extended information.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.encryptionKeyThumbprint")
- private String encryptionKeyThumbprint;
+ private VaultExtendedInfo innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Algorithm for Vault ExtendedInfo
+ /**
+ * Get the etag property: Optional ETag.
+ *
+ * @return the etag value.
*/
- @JsonProperty(value = "properties.algorithm")
- private String algorithm;
+ public String etag() {
+ return this.etag;
+ }
- /*
- * Optional ETag.
+ /**
+ * Set the etag property: Optional ETag.
+ *
+ * @param etag the etag value to set.
+ * @return the VaultExtendedInfoResourceInner object itself.
*/
- @JsonProperty(value = "eTag")
- private String etag;
+ public VaultExtendedInfoResourceInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
/**
* Get the integrityKey property: Integrity key.
@@ -53,7 +58,7 @@ public class VaultExtendedInfoResourceInner extends ProxyResource {
* @return the integrityKey value.
*/
public String integrityKey() {
- return this.integrityKey;
+ return this.innerProperties() == null ? null : this.innerProperties().integrityKey();
}
/**
@@ -63,7 +68,10 @@ public String integrityKey() {
* @return the VaultExtendedInfoResourceInner object itself.
*/
public VaultExtendedInfoResourceInner withIntegrityKey(String integrityKey) {
- this.integrityKey = integrityKey;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VaultExtendedInfo();
+ }
+ this.innerProperties().withIntegrityKey(integrityKey);
return this;
}
@@ -73,7 +81,7 @@ public VaultExtendedInfoResourceInner withIntegrityKey(String integrityKey) {
* @return the encryptionKey value.
*/
public String encryptionKey() {
- return this.encryptionKey;
+ return this.innerProperties() == null ? null : this.innerProperties().encryptionKey();
}
/**
@@ -83,7 +91,10 @@ public String encryptionKey() {
* @return the VaultExtendedInfoResourceInner object itself.
*/
public VaultExtendedInfoResourceInner withEncryptionKey(String encryptionKey) {
- this.encryptionKey = encryptionKey;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VaultExtendedInfo();
+ }
+ this.innerProperties().withEncryptionKey(encryptionKey);
return this;
}
@@ -93,7 +104,7 @@ public VaultExtendedInfoResourceInner withEncryptionKey(String encryptionKey) {
* @return the encryptionKeyThumbprint value.
*/
public String encryptionKeyThumbprint() {
- return this.encryptionKeyThumbprint;
+ return this.innerProperties() == null ? null : this.innerProperties().encryptionKeyThumbprint();
}
/**
@@ -103,7 +114,10 @@ public String encryptionKeyThumbprint() {
* @return the VaultExtendedInfoResourceInner object itself.
*/
public VaultExtendedInfoResourceInner withEncryptionKeyThumbprint(String encryptionKeyThumbprint) {
- this.encryptionKeyThumbprint = encryptionKeyThumbprint;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VaultExtendedInfo();
+ }
+ this.innerProperties().withEncryptionKeyThumbprint(encryptionKeyThumbprint);
return this;
}
@@ -113,7 +127,7 @@ public VaultExtendedInfoResourceInner withEncryptionKeyThumbprint(String encrypt
* @return the algorithm value.
*/
public String algorithm() {
- return this.algorithm;
+ return this.innerProperties() == null ? null : this.innerProperties().algorithm();
}
/**
@@ -123,27 +137,10 @@ public String algorithm() {
* @return the VaultExtendedInfoResourceInner object itself.
*/
public VaultExtendedInfoResourceInner withAlgorithm(String algorithm) {
- this.algorithm = algorithm;
- return this;
- }
-
- /**
- * Get the etag property: Optional ETag.
- *
- * @return the etag value.
- */
- public String etag() {
- return this.etag;
- }
-
- /**
- * Set the etag property: Optional ETag.
- *
- * @param etag the etag value to set.
- * @return the VaultExtendedInfoResourceInner object itself.
- */
- public VaultExtendedInfoResourceInner withEtag(String etag) {
- this.etag = etag;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new VaultExtendedInfo();
+ }
+ this.innerProperties().withAlgorithm(algorithm);
return this;
}
@@ -153,5 +150,8 @@ public VaultExtendedInfoResourceInner withEtag(String etag) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultInner.java
index 7c26f78d82a69..c971c1b774982 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultInner.java
@@ -6,19 +6,16 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.recoveryservices.models.IdentityData;
import com.azure.resourcemanager.recoveryservices.models.Sku;
import com.azure.resourcemanager.recoveryservices.models.VaultProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** Resource information, as returned by the resource provider. */
@Fluent
public final class VaultInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultInner.class);
-
/*
* Identity for the resource.
*/
@@ -37,6 +34,12 @@ public final class VaultInner extends Resource {
@JsonProperty(value = "sku")
private Sku sku;
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/**
* Get the identity property: Identity for the resource.
*
@@ -97,6 +100,15 @@ public VaultInner withSku(Sku sku) {
return this;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/** {@inheritDoc} */
@Override
public VaultInner withLocation(String location) {
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultUsageInner.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultUsageInner.java
index 6760967308e38..27e2b9076bce1 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultUsageInner.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/fluent/models/VaultUsageInner.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.recoveryservices.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.models.NameInfo;
import com.azure.resourcemanager.recoveryservices.models.UsagesUnit;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Usages of a vault. */
@Fluent
public final class VaultUsageInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultUsageInner.class);
-
/*
* Unit of the usage.
*/
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/CheckNameAvailabilityResultImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/CheckNameAvailabilityResultImpl.java
index aa46670c680f0..1e79442173568 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/CheckNameAvailabilityResultImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/CheckNameAvailabilityResultImpl.java
@@ -4,17 +4,17 @@
package com.azure.resourcemanager.recoveryservices.implementation;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.models.CheckNameAvailabilityResultInner;
import com.azure.resourcemanager.recoveryservices.models.CheckNameAvailabilityResult;
public final class CheckNameAvailabilityResultImpl implements CheckNameAvailabilityResult {
private CheckNameAvailabilityResultInner innerObject;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
CheckNameAvailabilityResultImpl(
- CheckNameAvailabilityResultInner innerObject, RecoveryServicesManager serviceManager) {
+ CheckNameAvailabilityResultInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -35,7 +35,7 @@ public CheckNameAvailabilityResultInner innerModel() {
return this.innerObject;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ClientDiscoveryValueForSingleApiImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ClientDiscoveryValueForSingleApiImpl.java
index a0981d42816e2..e63a23e609d41 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ClientDiscoveryValueForSingleApiImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ClientDiscoveryValueForSingleApiImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.recoveryservices.implementation;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.models.ClientDiscoveryValueForSingleApiInner;
import com.azure.resourcemanager.recoveryservices.models.ClientDiscoveryDisplay;
import com.azure.resourcemanager.recoveryservices.models.ClientDiscoveryForProperties;
@@ -13,10 +12,11 @@
public final class ClientDiscoveryValueForSingleApiImpl implements ClientDiscoveryValueForSingleApi {
private ClientDiscoveryValueForSingleApiInner innerObject;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
ClientDiscoveryValueForSingleApiImpl(
- ClientDiscoveryValueForSingleApiInner innerObject, RecoveryServicesManager serviceManager) {
+ ClientDiscoveryValueForSingleApiInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -41,7 +41,7 @@ public ClientDiscoveryValueForSingleApiInner innerModel() {
return this.innerObject;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationResourceImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationResourceImpl.java
new file mode 100644
index 0000000000000..5a069ebf8e35e
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationResourceImpl.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.recoveryservices.fluent.models.OperationResourceInner;
+import com.azure.resourcemanager.recoveryservices.models.OperationResource;
+import java.time.OffsetDateTime;
+
+public final class OperationResourceImpl implements OperationResource {
+ private OperationResourceInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
+
+ OperationResourceImpl(
+ OperationResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public OffsetDateTime endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public ManagementError error() {
+ return this.innerModel().error();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OperationResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsClientImpl.java
index ed1d7cdb0ce67..987eec02b26c6 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.OperationsClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.ClientDiscoveryValueForSingleApiInner;
import com.azure.resourcemanager.recoveryservices.models.ClientDiscoveryResponse;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
@@ -85,7 +82,8 @@ Mono> listNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -108,7 +106,7 @@ private Mono> listSinglePag
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -118,7 +116,8 @@ private Mono> listSinglePag
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -148,7 +147,8 @@ private Mono> listSinglePag
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs as paginated response with {@link
+ * PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -162,7 +162,8 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs as paginated response with {@link
+ * PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -175,7 +176,8 @@ private PagedFlux listAsync(Context conte
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -189,7 +191,8 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -203,7 +206,8 @@ public PagedIterable list(Context context
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -228,7 +232,7 @@ private Mono> listNextSingl
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -239,7 +243,8 @@ private Mono> listNextSingl
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operations List response which contains list of available APIs.
+ * @return operations List response which contains list of available APIs along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsImpl.java
index 4ebae3e740cbc..6a0e7dc64e4e0 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/OperationsImpl.java
@@ -7,40 +7,40 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.OperationsClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.ClientDiscoveryValueForSingleApiInner;
import com.azure.resourcemanager.recoveryservices.models.ClientDiscoveryValueForSingleApi;
import com.azure.resourcemanager.recoveryservices.models.Operations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
private final OperationsClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- public OperationsImpl(OperationsClient innerClient, RecoveryServicesManager serviceManager) {
+ public OperationsImpl(
+ OperationsClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return inner.mapPage(inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return inner.mapPage(inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourceImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourceImpl.java
index 61b0f0a3718bc..ab67030f7269b 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourceImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourceImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.recoveryservices.implementation;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.recoveryservices.models.PrivateLinkResource;
import java.util.Collections;
@@ -13,9 +12,11 @@
public final class PrivateLinkResourceImpl implements PrivateLinkResource {
private PrivateLinkResourceInner innerObject;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, RecoveryServicesManager serviceManager) {
+ PrivateLinkResourceImpl(
+ PrivateLinkResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -58,7 +59,7 @@ public PrivateLinkResourceInner innerModel() {
return this.innerObject;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsClientImpl.java
index 49fde72c0b025..73c597fbfe23f 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.PrivateLinkResourcesOperationsClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.recoveryservices.models.PrivateLinkResources;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesOperationsClient. */
public final class PrivateLinkResourcesOperationsClientImpl implements PrivateLinkResourcesOperationsClient {
- private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesOperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final PrivateLinkResourcesOperationsService service;
@@ -113,7 +110,8 @@ Mono> listNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -159,7 +157,7 @@ private Mono> listSinglePageAsync(
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -171,7 +169,8 @@ private Mono> listSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -225,7 +224,7 @@ private Mono> listSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String resourceGroupName, String vaultName) {
@@ -242,7 +241,7 @@ private PagedFlux listAsync(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String resourceGroupName, String vaultName, Context context) {
@@ -259,7 +258,8 @@ private PagedFlux listAsync(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String vaultName) {
@@ -275,7 +275,8 @@ public PagedIterable list(String resourceGroupName, St
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
@@ -291,7 +292,8 @@ public PagedIterable list(String resourceGroupName, St
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information of the private link resource.
+ * @return information of the private link resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -334,7 +336,7 @@ private Mono> getWithResponseAsync(
privateLinkResourceName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -347,7 +349,8 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information of the private link resource.
+ * @return information of the private link resource along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -399,7 +402,7 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information of the private link resource.
+ * @return information of the private link resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(
@@ -441,7 +444,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String vaultName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information of the private link resource.
+ * @return information of the private link resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
@@ -456,7 +459,8 @@ public Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -481,7 +485,7 @@ private Mono> listNextSinglePageAsync(St
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -492,7 +496,8 @@ private Mono> listNextSinglePageAsync(St
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return class which represent the stamps associated with the vault.
+ * @return class which represent the stamps associated with the vault along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsImpl.java
index 4e31a2abc9b68..3d98abf9c673e 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsImpl.java
@@ -9,35 +9,34 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.PrivateLinkResourcesOperationsClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.PrivateLinkResourceInner;
import com.azure.resourcemanager.recoveryservices.models.PrivateLinkResource;
import com.azure.resourcemanager.recoveryservices.models.PrivateLinkResourcesOperations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class PrivateLinkResourcesOperationsImpl implements PrivateLinkResourcesOperations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesOperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesOperationsImpl.class);
private final PrivateLinkResourcesOperationsClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
public PrivateLinkResourcesOperationsImpl(
- PrivateLinkResourcesOperationsClient innerClient, RecoveryServicesManager serviceManager) {
+ PrivateLinkResourcesOperationsClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
- return inner.mapPage(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
PagedIterable inner =
this.serviceClient().list(resourceGroupName, vaultName, context);
- return inner.mapPage(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
}
public PrivateLinkResource get(String resourceGroupName, String vaultName, String privateLinkResourceName) {
@@ -69,7 +68,7 @@ private PrivateLinkResourcesOperationsClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesClientImpl.java
index 0a81507c431e5..157f6ea21267d 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesClientImpl.java
@@ -22,7 +22,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.RecoveryServicesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.CheckNameAvailabilityResultInner;
import com.azure.resourcemanager.recoveryservices.models.CheckNameAvailabilityParameters;
@@ -30,8 +29,6 @@
/** An instance of this class provides access to all the operations defined in RecoveryServicesClient. */
public final class RecoveryServicesClientImpl implements RecoveryServicesClient {
- private final ClientLogger logger = new ClientLogger(RecoveryServicesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final RecoveryServicesService service;
@@ -84,7 +81,8 @@ Mono> checkNameAvailability(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response for check name availability API.
+ * @return response for check name availability API along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> checkNameAvailabilityWithResponseAsync(
@@ -127,7 +125,7 @@ private Mono> checkNameAvailabilityWi
input,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -142,7 +140,8 @@ private Mono> checkNameAvailabilityWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response for check name availability API.
+ * @return response for check name availability API along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> checkNameAvailabilityWithResponseAsync(
@@ -196,7 +195,7 @@ private Mono> checkNameAvailabilityWi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response for check name availability API.
+ * @return response for check name availability API on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono checkNameAvailabilityAsync(
@@ -243,7 +242,7 @@ public CheckNameAvailabilityResultInner checkNameAvailability(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response for check name availability API.
+ * @return response for check name availability API along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response checkNameAvailabilityWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesImpl.java
index 2f4c179924caa..df65e7373806a 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesImpl.java
@@ -8,22 +8,22 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.RecoveryServicesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.CheckNameAvailabilityResultInner;
import com.azure.resourcemanager.recoveryservices.models.CheckNameAvailabilityParameters;
import com.azure.resourcemanager.recoveryservices.models.CheckNameAvailabilityResult;
import com.azure.resourcemanager.recoveryservices.models.RecoveryServices;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class RecoveryServicesImpl implements RecoveryServices {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoveryServicesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryServicesImpl.class);
private final RecoveryServicesClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- public RecoveryServicesImpl(RecoveryServicesClient innerClient, RecoveryServicesManager serviceManager) {
+ public RecoveryServicesImpl(
+ RecoveryServicesClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -58,7 +58,7 @@ private RecoveryServicesClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesManagementClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesManagementClientImpl.java
index 73ec143fc2ce9..3b6a0e02d8329 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesManagementClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RecoveryServicesManagementClientImpl.java
@@ -27,6 +27,7 @@
import com.azure.resourcemanager.recoveryservices.fluent.RecoveryServicesManagementClient;
import com.azure.resourcemanager.recoveryservices.fluent.RegisteredIdentitiesClient;
import com.azure.resourcemanager.recoveryservices.fluent.ReplicationUsagesClient;
+import com.azure.resourcemanager.recoveryservices.fluent.ResourceProvidersClient;
import com.azure.resourcemanager.recoveryservices.fluent.UsagesClient;
import com.azure.resourcemanager.recoveryservices.fluent.VaultCertificatesClient;
import com.azure.resourcemanager.recoveryservices.fluent.VaultExtendedInfoesClient;
@@ -44,8 +45,6 @@
/** Initializes a new instance of the RecoveryServicesManagementClientImpl type. */
@ServiceClient(builder = RecoveryServicesManagementClientBuilder.class)
public final class RecoveryServicesManagementClientImpl implements RecoveryServicesManagementClient {
- private final ClientLogger logger = new ClientLogger(RecoveryServicesManagementClientImpl.class);
-
/** The subscription Id. */
private final String subscriptionId;
@@ -214,6 +213,18 @@ public VaultExtendedInfoesClient getVaultExtendedInfoes() {
return this.vaultExtendedInfoes;
}
+ /** The ResourceProvidersClient object to access its operations. */
+ private final ResourceProvidersClient resourceProviders;
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ public ResourceProvidersClient getResourceProviders() {
+ return this.resourceProviders;
+ }
+
/** The UsagesClient object to access its operations. */
private final UsagesClient usages;
@@ -248,7 +259,7 @@ public UsagesClient getUsages() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2016-06-01";
+ this.apiVersion = "2022-02-01";
this.vaultCertificates = new VaultCertificatesClientImpl(this);
this.registeredIdentities = new RegisteredIdentitiesClientImpl(this);
this.replicationUsages = new ReplicationUsagesClientImpl(this);
@@ -257,6 +268,7 @@ public UsagesClient getUsages() {
this.vaults = new VaultsClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.vaultExtendedInfoes = new VaultExtendedInfoesClientImpl(this);
+ this.resourceProviders = new ResourceProvidersClientImpl(this);
this.usages = new UsagesClientImpl(this);
}
@@ -342,8 +354,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
- } catch (IOException ioe) {
- logger.logThrowableAsWarning(ioe);
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -371,7 +383,7 @@ private static final class HttpResponseImpl extends HttpResponse {
super(null);
this.statusCode = statusCode;
this.httpHeaders = httpHeaders;
- this.responseBody = responseBody.getBytes(StandardCharsets.UTF_8);
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
}
public int getStatusCode() {
@@ -402,4 +414,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryServicesManagementClientImpl.class);
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesClientImpl.java
index 205ec3f49aee7..a238d8ce7a487 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesClientImpl.java
@@ -20,14 +20,11 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.RegisteredIdentitiesClient;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in RegisteredIdentitiesClient. */
public final class RegisteredIdentitiesClientImpl implements RegisteredIdentitiesClient {
- private final ClientLogger logger = new ClientLogger(RegisteredIdentitiesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final RegisteredIdentitiesService service;
@@ -78,7 +75,7 @@ Mono> delete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -117,7 +114,7 @@ private Mono> deleteWithResponseAsync(
vaultName,
identityName,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -130,7 +127,7 @@ private Mono> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> deleteWithResponseAsync(
@@ -178,7 +175,7 @@ private Mono> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String vaultName, String identityName) {
@@ -211,7 +208,7 @@ public void delete(String resourceGroupName, String vaultName, String identityNa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response deleteWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesImpl.java
index b7936e9800eb0..b80ab29cd5700 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/RegisteredIdentitiesImpl.java
@@ -7,19 +7,19 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.RegisteredIdentitiesClient;
import com.azure.resourcemanager.recoveryservices.models.RegisteredIdentities;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class RegisteredIdentitiesImpl implements RegisteredIdentities {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RegisteredIdentitiesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(RegisteredIdentitiesImpl.class);
private final RegisteredIdentitiesClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- public RegisteredIdentitiesImpl(RegisteredIdentitiesClient innerClient, RecoveryServicesManager serviceManager) {
+ public RegisteredIdentitiesImpl(
+ RegisteredIdentitiesClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -37,7 +37,7 @@ private RegisteredIdentitiesClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsageImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsageImpl.java
index 897377356682a..f2c067f0ca925 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsageImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsageImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.recoveryservices.implementation;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.models.ReplicationUsageInner;
import com.azure.resourcemanager.recoveryservices.models.JobsSummary;
import com.azure.resourcemanager.recoveryservices.models.MonitoringSummary;
@@ -13,9 +12,11 @@
public final class ReplicationUsageImpl implements ReplicationUsage {
private ReplicationUsageInner innerObject;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- ReplicationUsageImpl(ReplicationUsageInner innerObject, RecoveryServicesManager serviceManager) {
+ ReplicationUsageImpl(
+ ReplicationUsageInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -48,7 +49,7 @@ public ReplicationUsageInner innerModel() {
return this.innerObject;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesClientImpl.java
index 8df6493090ac0..aebe08e3401a3 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.ReplicationUsagesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.ReplicationUsageInner;
import com.azure.resourcemanager.recoveryservices.models.ReplicationUsageList;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in ReplicationUsagesClient. */
public final class ReplicationUsagesClientImpl implements ReplicationUsagesClient {
- private final ClientLogger logger = new ClientLogger(ReplicationUsagesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ReplicationUsagesService service;
@@ -83,7 +80,7 @@ Mono> list(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String resourceGroupName, String vaultName) {
@@ -123,7 +120,7 @@ private Mono> listSinglePageAsync(String re
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -135,7 +132,7 @@ private Mono> listSinglePageAsync(String re
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(
@@ -184,7 +181,7 @@ private Mono> listSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String resourceGroupName, String vaultName) {
@@ -200,7 +197,7 @@ private PagedFlux listAsync(String resourceGroupName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String resourceGroupName, String vaultName, Context context) {
@@ -215,7 +212,7 @@ private PagedFlux listAsync(String resourceGroupName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String vaultName) {
@@ -231,7 +228,7 @@ public PagedIterable list(String resourceGroupName, Strin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication usages for vault.
+ * @return replication usages for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesImpl.java
index ef0eec19a1cf8..8c5d5695674a8 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ReplicationUsagesImpl.java
@@ -7,40 +7,40 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.ReplicationUsagesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.ReplicationUsageInner;
import com.azure.resourcemanager.recoveryservices.models.ReplicationUsage;
import com.azure.resourcemanager.recoveryservices.models.ReplicationUsages;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ReplicationUsagesImpl implements ReplicationUsages {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationUsagesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ReplicationUsagesImpl.class);
private final ReplicationUsagesClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- public ReplicationUsagesImpl(ReplicationUsagesClient innerClient, RecoveryServicesManager serviceManager) {
+ public ReplicationUsagesImpl(
+ ReplicationUsagesClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
- return inner.mapPage(inner1 -> new ReplicationUsageImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ReplicationUsageImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName, context);
- return inner.mapPage(inner1 -> new ReplicationUsageImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new ReplicationUsageImpl(inner1, this.manager()));
}
private ReplicationUsagesClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ResourceProvidersClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ResourceProvidersClientImpl.java
new file mode 100644
index 0000000000000..60e7c916aad28
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ResourceProvidersClientImpl.java
@@ -0,0 +1,412 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.recoveryservices.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.recoveryservices.fluent.models.OperationResourceInner;
+import com.azure.resourcemanager.recoveryservices.fluent.models.VaultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
+public final class ResourceProvidersClientImpl implements ResourceProvidersClient {
+ /** The proxy service used to perform REST calls. */
+ private final ResourceProvidersService service;
+
+ /** The service client containing this operation class. */
+ private final RecoveryServicesManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ResourceProvidersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ResourceProvidersClientImpl(RecoveryServicesManagementClientImpl client) {
+ this.service =
+ RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesManagementClientResourceProviders to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "RecoveryServicesMana")
+ private interface ResourceProvidersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
+ + "/vaults/{vaultName}/operationStatus/{operationId}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getOperationStatus(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("operationId") String operationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices"
+ + "/vaults/{vaultName}/operationResults/{operationId}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getOperationResult(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("operationId") String operationId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getOperationStatusWithResponseAsync(
+ String resourceGroupName, String vaultName, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getOperationStatus(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getOperationStatusWithResponseAsync(
+ String resourceGroupName, String vaultName, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getOperationStatus(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getOperationStatusAsync(
+ String resourceGroupName, String vaultName, String operationId) {
+ return getOperationStatusWithResponseAsync(resourceGroupName, vaultName, operationId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationResourceInner getOperationStatus(String resourceGroupName, String vaultName, String operationId) {
+ return getOperationStatusAsync(resourceGroupName, vaultName, operationId).block();
+ }
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation status for a resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getOperationStatusWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context) {
+ return getOperationStatusWithResponseAsync(resourceGroupName, vaultName, operationId, context).block();
+ }
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getOperationResultWithResponseAsync(
+ String resourceGroupName, String vaultName, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getOperationResult(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getOperationResultWithResponseAsync(
+ String resourceGroupName, String vaultName, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getOperationResult(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ operationId,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getOperationResultAsync(String resourceGroupName, String vaultName, String operationId) {
+ return getOperationResultWithResponseAsync(resourceGroupName, vaultName, operationId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public VaultInner getOperationResult(String resourceGroupName, String vaultName, String operationId) {
+ return getOperationResultAsync(resourceGroupName, vaultName, operationId).block();
+ }
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the recovery services vault is present.
+ * @param vaultName The name of the recovery services vault.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getOperationResultWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context) {
+ return getOperationResultWithResponseAsync(resourceGroupName, vaultName, operationId, context).block();
+ }
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ResourceProvidersImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ResourceProvidersImpl.java
new file mode 100644
index 0000000000000..9ce8e86d5f322
--- /dev/null
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/ResourceProvidersImpl.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.recoveryservices.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservices.fluent.ResourceProvidersClient;
+import com.azure.resourcemanager.recoveryservices.fluent.models.OperationResourceInner;
+import com.azure.resourcemanager.recoveryservices.fluent.models.VaultInner;
+import com.azure.resourcemanager.recoveryservices.models.OperationResource;
+import com.azure.resourcemanager.recoveryservices.models.ResourceProviders;
+import com.azure.resourcemanager.recoveryservices.models.Vault;
+
+public final class ResourceProvidersImpl implements ResourceProviders {
+ private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class);
+
+ private final ResourceProvidersClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
+
+ public ResourceProvidersImpl(
+ ResourceProvidersClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationResource getOperationStatus(String resourceGroupName, String vaultName, String operationId) {
+ OperationResourceInner inner =
+ this.serviceClient().getOperationStatus(resourceGroupName, vaultName, operationId);
+ if (inner != null) {
+ return new OperationResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getOperationStatusWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context) {
+ Response inner =
+ this.serviceClient().getOperationStatusWithResponse(resourceGroupName, vaultName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new OperationResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Vault getOperationResult(String resourceGroupName, String vaultName, String operationId) {
+ VaultInner inner = this.serviceClient().getOperationResult(resourceGroupName, vaultName, operationId);
+ if (inner != null) {
+ return new VaultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getOperationResultWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context) {
+ Response inner =
+ this.serviceClient().getOperationResultWithResponse(resourceGroupName, vaultName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new VaultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private ResourceProvidersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesClientImpl.java
index 2a580ba90e530..8e2c4a2dba407 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.UsagesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultUsageInner;
import com.azure.resourcemanager.recoveryservices.models.VaultUsageList;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in UsagesClient. */
public final class UsagesClientImpl implements UsagesClient {
- private final ClientLogger logger = new ClientLogger(UsagesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final UsagesService service;
@@ -82,7 +79,7 @@ Mono> listByVaults(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByVaultsSinglePageAsync(
@@ -123,7 +120,7 @@ private Mono> listByVaultsSinglePageAsync(
res ->
new PagedResponseBase<>(
res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -135,7 +132,7 @@ private Mono> listByVaultsSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByVaultsSinglePageAsync(
@@ -184,7 +181,7 @@ private Mono> listByVaultsSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByVaultsAsync(String resourceGroupName, String vaultName) {
@@ -200,7 +197,7 @@ private PagedFlux listByVaultsAsync(String resourceGroupName, S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByVaultsAsync(String resourceGroupName, String vaultName, Context context) {
@@ -215,7 +212,7 @@ private PagedFlux listByVaultsAsync(String resourceGroupName, S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByVaults(String resourceGroupName, String vaultName) {
@@ -231,7 +228,7 @@ public PagedIterable listByVaults(String resourceGroupName, Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return usage for vault.
+ * @return usage for vault as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByVaults(String resourceGroupName, String vaultName, Context context) {
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesImpl.java
index ab8988c3b9950..43955a26ebdb1 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/UsagesImpl.java
@@ -7,40 +7,39 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.UsagesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultUsageInner;
import com.azure.resourcemanager.recoveryservices.models.Usages;
import com.azure.resourcemanager.recoveryservices.models.VaultUsage;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class UsagesImpl implements Usages {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UsagesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class);
private final UsagesClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- public UsagesImpl(UsagesClient innerClient, RecoveryServicesManager serviceManager) {
+ public UsagesImpl(
+ UsagesClient innerClient, com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable listByVaults(String resourceGroupName, String vaultName) {
PagedIterable inner = this.serviceClient().listByVaults(resourceGroupName, vaultName);
- return inner.mapPage(inner1 -> new VaultUsageImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new VaultUsageImpl(inner1, this.manager()));
}
public PagedIterable listByVaults(String resourceGroupName, String vaultName, Context context) {
PagedIterable inner = this.serviceClient().listByVaults(resourceGroupName, vaultName, context);
- return inner.mapPage(inner1 -> new VaultUsageImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new VaultUsageImpl(inner1, this.manager()));
}
private UsagesClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/Utils.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/Utils.java
index 59bc1e9d88f0f..177f5ec5a638e 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/Utils.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/Utils.java
@@ -4,12 +4,20 @@
package com.azure.resourcemanager.recoveryservices.implementation;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.util.CoreUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
final class Utils {
static String getValueFromIdByName(String id, String name) {
@@ -64,4 +72,133 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
return null;
}
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(
+ PagedFlux
+ .create(
+ () ->
+ (continuationToken, pageSize) ->
+ Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page ->
+ new PagedResponseBase(
+ page.getRequest(),
+ page.getStatusCode(),
+ page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()),
+ page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(iterable.iterator(), mapper);
+ }
+ }
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificateResponseImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificateResponseImpl.java
index 80f2bbe1518df..c25a10862eb07 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificateResponseImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificateResponseImpl.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.recoveryservices.implementation;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultCertificateResponseInner;
import com.azure.resourcemanager.recoveryservices.models.CertificateRequest;
import com.azure.resourcemanager.recoveryservices.models.RawCertificateData;
@@ -16,9 +15,11 @@ public final class VaultCertificateResponseImpl
implements VaultCertificateResponse, VaultCertificateResponse.Definition {
private VaultCertificateResponseInner innerObject;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- VaultCertificateResponseImpl(VaultCertificateResponseInner innerObject, RecoveryServicesManager serviceManager) {
+ VaultCertificateResponseImpl(
+ VaultCertificateResponseInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -43,7 +44,7 @@ public VaultCertificateResponseInner innerModel() {
return this.innerObject;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
@@ -82,7 +83,8 @@ public VaultCertificateResponse create(Context context) {
return this;
}
- VaultCertificateResponseImpl(String name, RecoveryServicesManager serviceManager) {
+ VaultCertificateResponseImpl(
+ String name, com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = new VaultCertificateResponseInner();
this.serviceManager = serviceManager;
this.certificateName = name;
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesClientImpl.java
index a846367624e94..f89c555a5b356 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesClientImpl.java
@@ -22,7 +22,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.VaultCertificatesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultCertificateResponseInner;
import com.azure.resourcemanager.recoveryservices.models.CertificateRequest;
@@ -30,8 +29,6 @@
/** An instance of this class provides access to all the operations defined in VaultCertificatesClient. */
public final class VaultCertificatesClientImpl implements VaultCertificatesClient {
- private final ClientLogger logger = new ClientLogger(VaultCertificatesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final VaultCertificatesService service;
@@ -84,7 +81,8 @@ Mono> create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault.
+ * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault
+ * along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -133,7 +131,7 @@ private Mono> createWithResponseAsync(
certificateRequest,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -147,7 +145,8 @@ private Mono> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault.
+ * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault
+ * along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createWithResponseAsync(
@@ -210,7 +209,8 @@ private Mono> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault.
+ * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault on
+ * successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -255,7 +255,8 @@ public VaultCertificateResponseInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault.
+ * @return certificate corresponding to a vault that can be used by clients to register themselves with the vault
+ * along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createWithResponse(
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesImpl.java
index 9d19a96a85cad..fdea9a0bcc82c 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultCertificatesImpl.java
@@ -5,19 +5,19 @@
package com.azure.resourcemanager.recoveryservices.implementation;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.VaultCertificatesClient;
import com.azure.resourcemanager.recoveryservices.models.VaultCertificates;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class VaultCertificatesImpl implements VaultCertificates {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(VaultCertificatesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(VaultCertificatesImpl.class);
private final VaultCertificatesClient innerClient;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- public VaultCertificatesImpl(VaultCertificatesClient innerClient, RecoveryServicesManager serviceManager) {
+ public VaultCertificatesImpl(
+ VaultCertificatesClient innerClient,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -26,7 +26,7 @@ private VaultCertificatesClient serviceClient() {
return this.innerClient;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoResourceImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoResourceImpl.java
index 39f747ebc18d2..874f8cfcce600 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoResourceImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoResourceImpl.java
@@ -4,16 +4,17 @@
package com.azure.resourcemanager.recoveryservices.implementation;
-import com.azure.resourcemanager.recoveryservices.RecoveryServicesManager;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultExtendedInfoResourceInner;
import com.azure.resourcemanager.recoveryservices.models.VaultExtendedInfoResource;
public final class VaultExtendedInfoResourceImpl implements VaultExtendedInfoResource {
private VaultExtendedInfoResourceInner innerObject;
- private final RecoveryServicesManager serviceManager;
+ private final com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager;
- VaultExtendedInfoResourceImpl(VaultExtendedInfoResourceInner innerObject, RecoveryServicesManager serviceManager) {
+ VaultExtendedInfoResourceImpl(
+ VaultExtendedInfoResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservices.RecoveryServicesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -30,6 +31,10 @@ public String type() {
return this.innerModel().type();
}
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
public String integrityKey() {
return this.innerModel().integrityKey();
}
@@ -46,15 +51,11 @@ public String algorithm() {
return this.innerModel().algorithm();
}
- public String etag() {
- return this.innerModel().etag();
- }
-
public VaultExtendedInfoResourceInner innerModel() {
return this.innerObject;
}
- private RecoveryServicesManager manager() {
+ private com.azure.resourcemanager.recoveryservices.RecoveryServicesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoesClientImpl.java b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoesClientImpl.java
index d25a7f7225a98..2a57dcb076d76 100644
--- a/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoesClientImpl.java
+++ b/sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/VaultExtendedInfoesClientImpl.java
@@ -24,15 +24,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.recoveryservices.fluent.VaultExtendedInfoesClient;
import com.azure.resourcemanager.recoveryservices.fluent.models.VaultExtendedInfoResourceInner;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in VaultExtendedInfoesClient. */
public final class VaultExtendedInfoesClientImpl implements VaultExtendedInfoesClient {
- private final ClientLogger logger = new ClientLogger(VaultExtendedInfoesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final VaultExtendedInfoesService service;
@@ -113,7 +110,7 @@ Mono> update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the vault extended info.
+ * @return the vault extended info along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -150,7 +147,7 @@ private Mono> getWithResponseAsync(
vaultName,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -162,7 +159,7 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the vault extended info.
+ * @return the vault extended info along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -207,7 +204,7 @@ private Mono> getWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the vault extended info.
+ * @return the vault extended info on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String resourceGroupName, String vaultName) {
@@ -246,7 +243,7 @@ public VaultExtendedInfoResourceInner get(String resourceGroupName, String vault
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the vault extended info.
+ * @return the vault extended info along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
@@ -263,7 +260,7 @@ public Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -309,7 +306,7 @@ private Mono> createOrUpdateWithRespons
resourceExtendedInfoDetails,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -322,7 +319,7 @@ private Mono> createOrUpdateWithRespons
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> createOrUpdateWithResponseAsync(
@@ -380,7 +377,7 @@ private Mono> createOrUpdateWithRespons
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -423,7 +420,7 @@ public VaultExtendedInfoResourceInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateWithResponse(
@@ -444,7 +441,7 @@ public Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -490,7 +487,7 @@ private Mono> updateWithResponseAsync(
resourceExtendedInfoDetails,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -503,7 +500,7 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -561,7 +558,7 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -604,7 +601,7 @@ public VaultExtendedInfoResourceInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return vault extended information.
+ * @return vault extended information along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response