diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 69ed367d1cd0..a2fdd5617fb1 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -296,7 +296,7 @@ com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.1.0;1.2.0-beta.6 com.azure.resourcemanager:azure-resourcemanager-healthbot;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-confluent;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.2.0;1.3.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-netapp;1.0.0;1.1.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-netapp;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.10;1.0.0-beta.11 com.azure.resourcemanager:azure-resourcemanager-redisenterprise;2.0.0;2.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hybridkubernetes;1.0.0-beta.3;1.0.0-beta.4 diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index c509152f1bd7..fee7e6c77a66 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,14 +1,14 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.1.0 (2024-03-20) -### Features Added +- Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2023-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.VolumeGroupMetadata` was modified -### Other Changes +* Removed `deploymentSpecId` property as it's non-functional in service backend. ## 1.1.0-beta.1 (2023-12-19) diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index bdd44a819432..e391122fca3f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/README.md +++ b/sdk/netapp/azure-resourcemanager-netapp/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NetAppFiles client library for Java. -This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2023-05. 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 NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2023-07-01. 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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-netapp - 1.1.0-beta.1 + 1.1.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index c1066e3f2041..013ef157b658 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -1,12 +1,6 @@ # Code snippets and samples -## AccountBackups - -- [Delete](#accountbackups_delete) -- [Get](#accountbackups_get) -- [ListByNetAppAccount](#accountbackups_listbynetappaccount) - ## Accounts - [CreateOrUpdate](#accounts_createorupdate) @@ -14,7 +8,6 @@ - [GetByResourceGroup](#accounts_getbyresourcegroup) - [List](#accounts_list) - [ListByResourceGroup](#accounts_listbyresourcegroup) -- [MigrateEncryptionKey](#accounts_migrateencryptionkey) - [RenewCredentials](#accounts_renewcredentials) - [Update](#accounts_update) @@ -26,35 +19,9 @@ - [List](#backuppolicies_list) - [Update](#backuppolicies_update) -## BackupVaults - -- [CreateOrUpdate](#backupvaults_createorupdate) -- [Delete](#backupvaults_delete) -- [Get](#backupvaults_get) -- [ListByNetAppAccount](#backupvaults_listbynetappaccount) -- [Update](#backupvaults_update) - ## Backups -- [Create](#backups_create) -- [Delete](#backups_delete) -- [Get](#backups_get) -- [GetLatestStatus](#backups_getlateststatus) - [GetVolumeRestoreStatus](#backups_getvolumerestorestatus) -- [ListByVault](#backups_listbyvault) -- [Update](#backups_update) - -## BackupsUnderAccount - -- [MigrateBackups](#backupsunderaccount_migratebackups) - -## BackupsUnderBackupVault - -- [RestoreFiles](#backupsunderbackupvault_restorefiles) - -## BackupsUnderVolume - -- [MigrateBackups](#backupsundervolume_migratebackups) ## NetAppResource @@ -70,11 +37,6 @@ - [Get](#netappresourcequotalimits_get) - [List](#netappresourcequotalimits_list) -## NetAppResourceRegionInfos - -- [Get](#netappresourceregioninfos_get) -- [List](#netappresourceregioninfos_list) - ## Operations - [List](#operations_list) @@ -152,71 +114,7 @@ - [ResyncReplication](#volumes_resyncreplication) - [Revert](#volumes_revert) - [RevertRelocation](#volumes_revertrelocation) -- [SplitCloneFromParent](#volumes_splitclonefromparent) - [Update](#volumes_update) -### AccountBackups_Delete - -```java -/** - * Samples for AccountBackups Delete. - */ -public final class AccountBackupsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Backups_Account_Delete.json - */ - /** - * Sample code: AccountBackups_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().delete("resourceGroup", "accountName", "backupName", com.azure.core.util.Context.NONE); - } -} -``` - -### AccountBackups_Get - -```java -/** - * Samples for AccountBackups Get. - */ -public final class AccountBackupsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Backups_Account_Get.json - */ - /** - * Sample code: AccountBackups_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().getWithResponse("myRG", "account1", "backup1", com.azure.core.util.Context.NONE); - } -} -``` - -### AccountBackups_ListByNetAppAccount - -```java -/** - * Samples for AccountBackups ListByNetAppAccount. - */ -public final class AccountBackupsListByNetAppAccountSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Backups_Account_List.json - */ - /** - * Sample code: AccountBackups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().listByNetAppAccount("myRG", "account1", null, com.azure.core.util.Context.NONE); - } -} -``` - ### Accounts_CreateOrUpdate ```java @@ -228,7 +126,8 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -240,15 +139,22 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. * * @param manager Entry point to NetAppFilesManager. */ - public static void accountsCreateOrUpdateWithActiveDirectory(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().define("account1").withRegion("eastus").withExistingResourceGroup("myRG").withActiveDirectories(Arrays.asList(new ActiveDirectory().withUsername("ad_user_name").withPassword("fakeTokenPlaceholder").withDomain("10.10.10.3").withDns("10.10.10.3").withSmbServerName("SMBServer").withOrganizationalUnit("OU=Engineering").withSite("SiteName").withAesEncryption(true).withLdapSigning(false).withLdapOverTls(false))).create(); + public static void + accountsCreateOrUpdateWithActiveDirectory(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts().define("account1").withRegion("eastus").withExistingResourceGroup("myRG") + .withActiveDirectories(Arrays.asList(new ActiveDirectory().withUsername("ad_user_name") + .withPassword("fakeTokenPlaceholder").withDomain("10.10.10.3").withDns("10.10.10.3") + .withSmbServerName("SMBServer").withOrganizationalUnit("OU=Engineering").withSite("SiteName") + .withAesEncryption(true).withLdapSigning(false).withLdapOverTls(false))) + .create(); } } ``` @@ -261,7 +167,8 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -282,7 +189,8 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -303,7 +211,8 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -324,7 +233,8 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -337,29 +247,6 @@ public final class AccountsListByResourceGroupSamples { } ``` -### Accounts_MigrateEncryptionKey - -```java -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; - -/** - * Samples for Accounts MigrateEncryptionKey. - */ -public final class AccountsMigrateEncryptionKeySamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_MigrateEncryptionKey.json - */ - /** - * Sample code: Accounts_MigrateEncryptionKey. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsMigrateEncryptionKey(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().migrateEncryptionKey("myRG", "account1", new EncryptionMigrationRequest().withVirtualNetworkId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1").withPrivateEndpointId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1"), com.azure.core.util.Context.NONE); - } -} -``` - ### Accounts_RenewCredentials ```java @@ -368,7 +255,8 @@ public final class AccountsMigrateEncryptionKeySamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_RenewCredentials.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -393,7 +281,8 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -401,7 +290,8 @@ public final class AccountsUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void accountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - NetAppAccount resource = manager.accounts().getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE).getValue(); + NetAppAccount resource = manager.accounts() + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("Tag1", "Value1")).apply(); } @@ -427,7 +317,8 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -435,7 +326,9 @@ public final class BackupPoliciesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().define("backupPolicyName").withRegion("westus").withExistingNetAppAccount("myRG", "account1").withDailyBackupsToKeep(10).withWeeklyBackupsToKeep(10).withMonthlyBackupsToKeep(10).withEnabled(true).create(); + manager.backupPolicies().define("backupPolicyName").withRegion("westus") + .withExistingNetAppAccount("myRG", "account1").withDailyBackupsToKeep(10).withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10).withEnabled(true).create(); } } ``` @@ -448,7 +341,8 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Delete.json */ /** * Sample code: Backups_Delete. @@ -456,7 +350,8 @@ public final class BackupPoliciesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); + manager.backupPolicies().delete("resourceGroup", "accountName", "backupPolicyName", + com.azure.core.util.Context.NONE); } } ``` @@ -469,7 +364,8 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -477,7 +373,8 @@ public final class BackupPoliciesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); + manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", + com.azure.core.util.Context.NONE); } } ``` @@ -490,7 +387,8 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_List.json */ /** * Sample code: Backups_List. @@ -513,7 +411,8 @@ import com.azure.resourcemanager.netapp.models.BackupPolicy; */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -521,214 +420,10 @@ public final class BackupPoliciesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupPolicy resource = manager.backupPolicies().getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE).getValue(); - resource.update().withDailyBackupsToKeep(5).withWeeklyBackupsToKeep(10).withMonthlyBackupsToKeep(10).withEnabled(false).apply(); - } -} -``` - -### BackupVaults_CreateOrUpdate - -```java -/** - * Samples for BackupVaults CreateOrUpdate. - */ -public final class BackupVaultsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Create.json - */ - /** - * Sample code: BackupVault_CreateOrUpdate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().define("backupVault1").withRegion("eastus").withExistingNetAppAccount("myRG", "account1").create(); - } -} -``` - -### BackupVaults_Delete - -```java -/** - * Samples for BackupVaults Delete. - */ -public final class BackupVaultsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Delete.json - */ - /** - * Sample code: BackupVaults_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); - } -} -``` - -### BackupVaults_Get - -```java -/** - * Samples for BackupVaults Get. - */ -public final class BackupVaultsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Get.json - */ - /** - * Sample code: BackupVaults_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); - } -} -``` - -### BackupVaults_ListByNetAppAccount - -```java -/** - * Samples for BackupVaults ListByNetAppAccount. - */ -public final class BackupVaultsListByNetAppAccountSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_List.json - */ - /** - * Sample code: BackupVaults_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); - } -} -``` - -### BackupVaults_Update - -```java -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for BackupVaults Update. - */ -public final class BackupVaultsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Update.json - */ - /** - * Sample code: BackupVaults_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupVault resource = manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withTags(mapOf("Tag1", "Value1")).apply(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### Backups_Create - -```java -/** - * Samples for Backups Create. - */ -public final class BackupsCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderBackupVault_Create.json - */ - /** - * Sample code: BackupsUnderBackupVault_Create. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().define("backup1").withExistingBackupVault("myRG", "account1", "backupVault1").withVolumeResourceId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1").withLabel("myLabel").create(); - } -} -``` - -### Backups_Delete - -```java -/** - * Samples for Backups Delete. - */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderBackupVault_Delete.json - */ - /** - * Sample code: BackupsUnderBackupVault_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); - } -} -``` - -### Backups_Get - -```java -/** - * Samples for Backups Get. - */ -public final class BackupsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderBackupVault_Get.json - */ - /** - * Sample code: BackupsUnderBackupVault_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); - } -} -``` - -### Backups_GetLatestStatus - -```java -/** - * Samples for Backups GetLatestStatus. - */ -public final class BackupsGetLatestStatusSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_LatestBackupStatus.json - */ - /** - * Sample code: Volumes_BackupStatus. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + BackupPolicy resource = manager.backupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE).getValue(); + resource.update().withDailyBackupsToKeep(5).withWeeklyBackupsToKeep(10).withMonthlyBackupsToKeep(10) + .withEnabled(false).apply(); } } ``` @@ -741,7 +436,8 @@ public final class BackupsGetLatestStatusSamples { */ public final class BackupsGetVolumeRestoreStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_RestoreStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. @@ -749,122 +445,8 @@ public final class BackupsGetVolumeRestoreStatusSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getVolumeRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); - } -} -``` - -### Backups_ListByVault - -```java -/** - * Samples for Backups ListByVault. - */ -public final class BackupsListByVaultSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderBackupVault_List.json - */ - /** - * Sample code: Backups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Backups_Update - -```java -import com.azure.resourcemanager.netapp.models.Backup; - -/** - * Samples for Backups Update. - */ -public final class BackupsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderBackupVault_Update.json - */ - /** - * Sample code: BackupsUnderBackupVault_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Backup resource = manager.backups().getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE).getValue(); - resource.update().apply(); - } -} -``` - -### BackupsUnderAccount_MigrateBackups - -```java -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - -/** - * Samples for BackupsUnderAccount MigrateBackups. - */ -public final class BackupsUnderAccountMigrateBackupsSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderAccount_Migrate.json - */ - /** - * Sample code: BackupsUnderAccount_Migrate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderAccounts().migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), com.azure.core.util.Context.NONE); - } -} -``` - -### BackupsUnderBackupVault_RestoreFiles - -```java -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.util.Arrays; - -/** - * Samples for BackupsUnderBackupVault RestoreFiles. - */ -public final class BackupsUnderBackupVaultRestoreFilesSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json - */ - /** - * Sample code: Backups_SingleFileRestore. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderBackupVaults().restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles().withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")).withDestinationVolumeId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), com.azure.core.util.Context.NONE); - } -} -``` - -### BackupsUnderVolume_MigrateBackups - -```java -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - -/** - * Samples for BackupsUnderVolume MigrateBackups. - */ -public final class BackupsUnderVolumeMigrateBackupsSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupsUnderVolume_Migrate.json - */ - /** - * Sample code: BackupsUnderVolume_Migrate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderVolumes().migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), com.azure.core.util.Context.NONE); + manager.backups().getVolumeRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); } } ``` @@ -879,7 +461,8 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/CheckFilePathAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -887,7 +470,10 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest().withName("my-exact-filepth").withSubnetId("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), com.azure.core.util.Context.NONE); + manager.netAppResources().checkFilePathAvailabilityWithResponse("eastus", + new FilePathAvailabilityRequest().withName("my-exact-filepth").withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + com.azure.core.util.Context.NONE); } } ``` @@ -897,14 +483,14 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { ```java import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import java.util.stream.Collectors; /** * Samples for NetAppResource CheckNameAvailability. */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/CheckNameAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -912,7 +498,10 @@ public final class NetAppResourceCheckNameAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkNameAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkNameAvailabilityWithResponse("eastus", new ResourceNameAvailabilityRequest().withName("accName").withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), com.azure.core.util.Context.NONE); + manager.netAppResources().checkNameAvailabilityWithResponse("eastus", + new ResourceNameAvailabilityRequest().withName("accName") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), + com.azure.core.util.Context.NONE); } } ``` @@ -922,14 +511,14 @@ public final class NetAppResourceCheckNameAvailabilitySamples { ```java import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import java.util.stream.Collectors; /** * Samples for NetAppResource CheckQuotaAvailability. */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/CheckQuotaAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -937,7 +526,10 @@ public final class NetAppResourceCheckQuotaAvailabilitySamples { * @param manager Entry point to NetAppFilesManager. */ public static void checkQuotaAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().checkQuotaAvailabilityWithResponse("eastus", new QuotaAvailabilityRequest().withName("resource1").withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), com.azure.core.util.Context.NONE); + manager.netAppResources().checkQuotaAvailabilityWithResponse("eastus", + new QuotaAvailabilityRequest().withName("resource1") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("myRG"), + com.azure.core.util.Context.NONE); } } ``` @@ -952,7 +544,8 @@ import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/NetworkSiblingSet_Query.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -960,7 +553,10 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void networkSiblingSetQuery(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333").withSubnetId("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), com.azure.core.util.Context.NONE); + manager.netAppResources().queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() + .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333").withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + com.azure.core.util.Context.NONE); } } ``` @@ -973,7 +569,8 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/RegionInfo.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/RegionInfo.json */ /** * Sample code: RegionInfo_Query. @@ -991,14 +588,14 @@ public final class NetAppResourceQueryRegionInfoSamples { ```java import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; -import java.util.stream.Collectors; /** * Samples for NetAppResource UpdateNetworkSiblingSet. */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/NetworkSiblingSet_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -1006,7 +603,12 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void networkFeaturesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333").withSubnetId("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet").withNetworkSiblingSetStateId("12345_44420.8001578125").withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); + manager.netAppResources().updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() + .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + .withNetworkSiblingSetStateId("12345_44420.8001578125").withNetworkFeatures(NetworkFeatures.STANDARD), + com.azure.core.util.Context.NONE); } } ``` @@ -1019,7 +621,8 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/QuotaLimits_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -1027,7 +630,8 @@ public final class NetAppResourceQuotaLimitsGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimits().getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", com.azure.core.util.Context.NONE); + manager.netAppResourceQuotaLimits().getWithResponse("eastus", "totalCoolAccessVolumesPerSubscription", + com.azure.core.util.Context.NONE); } } ``` @@ -1040,7 +644,8 @@ public final class NetAppResourceQuotaLimitsGetSamples { */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/QuotaLimits_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -1053,48 +658,6 @@ public final class NetAppResourceQuotaLimitsListSamples { } ``` -### NetAppResourceRegionInfos_Get - -```java -/** - * Samples for NetAppResourceRegionInfos Get. - */ -public final class NetAppResourceRegionInfosGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/RegionInfos_Get.json - */ - /** - * Sample code: RegionInfos_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void regionInfosGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceRegionInfos().getWithResponse("eastus", com.azure.core.util.Context.NONE); - } -} -``` - -### NetAppResourceRegionInfos_List - -```java -/** - * Samples for NetAppResourceRegionInfos List. - */ -public final class NetAppResourceRegionInfosListSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/RegionInfos_List.json - */ - /** - * Sample code: RegionInfos_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void regionInfosList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceRegionInfos().list("eastus", com.azure.core.util.Context.NONE); - } -} -``` - ### Operations_List ```java @@ -1103,7 +666,8 @@ public final class NetAppResourceRegionInfosListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/OperationList.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/OperationList.json */ /** * Sample code: OperationList. @@ -1121,14 +685,14 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.netapp.models.QosType; import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.stream.Collectors; /** * Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1136,7 +700,8 @@ public final class PoolsCreateOrUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void poolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().define("pool1").withRegion("eastus").withExistingNetAppAccount("myRG", "account1").withSize(4398046511104L).withServiceLevel(ServiceLevel.PREMIUM).withQosType(QosType.AUTO).create(); + manager.pools().define("pool1").withRegion("eastus").withExistingNetAppAccount("myRG", "account1") + .withSize(4398046511104L).withServiceLevel(ServiceLevel.PREMIUM).withQosType(QosType.AUTO).create(); } } ``` @@ -1149,7 +714,8 @@ public final class PoolsCreateOrUpdateSamples { */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1170,7 +736,8 @@ public final class PoolsDeleteSamples { */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1191,7 +758,8 @@ public final class PoolsGetSamples { */ public final class PoolsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_List.json */ /** * Sample code: Pools_List. @@ -1214,7 +782,8 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -1222,7 +791,8 @@ public final class PoolsUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void poolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - CapacityPool resource = manager.pools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE).getValue(); + CapacityPool resource + = manager.pools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } @@ -1241,7 +811,8 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -1249,7 +820,15 @@ public final class SnapshotPoliciesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().define("snapshotPolicyName").withRegion("eastus").withExistingNetAppAccount("myRG", "account1").withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)).withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)).withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)).withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)).withEnabled(true).create(); + manager.snapshotPolicies().define("snapshotPolicyName").withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule( + new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) + .withMonthlySchedule( + new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) + .withEnabled(true).create(); } } ``` @@ -1262,7 +841,8 @@ public final class SnapshotPoliciesCreateSamples { */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -1270,7 +850,8 @@ public final class SnapshotPoliciesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("resourceGroup", "accountName", "snapshotPolicyName", + com.azure.core.util.Context.NONE); } } ``` @@ -1283,7 +864,8 @@ public final class SnapshotPoliciesDeleteSamples { */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -1291,7 +873,8 @@ public final class SnapshotPoliciesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().getWithResponse("myRG", "account1", "snapshotPolicyName", + com.azure.core.util.Context.NONE); } } ``` @@ -1304,7 +887,8 @@ public final class SnapshotPoliciesGetSamples { */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -1325,7 +909,9 @@ public final class SnapshotPoliciesListSamples { */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_ListVolumes. + * json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -1333,7 +919,8 @@ public final class SnapshotPoliciesListVolumesSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesListVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().listVolumesWithResponse("myRG", "account1", "snapshotPolicyName", + com.azure.core.util.Context.NONE); } } ``` @@ -1352,7 +939,8 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -1360,8 +948,15 @@ public final class SnapshotPoliciesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - SnapshotPolicy resource = manager.snapshotPolicies().getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE).getValue(); - resource.update().withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)).withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)).withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)).withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)).withEnabled(true).apply(); + SnapshotPolicy resource = manager.snapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE).getValue(); + resource.update().withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule( + new WeeklySchedule().withSnapshotsToKeep(3).withDay("Wednesday").withHour(14).withMinute(45)) + .withMonthlySchedule( + new MonthlySchedule().withSnapshotsToKeep(5).withDaysOfMonth("10,11,12").withHour(14).withMinute(15)) + .withEnabled(true).apply(); } } ``` @@ -1374,7 +969,8 @@ public final class SnapshotPoliciesUpdateSamples { */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -1382,7 +978,8 @@ public final class SnapshotsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().define("snapshot1").withRegion("eastus").withExistingVolume("myRG", "account1", "pool1", "volume1").create(); + manager.snapshots().define("snapshot1").withRegion("eastus") + .withExistingVolume("myRG", "account1", "pool1", "volume1").create(); } } ``` @@ -1395,7 +992,8 @@ public final class SnapshotsCreateSamples { */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -1403,7 +1001,8 @@ public final class SnapshotsDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + manager.snapshots().delete("myRG", "account1", "pool1", "volume1", "snapshot1", + com.azure.core.util.Context.NONE); } } ``` @@ -1416,7 +1015,8 @@ public final class SnapshotsDeleteSamples { */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -1424,7 +1024,8 @@ public final class SnapshotsGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + manager.snapshots().getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", + com.azure.core.util.Context.NONE); } } ``` @@ -1437,7 +1038,8 @@ public final class SnapshotsGetSamples { */ public final class SnapshotsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -1461,7 +1063,9 @@ import java.util.Arrays; */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_SingleFileRestore.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_SingleFileRestore. + * json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -1469,7 +1073,9 @@ public final class SnapshotsRestoreFilesSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().restoreFiles("myRG", "account1", "pool1", "volume1", "snapshot1", new SnapshotRestoreFiles().withFilePaths(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")), com.azure.core.util.Context.NONE); + manager.snapshots().restoreFiles("myRG", "account1", "pool1", "volume1", "snapshot1", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")), + com.azure.core.util.Context.NONE); } } ``` @@ -1486,7 +1092,8 @@ import java.io.IOException; */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. @@ -1494,7 +1101,10 @@ public final class SnapshotsUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void snapshotsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) throws IOException { - manager.snapshots().update("myRG", "account1", "pool1", "volume1", "snapshot1", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); + manager.snapshots() + .update("myRG", "account1", "pool1", "volume1", "snapshot1", SerializerFactory + .createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); } } ``` @@ -1507,7 +1117,8 @@ public final class SnapshotsUpdateSamples { */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -1515,7 +1126,8 @@ public final class SubvolumesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().define("subvolume1").withExistingVolume("myRG", "account1", "pool1", "volume1").withPath("/subvolumePath").create(); + manager.subvolumes().define("subvolume1").withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/subvolumePath").create(); } } ``` @@ -1528,7 +1140,8 @@ public final class SubvolumesCreateSamples { */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -1536,7 +1149,8 @@ public final class SubvolumesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().delete("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); + manager.subvolumes().delete("myRG", "account1", "pool1", "volume1", "subvolume1", + com.azure.core.util.Context.NONE); } } ``` @@ -1549,7 +1163,8 @@ public final class SubvolumesDeleteSamples { */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -1557,7 +1172,8 @@ public final class SubvolumesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); + manager.subvolumes().getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", + com.azure.core.util.Context.NONE); } } ``` @@ -1570,7 +1186,8 @@ public final class SubvolumesGetSamples { */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Metadata.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -1578,7 +1195,8 @@ public final class SubvolumesGetMetadataSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesMetadata(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().getMetadata("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE); + manager.subvolumes().getMetadata("myRG", "account1", "pool1", "volume1", "subvolume1", + com.azure.core.util.Context.NONE); } } ``` @@ -1591,7 +1209,8 @@ public final class SubvolumesGetMetadataSamples { */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -1614,7 +1233,8 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -1622,7 +1242,9 @@ public final class SubvolumesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void subvolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - SubvolumeInfo resource = manager.subvolumes().getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE).getValue(); + SubvolumeInfo resource = manager.subvolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", "subvolume1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withPath("/subvolumePath").apply(); } } @@ -1638,14 +1260,15 @@ import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import java.util.Arrays; -import java.util.stream.Collectors; /** * Samples for VolumeGroups Create. */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_Create_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_SapHana. + * json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -1653,11 +1276,102 @@ public final class VolumeGroupsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion("westus").withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group").withApplicationType(ApplicationType.SAP_HANA).withApplicationIdentifier("SH9")).withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-data-mnt00001").withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withProximityPlacementGroup("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg").withVolumeSpecName("data"), new VolumeGroupVolumeProperties().withName("test-log-mnt00001").withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withProximityPlacementGroup("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg").withVolumeSpecName("log"), new VolumeGroupVolumeProperties().withName("test-shared").withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withProximityPlacementGroup("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg").withVolumeSpecName("shared"), new VolumeGroupVolumeProperties().withName("test-data-backup").withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withProximityPlacementGroup("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg").withVolumeSpecName("data-backup"), new VolumeGroupVolumeProperties().withName("test-log-backup").withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withProximityPlacementGroup("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg").withVolumeSpecName("log-backup"))).create(); - } - - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_Create_Oracle.json + manager + .volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion( + "westus") + .withGroupMetadata( + new VolumeGroupMetadata() + .withGroupDescription("Volume group").withApplicationType( + ApplicationType.SAP_HANA) + .withApplicationIdentifier("SH9")) + .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-data-mnt00001") + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("data"), + new VolumeGroupVolumeProperties().withName("test-log-mnt00001") + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("log"), + new VolumeGroupVolumeProperties().withName("test-shared").withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("shared"), + new VolumeGroupVolumeProperties().withName("test-data-backup").withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("data-backup"), + new VolumeGroupVolumeProperties().withName("test-log-backup").withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("log-backup"))) + .create(); + } + + /* + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -1665,7 +1379,195 @@ public final class VolumeGroupsCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion("westus").withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group").withApplicationType(ApplicationType.ORACLE).withApplicationIdentifier("OR2")).withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-ora-data1").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data1"), new VolumeGroupVolumeProperties().withName("test-ora-data2").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data2"), new VolumeGroupVolumeProperties().withName("test-ora-data3").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data3"), new VolumeGroupVolumeProperties().withName("test-ora-data4").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data4"), new VolumeGroupVolumeProperties().withName("test-ora-data5").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data5"), new VolumeGroupVolumeProperties().withName("test-ora-data6").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data6"), new VolumeGroupVolumeProperties().withName("test-ora-data7").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data7"), new VolumeGroupVolumeProperties().withName("test-ora-data8").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-data8"), new VolumeGroupVolumeProperties().withName("test-ora-log").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-log"), new VolumeGroupVolumeProperties().withName("test-ora-log-mirror").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-log-mirror"), new VolumeGroupVolumeProperties().withName("test-ora-binary").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-binary"), new VolumeGroupVolumeProperties().withName("test-ora-backup").withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L).withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))).withProtocolTypes(Arrays.asList("NFSv4.1")).withSubnetId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withThroughputMibps(10.0F).withCapacityPoolResourceId("/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1").withVolumeSpecName("ora-backup"))).create(); + manager + .volumeGroups().define("group1").withExistingNetAppAccount("myRG", "account1").withRegion( + "westus") + .withGroupMetadata( + new VolumeGroupMetadata() + .withGroupDescription("Volume group").withApplicationType( + ApplicationType.ORACLE) + .withApplicationIdentifier("OR2")) + .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-ora-data1") + .withZones(Arrays.asList("1")).withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data1"), + new VolumeGroupVolumeProperties().withName("test-ora-data2").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data2"), + new VolumeGroupVolumeProperties().withName("test-ora-data3").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data3"), + new VolumeGroupVolumeProperties().withName("test-ora-data4").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data4"), + new VolumeGroupVolumeProperties().withName("test-ora-data5").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data5"), + new VolumeGroupVolumeProperties().withName("test-ora-data6").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data6"), + new VolumeGroupVolumeProperties().withName("test-ora-data7").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data7"), + new VolumeGroupVolumeProperties().withName("test-ora-data8").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-data8"), + new VolumeGroupVolumeProperties().withName("test-ora-log").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-log"), + new VolumeGroupVolumeProperties().withName("test-ora-log-mirror").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-log-mirror"), + new VolumeGroupVolumeProperties().withName("test-ora-binary").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-binary"), + new VolumeGroupVolumeProperties().withName("test-ora-backup").withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder").withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withExportPolicy(new VolumePropertiesExportPolicy().withRules(Arrays.asList(new ExportPolicyRule() + .withRuleIndex(1).withUnixReadOnly(true).withUnixReadWrite(true).withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(false).withKerberos5IReadOnly(false).withKerberos5IReadWrite(false) + .withKerberos5PReadOnly(false).withKerberos5PReadWrite(false).withCifs(false).withNfsv3(false) + .withNfsv41(true).withAllowedClients("0.0.0.0/0").withHasRootAccess(true)))) + .withProtocolTypes(Arrays.asList("NFSv4.1")) + .withSubnetId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/d633cc2e-722b-4ae1-b636-bbd9e4c60ed9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-backup"))) + .create(); } } ``` @@ -1678,7 +1580,8 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -1699,7 +1602,8 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_Get_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -1711,7 +1615,8 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_Get_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -1732,7 +1637,8 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_List_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -1744,7 +1650,8 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_List_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -1761,14 +1668,14 @@ public final class VolumeGroupsListByNetAppAccountSamples { ```java import com.azure.resourcemanager.netapp.models.Type; -import java.util.stream.Collectors; /** * Samples for VolumeQuotaRules Create. */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -1776,7 +1683,9 @@ public final class VolumeQuotaRulesCreateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeQuotaRulesCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeQuotaRules().define("rule-0004").withRegion("westus").withExistingVolume("myRG", "account-9957", "pool-5210", "volume-6387").withQuotaSizeInKiBs(100005L).withQuotaType(Type.INDIVIDUAL_USER_QUOTA).withQuotaTarget("1821").create(); + manager.volumeQuotaRules().define("rule-0004").withRegion("westus") + .withExistingVolume("myRG", "account-9957", "pool-5210", "volume-6387").withQuotaSizeInKiBs(100005L) + .withQuotaType(Type.INDIVIDUAL_USER_QUOTA).withQuotaTarget("1821").create(); } } ``` @@ -1789,7 +1698,8 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -1797,7 +1707,8 @@ public final class VolumeQuotaRulesDeleteSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeQuotaRulesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeQuotaRules().delete("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", com.azure.core.util.Context.NONE); + manager.volumeQuotaRules().delete("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", + com.azure.core.util.Context.NONE); } } ``` @@ -1810,7 +1721,8 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -1818,7 +1730,8 @@ public final class VolumeQuotaRulesGetSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeQuotaRulesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeQuotaRules().getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", com.azure.core.util.Context.NONE); + manager.volumeQuotaRules().getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", + com.azure.core.util.Context.NONE); } } ``` @@ -1831,7 +1744,8 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -1839,7 +1753,8 @@ public final class VolumeQuotaRulesListByVolumeSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeQuotaRulesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumeQuotaRules().listByVolume("myRG", "account-9957", "pool-5210", "volume-6387", com.azure.core.util.Context.NONE); + manager.volumeQuotaRules().listByVolume("myRG", "account-9957", "pool-5210", "volume-6387", + com.azure.core.util.Context.NONE); } } ``` @@ -1854,7 +1769,8 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -1862,7 +1778,8 @@ public final class VolumeQuotaRulesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumeQuotaRulesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - VolumeQuotaRule resource = manager.volumeQuotaRules().getWithResponse("myRG", "account-9957", "pool-5210", "volume-6387", "rule-0004", com.azure.core.util.Context.NONE).getValue(); + VolumeQuotaRule resource = manager.volumeQuotaRules().getWithResponse("myRG", "account-9957", "pool-5210", + "volume-6387", "rule-0004", com.azure.core.util.Context.NONE).getValue(); resource.update().withQuotaSizeInKiBs(100009L).apply(); } } @@ -1878,7 +1795,9 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_AuthorizeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_AuthorizeReplication. + * json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -1886,7 +1805,10 @@ public final class VolumesAuthorizeReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesAuthorizeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().authorizeReplication("myRG", "account1", "pool1", "volume1", new AuthorizeRequest().withRemoteVolumeResourceId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), com.azure.core.util.Context.NONE); + manager.volumes().authorizeReplication("myRG", "account1", "pool1", "volume1", + new AuthorizeRequest().withRemoteVolumeResourceId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRemoteRG/providers/Microsoft.NetApp/netAppAccounts/remoteAccount1/capacityPools/remotePool1/volumes/remoteVolume1"), + com.azure.core.util.Context.NONE); } } ``` @@ -1901,7 +1823,8 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_BreakFileLocks.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -1909,7 +1832,9 @@ public final class VolumesBreakFileLocksSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesBreakFileLocks(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().breakFileLocks("myRG", "account1", "pool1", "volume1", new BreakFileLocksRequest().withClientIp("101.102.103.104").withConfirmRunningDisruptiveOperation(true), com.azure.core.util.Context.NONE); + manager.volumes().breakFileLocks("myRG", "account1", "pool1", "volume1", + new BreakFileLocksRequest().withClientIp("101.102.103.104").withConfirmRunningDisruptiveOperation(true), + com.azure.core.util.Context.NONE); } } ``` @@ -1924,7 +1849,8 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_BreakReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -1932,7 +1858,8 @@ public final class VolumesBreakReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesBreakReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().breakReplication("myRG", "account1", "pool1", "volume1", new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); + manager.volumes().breakReplication("myRG", "account1", "pool1", "volume1", + new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); } } ``` @@ -1940,16 +1867,15 @@ public final class VolumesBreakReplicationSamples { ### Volumes_CreateOrUpdate ```java -import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.stream.Collectors; /** * Samples for Volumes CreateOrUpdate. */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -1957,7 +1883,11 @@ public final class VolumesCreateOrUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().define("volume1").withRegion("eastus").withExistingCapacityPool("myRG", "account1", "pool1").withCreationToken("my-unique-file-path").withUsageThreshold(107374182400L).withSubnetId("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3").withServiceLevel(ServiceLevel.PREMIUM).withThroughputMibps(128.0F).withEncryptionKeySource(EncryptionKeySource.MICROSOFT_KEY_VAULT).create(); + manager.volumes().define("volume1").withRegion("eastus").withExistingCapacityPool("myRG", "account1", "pool1") + .withCreationToken("my-unique-file-path").withUsageThreshold(107374182400L) + .withSubnetId( + "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withServiceLevel(ServiceLevel.PREMIUM).create(); } } ``` @@ -1970,7 +1900,8 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -1991,7 +1922,8 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_DeleteReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -2012,7 +1944,8 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_FinalizeRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -2033,7 +1966,8 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -2054,7 +1988,8 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -2077,7 +2012,8 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/GroupIdListForLDAPUser.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -2085,7 +2021,8 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { * @param manager Entry point to NetAppFilesManager. */ public static void getGroupIdListForUser(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().listGetGroupIdListForLdapUser("myRG", "account1", "pool1", "volume1", new GetGroupIdListForLdapUserRequest().withUsername("user1"), com.azure.core.util.Context.NONE); + manager.volumes().listGetGroupIdListForLdapUser("myRG", "account1", "pool1", "volume1", + new GetGroupIdListForLdapUserRequest().withUsername("user1"), com.azure.core.util.Context.NONE); } } ``` @@ -2098,7 +2035,8 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_ListReplications.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -2121,7 +2059,8 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_PoolChange.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -2129,7 +2068,10 @@ public final class VolumesPoolChangeSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesAuthorizeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().poolChange("myRG", "account1", "pool1", "volume1", new PoolChangeRequest().withNewPoolResourceId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), com.azure.core.util.Context.NONE); + manager.volumes().poolChange("myRG", "account1", "pool1", "volume1", + new PoolChangeRequest().withNewPoolResourceId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1"), + com.azure.core.util.Context.NONE); } } ``` @@ -2142,7 +2084,8 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/ + * Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -2150,7 +2093,8 @@ public final class VolumesPopulateAvailabilityZoneSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesPopulateAvailabilityZones(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().populateAvailabilityZone("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + manager.volumes().populateAvailabilityZone("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); } } ``` @@ -2163,7 +2107,9 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_ReInitializeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReInitializeReplication + * .json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -2171,7 +2117,8 @@ public final class VolumesReInitializeReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReInitializeReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reInitializeReplication("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + manager.volumes().reInitializeReplication("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); } } ``` @@ -2186,7 +2133,9 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_ReestablishReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReestablishReplication. + * json */ /** * Sample code: Volumes_ReestablishReplication. @@ -2194,7 +2143,10 @@ public final class VolumesReestablishReplicationSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReestablishReplication(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().reestablishReplication("myRG", "account1", "pool1", "volume1", new ReestablishReplicationRequest().withSourceVolumeId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), com.azure.core.util.Context.NONE); + manager.volumes().reestablishReplication("myRG", "account1", "pool1", "volume1", + new ReestablishReplicationRequest().withSourceVolumeId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/mySourceRG/providers/Microsoft.NetApp/netAppAccounts/sourceAccount1/capacityPools/sourcePool1/volumes/sourceVolume1"), + com.azure.core.util.Context.NONE); } } ``` @@ -2209,7 +2161,8 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Relocate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -2217,7 +2170,8 @@ public final class VolumesRelocateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRelocate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().relocate("myRG", "account1", "pool1", "volume1", new RelocateVolumeRequest(), com.azure.core.util.Context.NONE); + manager.volumes().relocate("myRG", "account1", "pool1", "volume1", new RelocateVolumeRequest(), + com.azure.core.util.Context.NONE); } } ``` @@ -2230,7 +2184,8 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -2238,7 +2193,8 @@ public final class VolumesReplicationStatusSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesReplicationStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + manager.volumes().replicationStatusWithResponse("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); } } ``` @@ -2251,7 +2207,8 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_ResetCifsPassword.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -2272,7 +2229,8 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_ResyncReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -2295,7 +2253,8 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Revert.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -2303,7 +2262,9 @@ public final class VolumesRevertSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().revert("myRG", "account1", "pool1", "volume1", new VolumeRevert().withSnapshotId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), com.azure.core.util.Context.NONE); + manager.volumes().revert("myRG", "account1", "pool1", "volume1", new VolumeRevert().withSnapshotId( + "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1/snapshots/snapshot1"), + com.azure.core.util.Context.NONE); } } ``` @@ -2316,7 +2277,8 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_RevertRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -2329,40 +2291,18 @@ public final class VolumesRevertRelocationSamples { } ``` -### Volumes_SplitCloneFromParent - -```java -/** - * Samples for Volumes SplitCloneFromParent. - */ -public final class VolumesSplitCloneFromParentSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_SplitClone.json - */ - /** - * Sample code: Volumes_SplitClone. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesSplitClone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().splitCloneFromParent("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); - } -} -``` - ### Volumes_Update ```java import com.azure.resourcemanager.netapp.models.Volume; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; /** * Samples for Volumes Update. */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. @@ -2370,8 +2310,9 @@ public final class VolumesUpdateSamples { * @param manager Entry point to NetAppFilesManager. */ public static void volumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Volume resource = manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withDataProtection(new VolumePatchPropertiesDataProtection().withBackup(new VolumeBackupProperties().withPolicyEnforced(false).withBackupEnabled(true).withBackupVaultId("/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"))).apply(); + Volume resource = manager.volumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE).getValue(); + resource.update().apply(); } } ``` diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index 43edaeabb912..b7df85539e9f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-netapp - 1.1.0-beta.2 + 1.1.0 jar Microsoft Azure SDK for NetAppFiles Management - This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2023-05. + This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2023-07-01. https://github.com/Azure/azure-sdk-for-java @@ -88,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java index d8661e69069c..71c237b9770f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java @@ -24,17 +24,11 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; -import com.azure.resourcemanager.netapp.implementation.AccountBackupsImpl; import com.azure.resourcemanager.netapp.implementation.AccountsImpl; import com.azure.resourcemanager.netapp.implementation.BackupPoliciesImpl; -import com.azure.resourcemanager.netapp.implementation.BackupVaultsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsImpl; -import com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsImpl; -import com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsImpl; -import com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesImpl; import com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; -import com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosImpl; import com.azure.resourcemanager.netapp.implementation.NetAppResourcesImpl; import com.azure.resourcemanager.netapp.implementation.OperationsImpl; import com.azure.resourcemanager.netapp.implementation.PoolsImpl; @@ -44,16 +38,10 @@ import com.azure.resourcemanager.netapp.implementation.VolumeGroupsImpl; import com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesImpl; import com.azure.resourcemanager.netapp.implementation.VolumesImpl; -import com.azure.resourcemanager.netapp.models.AccountBackups; import com.azure.resourcemanager.netapp.models.Accounts; import com.azure.resourcemanager.netapp.models.BackupPolicies; -import com.azure.resourcemanager.netapp.models.BackupVaults; import com.azure.resourcemanager.netapp.models.Backups; -import com.azure.resourcemanager.netapp.models.BackupsUnderAccounts; -import com.azure.resourcemanager.netapp.models.BackupsUnderBackupVaults; -import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; -import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; import com.azure.resourcemanager.netapp.models.NetAppResources; import com.azure.resourcemanager.netapp.models.Operations; import com.azure.resourcemanager.netapp.models.Pools; @@ -81,8 +69,6 @@ public final class NetAppFilesManager { private NetAppResourceQuotaLimits netAppResourceQuotaLimits; - private NetAppResourceRegionInfos netAppResourceRegionInfos; - private Accounts accounts; private Pools pools; @@ -95,8 +81,6 @@ public final class NetAppFilesManager { private Backups backups; - private AccountBackups accountBackups; - private BackupPolicies backupPolicies; private VolumeQuotaRules volumeQuotaRules; @@ -105,14 +89,6 @@ public final class NetAppFilesManager { private Subvolumes subvolumes; - private BackupVaults backupVaults; - - private BackupsUnderBackupVaults backupsUnderBackupVaults; - - private BackupsUnderVolumes backupsUnderVolumes; - - private BackupsUnderAccounts backupsUnderAccounts; - private final NetAppManagementClient clientObject; private NetAppFilesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -272,7 +248,7 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.netapp").append("/") - .append("1.1.0-beta.1"); + .append("1.1.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") @@ -348,19 +324,6 @@ public NetAppResourceQuotaLimits netAppResourceQuotaLimits() { return netAppResourceQuotaLimits; } - /** - * Gets the resource collection API of NetAppResourceRegionInfos. - * - * @return Resource collection API of NetAppResourceRegionInfos. - */ - public NetAppResourceRegionInfos netAppResourceRegionInfos() { - if (this.netAppResourceRegionInfos == null) { - this.netAppResourceRegionInfos - = new NetAppResourceRegionInfosImpl(clientObject.getNetAppResourceRegionInfos(), this); - } - return netAppResourceRegionInfos; - } - /** * Gets the resource collection API of Accounts. It manages NetAppAccount. * @@ -422,7 +385,7 @@ public SnapshotPolicies snapshotPolicies() { } /** - * Gets the resource collection API of Backups. It manages Backup. + * Gets the resource collection API of Backups. * * @return Resource collection API of Backups. */ @@ -433,18 +396,6 @@ public Backups backups() { return backups; } - /** - * Gets the resource collection API of AccountBackups. - * - * @return Resource collection API of AccountBackups. - */ - public AccountBackups accountBackups() { - if (this.accountBackups == null) { - this.accountBackups = new AccountBackupsImpl(clientObject.getAccountBackups(), this); - } - return accountBackups; - } - /** * Gets the resource collection API of BackupPolicies. It manages BackupPolicy. * @@ -493,55 +444,6 @@ public Subvolumes subvolumes() { return subvolumes; } - /** - * Gets the resource collection API of BackupVaults. It manages BackupVault. - * - * @return Resource collection API of BackupVaults. - */ - public BackupVaults backupVaults() { - if (this.backupVaults == null) { - this.backupVaults = new BackupVaultsImpl(clientObject.getBackupVaults(), this); - } - return backupVaults; - } - - /** - * Gets the resource collection API of BackupsUnderBackupVaults. - * - * @return Resource collection API of BackupsUnderBackupVaults. - */ - public BackupsUnderBackupVaults backupsUnderBackupVaults() { - if (this.backupsUnderBackupVaults == null) { - this.backupsUnderBackupVaults - = new BackupsUnderBackupVaultsImpl(clientObject.getBackupsUnderBackupVaults(), this); - } - return backupsUnderBackupVaults; - } - - /** - * Gets the resource collection API of BackupsUnderVolumes. - * - * @return Resource collection API of BackupsUnderVolumes. - */ - public BackupsUnderVolumes backupsUnderVolumes() { - if (this.backupsUnderVolumes == null) { - this.backupsUnderVolumes = new BackupsUnderVolumesImpl(clientObject.getBackupsUnderVolumes(), this); - } - return backupsUnderVolumes; - } - - /** - * Gets the resource collection API of BackupsUnderAccounts. - * - * @return Resource collection API of BackupsUnderAccounts. - */ - public BackupsUnderAccounts backupsUnderAccounts() { - if (this.backupsUnderAccounts == null) { - this.backupsUnderAccounts = new BackupsUnderAccountsImpl(clientObject.getBackupsUnderAccounts(), this); - } - return backupsUnderAccounts; - } - /** * Gets wrapped service client NetAppManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.java deleted file mode 100644 index 0210a2d5ac51..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountBackupsClient.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent; - -import com.azure.core.annotation.ReturnType; -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.netapp.fluent.models.BackupInner; - -/** - * An instance of this class provides access to all the operations defined in AccountBackupsClient. - */ -public interface AccountBackupsClient { - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, - String includeOnlyBackupsFromDeletedVolumes, Context context); - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String backupName, - Context context); - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner get(String resourceGroupName, String accountName, String backupName); - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupName); - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupName, - Context context); - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String backupName); - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String backupName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java index 2e4f838e9140..b82f0b74cb0a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; /** @@ -367,72 +366,4 @@ SyncPoller, Void> beginRenewCredentials(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) void renewCredentials(String resourceGroupName, String accountName, Context context); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateEncryptionKey(String resourceGroupName, String accountName); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateEncryptionKey(String resourceGroupName, String accountName, - EncryptionMigrationRequest body, Context context); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateEncryptionKey(String resourceGroupName, String accountName); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, - Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java deleted file mode 100644 index 0abfd494ddcd..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent; - -import com.azure.core.annotation.ReturnType; -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.netapp.fluent.models.BackupVaultInner; -import com.azure.resourcemanager.netapp.models.BackupVaultPatch; - -/** - * An instance of this class provides access to all the operations defined in BackupVaultsClient. - */ -public interface BackupVaultsClient { - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context); - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 Backup Vault along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - Context context); - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName); - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultInner body); - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultInner body, Context context); - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultInner body); - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultInner body, Context context); - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, String accountName, - String backupVaultName, BackupVaultPatch body); - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, String accountName, - String backupVaultName, BackupVaultPatch body, Context context); - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultPatch body); - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, BackupVaultPatch body, - Context context); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupVaultName); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, - Context context); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String backupVaultName); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String backupVaultName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java index 26588b590f70..7bc0fc889803 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java @@ -6,56 +6,14 @@ import com.azure.core.annotation.ReturnType; 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.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; -import com.azure.resourcemanager.netapp.models.BackupPatch; /** * An instance of this class provides access to all the operations defined in BackupsClient. */ public interface BackupsClient { - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getLatestStatusWithResponse(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context); - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupStatusInner getLatestStatus(String resourceGroupName, String accountName, String poolName, String volumeName); - /** * Get volume's restore status * @@ -92,300 +50,4 @@ Response getVolumeRestoreStatusWithResponse(String resourceG @ServiceMethod(returns = ReturnType.SINGLE) RestoreStatusInner getVolumeRestoreStatus(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, - String filter, Context context); - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - String backupName, Context context); - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName); - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupInner body); - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupInner body, Context context); - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupInner body); - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupInner body, Context context); - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, - String backupVaultName, String backupName); - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupPatch body, Context context); - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName); - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupPatch body, Context context); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, - String backupName); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, - String backupName, Context context); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, - Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java deleted file mode 100644 index c6c412209142..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - -/** - * An instance of this class provides access to all the operations defined in BackupsUnderAccountsClient. - */ -public interface BackupsUnderAccountsClient { - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - BackupsMigrationRequest body); - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - BackupsMigrationRequest body, Context context); - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body); - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java deleted file mode 100644 index 590bf356e98e..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; - -/** - * An instance of this class provides access to all the operations defined in BackupsUnderBackupVaultsClient. - */ -public interface BackupsUnderBackupVaultsClient { - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestoreFiles(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body); - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestoreFiles(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body, Context context); - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body); - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java deleted file mode 100644 index 6f8b97e2af64..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - -/** - * An instance of this class provides access to all the operations defined in BackupsUnderVolumesClient. - */ -public interface BackupsUnderVolumesClient { - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - String poolName, String volumeName, BackupsMigrationRequest body); - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - String poolName, String volumeName, BackupsMigrationRequest body, Context context); - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body); - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java index a17af7c45614..340aad54fa12 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java @@ -67,13 +67,6 @@ public interface NetAppManagementClient { */ NetAppResourceQuotaLimitsClient getNetAppResourceQuotaLimits(); - /** - * Gets the NetAppResourceRegionInfosClient object to access its operations. - * - * @return the NetAppResourceRegionInfosClient object. - */ - NetAppResourceRegionInfosClient getNetAppResourceRegionInfos(); - /** * Gets the AccountsClient object to access its operations. * @@ -116,13 +109,6 @@ public interface NetAppManagementClient { */ BackupsClient getBackups(); - /** - * Gets the AccountBackupsClient object to access its operations. - * - * @return the AccountBackupsClient object. - */ - AccountBackupsClient getAccountBackups(); - /** * Gets the BackupPoliciesClient object to access its operations. * @@ -150,32 +136,4 @@ public interface NetAppManagementClient { * @return the SubvolumesClient object. */ SubvolumesClient getSubvolumes(); - - /** - * Gets the BackupVaultsClient object to access its operations. - * - * @return the BackupVaultsClient object. - */ - BackupVaultsClient getBackupVaults(); - - /** - * Gets the BackupsUnderBackupVaultsClient object to access its operations. - * - * @return the BackupsUnderBackupVaultsClient object. - */ - BackupsUnderBackupVaultsClient getBackupsUnderBackupVaults(); - - /** - * Gets the BackupsUnderVolumesClient object to access its operations. - * - * @return the BackupsUnderVolumesClient object. - */ - BackupsUnderVolumesClient getBackupsUnderVolumes(); - - /** - * Gets the BackupsUnderAccountsClient object to access its operations. - * - * @return the BackupsUnderAccountsClient object. - */ - BackupsUnderAccountsClient getBackupsUnderAccounts(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java deleted file mode 100644 index d1077d2c2671..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; - -/** - * An instance of this class provides access to all the operations defined in NetAppResourceRegionInfosClient. - */ -public interface NetAppResourceRegionInfosClient { - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 information regarding regionInfo Item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, Context context); - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 regarding regionInfo Item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegionInfoResourceInner get(String location); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java index 8e462ed9f30d..b6142c79bf04 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java @@ -549,77 +549,6 @@ SyncPoller, Void> beginResetCifsPassword(String resourceGroupNa void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginSplitCloneFromParent(String resourceGroupName, String accountName, - String poolName, String volumeName); - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginSplitCloneFromParent(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context); - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, - Context context); - /** * Break file locks * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java index 20f8de0f1a7b..710f5eea907d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java @@ -39,19 +39,6 @@ public final class AccountProperties { @JsonProperty(value = "disableShowmount", access = JsonProperty.Access.WRITE_ONLY) private Boolean disableShowmount; - /* - * Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and - * region and only affect non ldap NFSv4 volumes. - */ - @JsonProperty(value = "nfsV4IDDomain") - private String nfsV4IdDomain; - - /* - * This will have true value only if account is Multiple AD enabled. - */ - @JsonProperty(value = "isMultiAdEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isMultiAdEnabled; - /** * Creates an instance of AccountProperties class. */ @@ -117,37 +104,6 @@ public Boolean disableShowmount() { return this.disableShowmount; } - /** - * Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @return the nfsV4IdDomain value. - */ - public String nfsV4IdDomain() { - return this.nfsV4IdDomain; - } - - /** - * Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @param nfsV4IdDomain the nfsV4IdDomain value to set. - * @return the AccountProperties object itself. - */ - public AccountProperties withNfsV4IdDomain(String nfsV4IdDomain) { - this.nfsV4IdDomain = nfsV4IdDomain; - return this; - } - - /** - * Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. - * - * @return the isMultiAdEnabled value. - */ - public Boolean isMultiAdEnabled() { - return this.isMultiAdEnabled; - } - /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java deleted file mode 100644 index cf88de99c399..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** - * Backup under a Backup Vault. - */ -@Fluent -public final class BackupInner extends ProxyResource { - /* - * Backup Properties - */ - @JsonProperty(value = "properties", required = true) - private BackupProperties innerProperties = new BackupProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Creates an instance of BackupInner class. - */ - public BackupInner() { - } - - /** - * Get the innerProperties property: Backup Properties. - * - * @return the innerProperties value. - */ - private BackupProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the backupId property: backupId - * - * UUID v4 used to identify the Backup. - * - * @return the backupId value. - */ - public String backupId() { - return this.innerProperties() == null ? null : this.innerProperties().backupId(); - } - - /** - * Get the creationDate property: creationDate - * - * The creation date of the backup. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the size property: Size of backup in bytes. - * - * @return the size value. - */ - public Long size() { - return this.innerProperties() == null ? null : this.innerProperties().size(); - } - - /** - * Get the label property: Label for backup. - * - * @return the label value. - */ - public String label() { - return this.innerProperties() == null ? null : this.innerProperties().label(); - } - - /** - * Set the label property: Label for backup. - * - * @param label the label value to set. - * @return the BackupInner object itself. - */ - public BackupInner withLabel(String label) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupProperties(); - } - this.innerProperties().withLabel(label); - return this; - } - - /** - * Get the backupType property: backupType - * - * Type of backup Manual or Scheduled. - * - * @return the backupType value. - */ - public BackupType backupType() { - return this.innerProperties() == null ? null : this.innerProperties().backupType(); - } - - /** - * Get the failureReason property: Failure reason. - * - * @return the failureReason value. - */ - public String failureReason() { - return this.innerProperties() == null ? null : this.innerProperties().failureReason(); - } - - /** - * Get the volumeResourceId property: ResourceId used to identify the Volume. - * - * @return the volumeResourceId value. - */ - public String volumeResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().volumeResourceId(); - } - - /** - * Set the volumeResourceId property: ResourceId used to identify the Volume. - * - * @param volumeResourceId the volumeResourceId value to set. - * @return the BackupInner object itself. - */ - public BackupInner withVolumeResourceId(String volumeResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupProperties(); - } - this.innerProperties().withVolumeResourceId(volumeResourceId); - return this; - } - - /** - * Get the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for - * scheduled backups and true/false for manual backups. - * - * @return the useExistingSnapshot value. - */ - public Boolean useExistingSnapshot() { - return this.innerProperties() == null ? null : this.innerProperties().useExistingSnapshot(); - } - - /** - * Set the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for - * scheduled backups and true/false for manual backups. - * - * @param useExistingSnapshot the useExistingSnapshot value to set. - * @return the BackupInner object itself. - */ - public BackupInner withUseExistingSnapshot(Boolean useExistingSnapshot) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupProperties(); - } - this.innerProperties().withUseExistingSnapshot(useExistingSnapshot); - return this; - } - - /** - * Get the snapshotName property: The name of the snapshot. - * - * @return the snapshotName value. - */ - public String snapshotName() { - return this.innerProperties() == null ? null : this.innerProperties().snapshotName(); - } - - /** - * Set the snapshotName property: The name of the snapshot. - * - * @param snapshotName the snapshotName value to set. - * @return the BackupInner object itself. - */ - public BackupInner withSnapshotName(String snapshotName) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupProperties(); - } - this.innerProperties().withSnapshotName(snapshotName); - return this; - } - - /** - * Get the backupPolicyResourceId property: ResourceId used to identify the backup policy. - * - * @return the backupPolicyResourceId value. - */ - public String backupPolicyResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().backupPolicyResourceId(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model BackupInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupInner.class); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java deleted file mode 100644 index c05f14b104ba..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Backup patch properties. - */ -@Fluent -public final class BackupPatchProperties { - /* - * Label for backup - */ - @JsonProperty(value = "label") - private String label; - - /** - * Creates an instance of BackupPatchProperties class. - */ - public BackupPatchProperties() { - } - - /** - * Get the label property: Label for backup. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: Label for backup. - * - * @param label the label value to set. - * @return the BackupPatchProperties object itself. - */ - public BackupPatchProperties withLabel(String label) { - this.label = label; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java deleted file mode 100644 index b776f2fd8009..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** - * Backup properties. - */ -@Fluent -public final class BackupProperties { - /* - * backupId - * - * UUID v4 used to identify the Backup - */ - @JsonProperty(value = "backupId", access = JsonProperty.Access.WRITE_ONLY) - private String backupId; - - /* - * creationDate - * - * The creation date of the backup - */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Size of backup in bytes - */ - @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) - private Long size; - - /* - * Label for backup - */ - @JsonProperty(value = "label") - private String label; - - /* - * backupType - * - * Type of backup Manual or Scheduled - */ - @JsonProperty(value = "backupType", access = JsonProperty.Access.WRITE_ONLY) - private BackupType backupType; - - /* - * Failure reason - */ - @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY) - private String failureReason; - - /* - * ResourceId used to identify the Volume - */ - @JsonProperty(value = "volumeResourceId", required = true) - private String volumeResourceId; - - /* - * Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for - * manual backups - */ - @JsonProperty(value = "useExistingSnapshot") - private Boolean useExistingSnapshot; - - /* - * The name of the snapshot - */ - @JsonProperty(value = "snapshotName") - private String snapshotName; - - /* - * ResourceId used to identify the backup policy - */ - @JsonProperty(value = "backupPolicyResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String backupPolicyResourceId; - - /** - * Creates an instance of BackupProperties class. - */ - public BackupProperties() { - } - - /** - * Get the backupId property: backupId - * - * UUID v4 used to identify the Backup. - * - * @return the backupId value. - */ - public String backupId() { - return this.backupId; - } - - /** - * Get the creationDate property: creationDate - * - * The creation date of the backup. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the size property: Size of backup in bytes. - * - * @return the size value. - */ - public Long size() { - return this.size; - } - - /** - * Get the label property: Label for backup. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: Label for backup. - * - * @param label the label value to set. - * @return the BackupProperties object itself. - */ - public BackupProperties withLabel(String label) { - this.label = label; - return this; - } - - /** - * Get the backupType property: backupType - * - * Type of backup Manual or Scheduled. - * - * @return the backupType value. - */ - public BackupType backupType() { - return this.backupType; - } - - /** - * Get the failureReason property: Failure reason. - * - * @return the failureReason value. - */ - public String failureReason() { - return this.failureReason; - } - - /** - * Get the volumeResourceId property: ResourceId used to identify the Volume. - * - * @return the volumeResourceId value. - */ - public String volumeResourceId() { - return this.volumeResourceId; - } - - /** - * Set the volumeResourceId property: ResourceId used to identify the Volume. - * - * @param volumeResourceId the volumeResourceId value to set. - * @return the BackupProperties object itself. - */ - public BackupProperties withVolumeResourceId(String volumeResourceId) { - this.volumeResourceId = volumeResourceId; - return this; - } - - /** - * Get the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for - * scheduled backups and true/false for manual backups. - * - * @return the useExistingSnapshot value. - */ - public Boolean useExistingSnapshot() { - return this.useExistingSnapshot; - } - - /** - * Set the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for - * scheduled backups and true/false for manual backups. - * - * @param useExistingSnapshot the useExistingSnapshot value to set. - * @return the BackupProperties object itself. - */ - public BackupProperties withUseExistingSnapshot(Boolean useExistingSnapshot) { - this.useExistingSnapshot = useExistingSnapshot; - return this; - } - - /** - * Get the snapshotName property: The name of the snapshot. - * - * @return the snapshotName value. - */ - public String snapshotName() { - return this.snapshotName; - } - - /** - * Set the snapshotName property: The name of the snapshot. - * - * @param snapshotName the snapshotName value to set. - * @return the BackupProperties object itself. - */ - public BackupProperties withSnapshotName(String snapshotName) { - this.snapshotName = snapshotName; - return this; - } - - /** - * Get the backupPolicyResourceId property: ResourceId used to identify the backup policy. - * - * @return the backupPolicyResourceId value. - */ - public String backupPolicyResourceId() { - return this.backupPolicyResourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (volumeResourceId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property volumeResourceId in model BackupProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupProperties.class); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java deleted file mode 100644 index d98bfd3cfdbc..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Backup status. - */ -@Immutable -public final class BackupStatusInner { - /* - * Backup health status - */ - @JsonProperty(value = "healthy", access = JsonProperty.Access.WRITE_ONLY) - private Boolean healthy; - - /* - * Status of the backup mirror relationship - */ - @JsonProperty(value = "relationshipStatus", access = JsonProperty.Access.WRITE_ONLY) - private RelationshipStatus relationshipStatus; - - /* - * The status of the backup - */ - @JsonProperty(value = "mirrorState", access = JsonProperty.Access.WRITE_ONLY) - private MirrorState mirrorState; - - /* - * Reason for the unhealthy backup relationship - */ - @JsonProperty(value = "unhealthyReason", access = JsonProperty.Access.WRITE_ONLY) - private String unhealthyReason; - - /* - * Displays error message if the backup is in an error state - */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) - private String errorMessage; - - /* - * Displays the last transfer size - */ - @JsonProperty(value = "lastTransferSize", access = JsonProperty.Access.WRITE_ONLY) - private Long lastTransferSize; - - /* - * Displays the last transfer type - */ - @JsonProperty(value = "lastTransferType", access = JsonProperty.Access.WRITE_ONLY) - private String lastTransferType; - - /* - * Displays the total bytes transferred - */ - @JsonProperty(value = "totalTransferBytes", access = JsonProperty.Access.WRITE_ONLY) - private Long totalTransferBytes; - - /* - * Displays the total number of bytes transferred for the ongoing operation - */ - @JsonProperty(value = "transferProgressBytes", access = JsonProperty.Access.WRITE_ONLY) - private Long transferProgressBytes; - - /** - * Creates an instance of BackupStatusInner class. - */ - public BackupStatusInner() { - } - - /** - * Get the healthy property: Backup health status. - * - * @return the healthy value. - */ - public Boolean healthy() { - return this.healthy; - } - - /** - * Get the relationshipStatus property: Status of the backup mirror relationship. - * - * @return the relationshipStatus value. - */ - public RelationshipStatus relationshipStatus() { - return this.relationshipStatus; - } - - /** - * Get the mirrorState property: The status of the backup. - * - * @return the mirrorState value. - */ - public MirrorState mirrorState() { - return this.mirrorState; - } - - /** - * Get the unhealthyReason property: Reason for the unhealthy backup relationship. - * - * @return the unhealthyReason value. - */ - public String unhealthyReason() { - return this.unhealthyReason; - } - - /** - * Get the errorMessage property: Displays error message if the backup is in an error state. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Get the lastTransferSize property: Displays the last transfer size. - * - * @return the lastTransferSize value. - */ - public Long lastTransferSize() { - return this.lastTransferSize; - } - - /** - * Get the lastTransferType property: Displays the last transfer type. - * - * @return the lastTransferType value. - */ - public String lastTransferType() { - return this.lastTransferType; - } - - /** - * Get the totalTransferBytes property: Displays the total bytes transferred. - * - * @return the totalTransferBytes value. - */ - public Long totalTransferBytes() { - return this.totalTransferBytes; - } - - /** - * Get the transferProgressBytes property: Displays the total number of bytes transferred for the ongoing - * operation. - * - * @return the transferProgressBytes value. - */ - public Long transferProgressBytes() { - return this.transferProgressBytes; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java deleted file mode 100644 index c8c572398b54..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** - * Backup Vault information. - */ -@Fluent -public final class BackupVaultInner extends Resource { - /* - * Backup Vault Properties - */ - @JsonProperty(value = "properties") - private BackupVaultProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Creates an instance of BackupVaultInner class. - */ - public BackupVaultInner() { - } - - /** - * Get the innerProperties property: Backup Vault Properties. - * - * @return the innerProperties value. - */ - private BackupVaultProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupVaultInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupVaultInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java deleted file mode 100644 index c7c4463e5520..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Backup Vault properties. - */ -@Immutable -public final class BackupVaultProperties { - /* - * Azure lifecycle management - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Creates an instance of BackupVaultProperties class. - */ - public BackupVaultProperties() { - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java index df8933d9f35d..d9137b341670 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java @@ -179,40 +179,6 @@ public Boolean disableShowmount() { return this.innerProperties() == null ? null : this.innerProperties().disableShowmount(); } - /** - * Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @return the nfsV4IdDomain value. - */ - public String nfsV4IdDomain() { - return this.innerProperties() == null ? null : this.innerProperties().nfsV4IdDomain(); - } - - /** - * Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @param nfsV4IdDomain the nfsV4IdDomain value to set. - * @return the NetAppAccountInner object itself. - */ - public NetAppAccountInner withNfsV4IdDomain(String nfsV4IdDomain) { - if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); - } - this.innerProperties().withNfsV4IdDomain(nfsV4IdDomain); - return this; - } - - /** - * Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. - * - * @return the isMultiAdEnabled value. - */ - public Boolean isMultiAdEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isMultiAdEnabled(); - } - /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java deleted file mode 100644 index 2f692008c6fe..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Information regarding regionInfo Item. - */ -@Fluent -public final class RegionInfoResourceInner extends ProxyResource { - /* - * regionInfo properties - */ - @JsonProperty(value = "properties") - private RegionInfoInner innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Creates an instance of RegionInfoResourceInner class. - */ - public RegionInfoResourceInner() { - } - - /** - * Get the innerProperties property: regionInfo properties. - * - * @return the innerProperties value. - */ - private RegionInfoInner innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. - * - * @return the storageToNetworkProximity value. - */ - public RegionStorageToNetworkProximity storageToNetworkProximity() { - return this.innerProperties() == null ? null : this.innerProperties().storageToNetworkProximity(); - } - - /** - * Set the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. - * - * @param storageToNetworkProximity the storageToNetworkProximity value to set. - * @return the RegionInfoResourceInner object itself. - */ - public RegionInfoResourceInner - withStorageToNetworkProximity(RegionStorageToNetworkProximity storageToNetworkProximity) { - if (this.innerProperties() == null) { - this.innerProperties = new RegionInfoInner(); - } - this.innerProperties().withStorageToNetworkProximity(storageToNetworkProximity); - return this; - } - - /** - * Get the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. - * - * @return the availabilityZoneMappings value. - */ - public List availabilityZoneMappings() { - return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneMappings(); - } - - /** - * Set the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. - * - * @param availabilityZoneMappings the availabilityZoneMappings value to set. - * @return the RegionInfoResourceInner object itself. - */ - public RegionInfoResourceInner - withAvailabilityZoneMappings(List availabilityZoneMappings) { - if (this.innerProperties() == null) { - this.innerProperties = new RegionInfoInner(); - } - this.innerProperties().withAvailabilityZoneMappings(availabilityZoneMappings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java index 47e28ca0212e..fc995c0e4827 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java @@ -462,7 +462,7 @@ public List mountTargets() { /** * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. For creating clone volume, set type to ShortTermClone. + * set type to DataProtection. * * @return the volumeType value. */ @@ -472,7 +472,7 @@ public String volumeType() { /** * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. For creating clone volume, set type to ShortTermClone. + * set type to DataProtection. * * @param volumeType the volumeType value to set. * @return the VolumeInner object itself. @@ -1281,17 +1281,6 @@ public String originatingResourceId() { return this.innerProperties() == null ? null : this.innerProperties().originatingResourceId(); } - /** - * Get the inheritedSizeInBytes property: inheritedSizeInBytes - * - * Space shared by short term clone volume with parent volume in bytes. - * - * @return the inheritedSizeInBytes value. - */ - public Long inheritedSizeInBytes() { - return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); - } - /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java index 7378b6a435f4..2d78dc5274e5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java @@ -154,8 +154,7 @@ public final class VolumeProperties { private List mountTargets; /* - * What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. - * For creating clone volume, set type to ShortTermClone + * What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection */ @JsonProperty(value = "volumeType") private String volumeType; @@ -420,14 +419,6 @@ public final class VolumeProperties { @JsonProperty(value = "originatingResourceId", access = JsonProperty.Access.WRITE_ONLY) private String originatingResourceId; - /* - * inheritedSizeInBytes - * - * Space shared by short term clone volume with parent volume in bytes. - */ - @JsonProperty(value = "inheritedSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) - private Long inheritedSizeInBytes; - /** * Creates an instance of VolumeProperties class. */ @@ -740,7 +731,7 @@ public List mountTargets() { /** * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. For creating clone volume, set type to ShortTermClone. + * set type to DataProtection. * * @return the volumeType value. */ @@ -750,7 +741,7 @@ public String volumeType() { /** * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. For creating clone volume, set type to ShortTermClone. + * set type to DataProtection. * * @param volumeType the volumeType value to set. * @return the VolumeProperties object itself. @@ -1475,17 +1466,6 @@ public String originatingResourceId() { return this.originatingResourceId; } - /** - * Get the inheritedSizeInBytes property: inheritedSizeInBytes - * - * Space shared by short term clone volume with parent volume in bytes. - * - * @return the inheritedSizeInBytes value. - */ - public Long inheritedSizeInBytes() { - return this.inheritedSizeInBytes; - } - /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java deleted file mode 100644 index 2f31d271503b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsClientImpl.java +++ /dev/null @@ -1,670 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.annotation.Delete; -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.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.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.AccountBackupsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.BackupsList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AccountBackupsClient. - */ -public final class AccountBackupsClientImpl implements AccountBackupsClient { - /** - * The proxy service used to perform REST calls. - */ - private final AccountBackupsService service; - - /** - * The service client containing this operation class. - */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of AccountBackupsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AccountBackupsClientImpl(NetAppManagementClientImpl client) { - this.service - = RestProxy.create(AccountBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientAccountBackups to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - public interface AccountBackupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetAppAccount(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - @QueryParam("includeOnlyBackupsFromDeletedVolumes") String includeOnlyBackupsFromDeletedVolumes, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupName") String backupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/accountBackups/{backupName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupName") String backupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetAppAccountSinglePageAsync(String resourceGroupName, - String accountName, String includeOnlyBackupsFromDeletedVolumes) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByNetAppAccount(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, accountName, this.client.getApiVersion(), - includeOnlyBackupsFromDeletedVolumes, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetAppAccountSinglePageAsync(String resourceGroupName, - String accountName, String includeOnlyBackupsFromDeletedVolumes, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByNetAppAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), includeOnlyBackupsFromDeletedVolumes, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName, - String includeOnlyBackupsFromDeletedVolumes) { - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName, - includeOnlyBackupsFromDeletedVolumes)); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName) { - final String includeOnlyBackupsFromDeletedVolumes = null; - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName, - includeOnlyBackupsFromDeletedVolumes)); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName, - String includeOnlyBackupsFromDeletedVolumes, Context context) { - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName, - includeOnlyBackupsFromDeletedVolumes, context)); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { - final String includeOnlyBackupsFromDeletedVolumes = null; - return new PagedIterable<>( - listByNetAppAccountAsync(resourceGroupName, accountName, includeOnlyBackupsFromDeletedVolumes)); - } - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, - String includeOnlyBackupsFromDeletedVolumes, Context context) { - return new PagedIterable<>( - listByNetAppAccountAsync(resourceGroupName, accountName, includeOnlyBackupsFromDeletedVolumes, context)); - } - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String backupName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String backupName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - backupName, this.client.getApiVersion(), accept, context); - } - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String backupName) { - return getWithResponseAsync(resourceGroupName, accountName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, String backupName, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, backupName, context).block(); - } - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner get(String resourceGroupName, String accountName, String backupName) { - return getWithResponse(resourceGroupName, accountName, backupName, Context.NONE).getValue(); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String backupName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String backupName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String backupName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, backupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupName) { - return this.beginDeleteAsync(resourceGroupName, accountName, backupName).getSyncPoller(); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, backupName, context).getSyncPoller(); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupName) { - return beginDeleteAsync(resourceGroupName, accountName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String backupName) { - deleteAsync(resourceGroupName, accountName, backupName).block(); - } - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String backupName, Context context) { - deleteAsync(resourceGroupName, accountName, backupName, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java deleted file mode 100644 index f6579d1ea8ef..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountBackupsImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.http.rest.PagedIterable; -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.netapp.fluent.AccountBackupsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.AccountBackups; -import com.azure.resourcemanager.netapp.models.Backup; - -public final class AccountBackupsImpl implements AccountBackups { - private static final ClientLogger LOGGER = new ClientLogger(AccountBackupsImpl.class); - - private final AccountBackupsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public AccountBackupsImpl(AccountBackupsClient innerClient, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, - String includeOnlyBackupsFromDeletedVolumes, Context context) { - PagedIterable inner = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName, - includeOnlyBackupsFromDeletedVolumes, context); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String accountName, String backupName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BackupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Backup get(String resourceGroupName, String accountName, String backupName) { - BackupInner inner = this.serviceClient().get(resourceGroupName, accountName, backupName); - if (inner != null) { - return new BackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String backupName) { - this.serviceClient().delete(resourceGroupName, accountName, backupName); - } - - public void delete(String resourceGroupName, String accountName, String backupName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, backupName, context); - } - - private AccountBackupsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java index d99d162dc5f7..57e5d6d92363 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java @@ -35,7 +35,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.AccountsClient; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.NetAppAccountList; import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; import java.nio.ByteBuffer; @@ -109,14 +108,14 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NetAppAccountInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}") @@ -128,25 +127,14 @@ Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NetAppAccountPatch body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> renewCredentials(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateEncryption") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrateEncryptionKey(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EncryptionMigrationRequest body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -833,9 +821,10 @@ private Mono>> deleteWithResponseAsync(String resource if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -870,9 +859,10 @@ private Mono>> deleteWithResponseAsync(String resource if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), context); + accountName, this.client.getApiVersion(), accept, context); } /** @@ -1300,9 +1290,10 @@ private Mono>> renewCredentialsWithResponseAsync(Strin if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.renewCredentials(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1338,9 +1329,10 @@ private Mono>> renewCredentialsWithResponseAsync(Strin if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.renewCredentials(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), context); + accountName, this.client.getApiVersion(), accept, context); } /** @@ -1500,303 +1492,6 @@ public void renewCredentials(String resourceGroupName, String accountName, Conte renewCredentialsAsync(resourceGroupName, accountName, context).block(); } - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateEncryptionKeyWithResponseAsync(String resourceGroupName, - String accountName, EncryptionMigrationRequest body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.migrateEncryptionKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateEncryptionKeyWithResponseAsync(String resourceGroupName, - String accountName, EncryptionMigrationRequest body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.migrateEncryptionKey(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateEncryptionKeyAsync(String resourceGroupName, - String accountName, EncryptionMigrationRequest body) { - Mono>> mono - = migrateEncryptionKeyWithResponseAsync(resourceGroupName, accountName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateEncryptionKeyAsync(String resourceGroupName, - String accountName) { - final EncryptionMigrationRequest body = null; - Mono>> mono - = migrateEncryptionKeyWithResponseAsync(resourceGroupName, accountName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateEncryptionKeyAsync(String resourceGroupName, - String accountName, EncryptionMigrationRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = migrateEncryptionKeyWithResponseAsync(resourceGroupName, accountName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateEncryptionKey(String resourceGroupName, String accountName) { - final EncryptionMigrationRequest body = null; - return this.beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body).getSyncPoller(); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateEncryptionKey(String resourceGroupName, String accountName, - EncryptionMigrationRequest body, Context context) { - return this.beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body, context).getSyncPoller(); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateEncryptionKeyAsync(String resourceGroupName, String accountName, - EncryptionMigrationRequest body) { - return beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateEncryptionKeyAsync(String resourceGroupName, String accountName) { - final EncryptionMigrationRequest body = null; - return beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateEncryptionKeyAsync(String resourceGroupName, String accountName, - EncryptionMigrationRequest body, Context context) { - return beginMigrateEncryptionKeyAsync(resourceGroupName, accountName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateEncryptionKey(String resourceGroupName, String accountName) { - final EncryptionMigrationRequest body = null; - migrateEncryptionKeyAsync(resourceGroupName, accountName, body).block(); - } - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, - Context context) { - migrateEncryptionKeyAsync(resourceGroupName, accountName, body, context).block(); - } - /** * Get the next page of items. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java index 66a3e73bff4e..15aebb81243b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.netapp.fluent.AccountsClient; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import com.azure.resourcemanager.netapp.models.Accounts; -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.NetAppAccount; public final class AccountsImpl implements Accounts { @@ -30,22 +29,22 @@ public AccountsImpl(AccountsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new NetAppAccountImpl(inner1, this.manager())); } public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, @@ -85,22 +84,13 @@ public void renewCredentials(String resourceGroupName, String accountName, Conte this.serviceClient().renewCredentials(resourceGroupName, accountName, context); } - public void migrateEncryptionKey(String resourceGroupName, String accountName) { - this.serviceClient().migrateEncryptionKey(resourceGroupName, accountName); - } - - public void migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, - Context context) { - this.serviceClient().migrateEncryptionKey(resourceGroupName, accountName, body, context); - } - public NetAppAccount getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); @@ -109,12 +99,12 @@ public NetAppAccount getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); @@ -123,12 +113,12 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); @@ -137,12 +127,12 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java deleted file mode 100644 index 806ad2f4575a..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.Backup; -import com.azure.resourcemanager.netapp.models.BackupPatch; -import com.azure.resourcemanager.netapp.models.BackupType; -import java.time.OffsetDateTime; - -public final class BackupImpl implements Backup, Backup.Definition, Backup.Update { - private BackupInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String backupId() { - return this.innerModel().backupId(); - } - - public OffsetDateTime creationDate() { - return this.innerModel().creationDate(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Long size() { - return this.innerModel().size(); - } - - public String label() { - return this.innerModel().label(); - } - - public BackupType backupType() { - return this.innerModel().backupType(); - } - - public String failureReason() { - return this.innerModel().failureReason(); - } - - public String volumeResourceId() { - return this.innerModel().volumeResourceId(); - } - - public Boolean useExistingSnapshot() { - return this.innerModel().useExistingSnapshot(); - } - - public String snapshotName() { - return this.innerModel().snapshotName(); - } - - public String backupPolicyResourceId() { - return this.innerModel().backupPolicyResourceId(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BackupInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String backupVaultName; - - private String backupName; - - private BackupPatch updateBody; - - public BackupImpl withExistingBackupVault(String resourceGroupName, String accountName, String backupVaultName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - this.backupVaultName = backupVaultName; - return this; - } - - public Backup create() { - this.innerObject = serviceManager.serviceClient().getBackups().create(resourceGroupName, accountName, - backupVaultName, backupName, this.innerModel(), Context.NONE); - return this; - } - - public Backup create(Context context) { - this.innerObject = serviceManager.serviceClient().getBackups().create(resourceGroupName, accountName, - backupVaultName, backupName, this.innerModel(), context); - return this; - } - - BackupImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new BackupInner(); - this.serviceManager = serviceManager; - this.backupName = name; - } - - public BackupImpl update() { - this.updateBody = new BackupPatch(); - return this; - } - - public Backup apply() { - this.innerObject = serviceManager.serviceClient().getBackups().update(resourceGroupName, accountName, - backupVaultName, backupName, updateBody, Context.NONE); - return this; - } - - public Backup apply(Context context) { - this.innerObject = serviceManager.serviceClient().getBackups().update(resourceGroupName, accountName, - backupVaultName, backupName, updateBody, context); - return this; - } - - BackupImpl(BackupInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.backupVaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); - this.backupName = Utils.getValueFromIdByName(innerObject.id(), "backups"); - } - - public Backup refresh() { - this.innerObject = serviceManager.serviceClient().getBackups() - .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE).getValue(); - return this; - } - - public Backup refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getBackups() - .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context).getValue(); - return this; - } - - public BackupImpl withVolumeResourceId(String volumeResourceId) { - this.innerModel().withVolumeResourceId(volumeResourceId); - return this; - } - - public BackupImpl withLabel(String label) { - if (isInCreateMode()) { - this.innerModel().withLabel(label); - return this; - } else { - this.updateBody.withLabel(label); - return this; - } - } - - public BackupImpl withUseExistingSnapshot(Boolean useExistingSnapshot) { - this.innerModel().withUseExistingSnapshot(useExistingSnapshot); - return this; - } - - public BackupImpl withSnapshotName(String snapshotName) { - this.innerModel().withSnapshotName(snapshotName); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java index 3c2efd1350e4..18528a6e502f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java @@ -113,7 +113,7 @@ Mono>> update(@HostParam("$host") String endpoint, @BodyParam("application/json") BackupPolicyPatch body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupPolicies/{backupPolicyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -121,7 +121,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("backupPolicyName") String backupPolicyName, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** @@ -986,9 +986,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupPolicyName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, backupPolicyName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1028,9 +1029,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupPolicyName, this.client.getApiVersion(), context); + accountName, backupPolicyName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java index 8143a6a6edac..2c6a5a82263c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java @@ -29,12 +29,12 @@ public BackupPoliciesImpl(BackupPoliciesClient innerClient, public PagedIterable list(String resourceGroupName, String accountName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new BackupPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupPolicyImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String accountName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new BackupPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupPolicyImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, String backupPolicyName, @@ -67,17 +67,17 @@ public void delete(String resourceGroupName, String accountName, String backupPo } public BackupPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); @@ -86,17 +86,17 @@ public BackupPolicy getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); @@ -105,17 +105,17 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); @@ -124,17 +124,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies"); + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "backupPolicies"); if (backupPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java index 31dbaf43fedc..d73207fe4616 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java @@ -163,9 +163,9 @@ public BackupPolicy apply(Context context) { com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.backupPolicyName = Utils.getValueFromIdByName(innerObject.id(), "backupPolicies"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.backupPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupPolicies"); } public BackupPolicy refresh() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java deleted file mode 100644 index df32a32dcbb7..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; -import com.azure.resourcemanager.netapp.models.BackupStatus; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; - -public final class BackupStatusImpl implements BackupStatus { - private BackupStatusInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - BackupStatusImpl(BackupStatusInner innerObject, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean healthy() { - return this.innerModel().healthy(); - } - - public RelationshipStatus relationshipStatus() { - return this.innerModel().relationshipStatus(); - } - - public MirrorState mirrorState() { - return this.innerModel().mirrorState(); - } - - public String unhealthyReason() { - return this.innerModel().unhealthyReason(); - } - - public String errorMessage() { - return this.innerModel().errorMessage(); - } - - public Long lastTransferSize() { - return this.innerModel().lastTransferSize(); - } - - public String lastTransferType() { - return this.innerModel().lastTransferType(); - } - - public Long totalTransferBytes() { - return this.innerModel().totalTransferBytes(); - } - - public Long transferProgressBytes() { - return this.innerModel().transferProgressBytes(); - } - - public BackupStatusInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java deleted file mode 100644 index 4908561aadee..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.azure.resourcemanager.netapp.models.BackupVault; -import com.azure.resourcemanager.netapp.models.BackupVaultPatch; -import java.util.Collections; -import java.util.Map; - -public final class BackupVaultImpl implements BackupVault, BackupVault.Definition, BackupVault.Update { - private BackupVaultInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BackupVaultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String backupVaultName; - - private BackupVaultPatch updateBody; - - public BackupVaultImpl withExistingNetAppAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public BackupVault create() { - this.innerObject = serviceManager.serviceClient().getBackupVaults().createOrUpdate(resourceGroupName, - accountName, backupVaultName, this.innerModel(), Context.NONE); - return this; - } - - public BackupVault create(Context context) { - this.innerObject = serviceManager.serviceClient().getBackupVaults().createOrUpdate(resourceGroupName, - accountName, backupVaultName, this.innerModel(), context); - return this; - } - - BackupVaultImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = new BackupVaultInner(); - this.serviceManager = serviceManager; - this.backupVaultName = name; - } - - public BackupVaultImpl update() { - this.updateBody = new BackupVaultPatch(); - return this; - } - - public BackupVault apply() { - this.innerObject = serviceManager.serviceClient().getBackupVaults().update(resourceGroupName, accountName, - backupVaultName, updateBody, Context.NONE); - return this; - } - - public BackupVault apply(Context context) { - this.innerObject = serviceManager.serviceClient().getBackupVaults().update(resourceGroupName, accountName, - backupVaultName, updateBody, context); - return this; - } - - BackupVaultImpl(BackupVaultInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.backupVaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); - } - - public BackupVault refresh() { - this.innerObject = serviceManager.serviceClient().getBackupVaults() - .getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); - return this; - } - - public BackupVault refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getBackupVaults() - .getWithResponse(resourceGroupName, accountName, backupVaultName, context).getValue(); - return this; - } - - public BackupVaultImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BackupVaultImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BackupVaultImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java deleted file mode 100644 index 522682119808..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java +++ /dev/null @@ -1,1270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -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.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.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.BackupVaultsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.azure.resourcemanager.netapp.models.BackupVaultPatch; -import com.azure.resourcemanager.netapp.models.BackupVaultsList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BackupVaultsClient. - */ -public final class BackupVaultsClientImpl implements BackupVaultsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BackupVaultsService service; - - /** - * The service client containing this operation class. - */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of BackupVaultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BackupVaultsClientImpl(NetAppManagementClientImpl client) { - this.service - = RestProxy.create(BackupVaultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientBackupVaults to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - public interface BackupVaultsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetAppAccount(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BackupVaultInner body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BackupVaultPatch body, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByNetAppAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetAppAccountSinglePageAsync(String resourceGroupName, - String accountName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByNetAppAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetAppAccountSinglePageAsync(String resourceGroupName, - String accountName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByNetAppAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName), - nextLink -> listByNetAppAccountNextSinglePageAsync(nextLink)); - } - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByNetAppAccountAsync(String resourceGroupName, String accountName, - Context context) { - return new PagedFlux<>(() -> listByNetAppAccountSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listByNetAppAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { - return new PagedIterable<>(listByNetAppAccountAsync(resourceGroupName, accountName)); - } - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, - Context context) { - return new PagedIterable<>(listByNetAppAccountAsync(resourceGroupName, accountName, context)); - } - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 Backup Vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupVaultName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 Backup Vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - backupVaultName, this.client.getApiVersion(), accept, context); - } - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String backupVaultName) { - return getWithResponseAsync(resourceGroupName, accountName, backupVaultName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 Backup Vault along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String backupVaultName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, context).block(); - } - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName) { - return getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultInner body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupVaultName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultInner body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 {@link PollerFlux} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupVaultInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String backupVaultName, BackupVaultInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupVaultInner.class, BackupVaultInner.class, this.client.getContext()); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupVaultInner> beginCreateOrUpdateAsync( - String resourceGroupName, String accountName, String backupVaultName, BackupVaultInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupVaultInner.class, BackupVaultInner.class, context); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 {@link SyncPoller} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).getSyncPoller(); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultInner> beginCreateOrUpdate(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context) - .getSyncPoller(); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 backup Vault information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String backupVaultName, BackupVaultInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 backup Vault information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String accountName, - String backupVaultName, BackupVaultInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the 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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultInner body) { - return createOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).block(); - } - - /** - * Create or Update a Backup Vault - * - * Create or update the specified Backup Vault in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body BackupVault object supplied in the body of the operation. - * @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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).block(); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, BackupVaultPatch body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupVaultName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 backup Vault information along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, BackupVaultPatch body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 {@link PollerFlux} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupVaultInner> beginUpdateAsync(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupVaultInner.class, BackupVaultInner.class, this.client.getContext()); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupVaultInner> beginUpdateAsync(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupVaultInner.class, BackupVaultInner.class, context); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 {@link SyncPoller} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultPatch body) { - return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body).getSyncPoller(); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of backup Vault information. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultInner> beginUpdate(String resourceGroupName, - String accountName, String backupVaultName, BackupVaultPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).getSyncPoller(); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 backup Vault information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 backup Vault information on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the 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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultPatch body) { - return updateAsync(resourceGroupName, accountName, backupVaultName, body).block(); - } - - /** - * Update NetApp Backup Vault - * - * Patch the specified NetApp Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param body Backup Vault object supplied in the body of the operation. - * @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 backup Vault information. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, - BackupVaultPatch body, Context context) { - return updateAsync(resourceGroupName, accountName, backupVaultName, body, context).block(); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupVaultName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String backupVaultName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String backupVaultName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupVaultName) { - return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName).getSyncPoller(); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupVaultName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName, context).getSyncPoller(); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupVaultName) { - return beginDeleteAsync(resourceGroupName, accountName, backupVaultName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupVaultName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String backupVaultName) { - deleteAsync(resourceGroupName, accountName, backupVaultName).block(); - } - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { - deleteAsync(resourceGroupName, accountName, backupVaultName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - * - * The nextLink 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 list of Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetAppAccountNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByNetAppAccountNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - * - * The nextLink 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 list of Backup Vaults along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByNetAppAccountNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByNetAppAccountNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java deleted file mode 100644 index a011175dfb83..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.http.rest.PagedIterable; -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.netapp.fluent.BackupVaultsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.azure.resourcemanager.netapp.models.BackupVault; -import com.azure.resourcemanager.netapp.models.BackupVaults; - -public final class BackupVaultsImpl implements BackupVaults { - private static final ClientLogger LOGGER = new ClientLogger(BackupVaultsImpl.class); - - private final BackupVaultsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public BackupVaultsImpl(BackupVaultsClient innerClient, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { - PagedIterable inner - = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new BackupVaultImpl(inner1, this.manager())); - } - - public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, - Context context) { - PagedIterable inner - = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new BackupVaultImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupVaultName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BackupVaultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BackupVault get(String resourceGroupName, String accountName, String backupVaultName) { - BackupVaultInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName); - if (inner != null) { - return new BackupVaultImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String backupVaultName) { - this.serviceClient().delete(resourceGroupName, accountName, backupVaultName); - } - - public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, context); - } - - public BackupVault getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, backupVaultName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - this.delete(resourceGroupName, accountName, backupVaultName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - this.delete(resourceGroupName, accountName, backupVaultName, context); - } - - private BackupVaultsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } - - public BackupVaultImpl define(String name) { - return new BackupVaultImpl(name, this.manager()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java index 0be2250addd3..1a4b62827546 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java @@ -4,42 +4,25 @@ package com.azure.resourcemanager.netapp.implementation; -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; 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.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; 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.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.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.BackupsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; -import com.azure.resourcemanager.netapp.models.BackupPatch; -import com.azure.resourcemanager.netapp.models.BackupsList; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -73,16 +56,6 @@ public final class BackupsClientImpl implements BackupsClient { @Host("{$host}") @ServiceInterface(name = "NetAppManagementClie") public interface BackupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/latestBackupStatus/current") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLatestStatus(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/restoreStatus") @ExpectedResponses({ 200 }) @@ -92,220 +65,6 @@ Mono> getVolumeRestoreStatus(@HostParam("$host") St @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVault(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @QueryParam("$filter") String filter, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupInner body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupPatch body, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByVaultNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLatestStatusWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getLatestStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLatestStatusWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getLatestStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getLatestStatusAsync(String resourceGroupName, String accountName, String poolName, - String volumeName) { - return getLatestStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLatestStatusWithResponse(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { - return getLatestStatusWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupStatusInner getLatestStatus(String resourceGroupName, String accountName, String poolName, - String volumeName) { - return getLatestStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) - .getValue(); } /** @@ -464,1299 +223,4 @@ public RestoreStatusInner getVolumeRestoreStatus(String resourceGroupName, Strin return getVolumeRestoreStatusWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) .getValue(); } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVaultSinglePageAsync(String resourceGroupName, String accountName, - String backupVaultName, String filter) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByVault(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupVaultName, filter, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVaultSinglePageAsync(String resourceGroupName, String accountName, - String backupVaultName, String filter, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByVault(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - backupVaultName, filter, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, - String backupVaultName, String filter) { - return new PagedFlux<>( - () -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName, filter), - nextLink -> listByVaultNextSinglePageAsync(nextLink)); - } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 list of Backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, - String backupVaultName) { - final String filter = null; - return new PagedFlux<>( - () -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName, filter), - nextLink -> listByVaultNextSinglePageAsync(nextLink)); - } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, - String backupVaultName, String filter, Context context) { - return new PagedFlux<>( - () -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName, filter, context), - nextLink -> listByVaultNextSinglePageAsync(nextLink, context)); - } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup 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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVault(String resourceGroupName, String accountName, - String backupVaultName) { - final String filter = null; - return new PagedIterable<>(listByVaultAsync(resourceGroupName, accountName, backupVaultName, filter)); - } - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, - String filter, Context context) { - return new PagedIterable<>(listByVaultAsync(resourceGroupName, accountName, backupVaultName, filter, context)); - } - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - backupVaultName, backupName, this.client.getApiVersion(), accept, context); - } - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName) { - return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - String backupName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, context).block(); - } - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { - return getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE).getValue(); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupInner body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupInner body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 {@link PollerFlux} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginCreateAsync(String resourceGroupName, - String accountName, String backupVaultName, String backupName, BackupInner body) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupInner.class, BackupInner.class, this.client.getContext()); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginCreateAsync(String resourceGroupName, - String accountName, String backupVaultName, String backupName, BackupInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupInner.class, BackupInner.class, context); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 {@link SyncPoller} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupInner body) { - return this.beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).getSyncPoller(); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginCreate(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupInner body, Context context) { - return this.beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context) - .getSyncPoller(); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, BackupInner body) { - return beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, BackupInner body, Context context) { - return beginCreateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupInner body) { - return createAsync(resourceGroupName, accountName, backupVaultName, backupName, body).block(); - } - - /** - * Create a backup - * - * Create a backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner create(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupInner body, Context context) { - return createAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).block(); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupPatch body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupPatch body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 {@link PollerFlux} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginUpdateAsync(String resourceGroupName, - String accountName, String backupVaultName, String backupName, BackupPatch body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupInner.class, BackupInner.class, this.client.getContext()); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link PollerFlux} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginUpdateAsync(String resourceGroupName, - String accountName, String backupVaultName, String backupName) { - final BackupPatch body = null; - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupInner.class, BackupInner.class, this.client.getContext()); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupInner> beginUpdateAsync(String resourceGroupName, - String accountName, String backupVaultName, String backupName, BackupPatch body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BackupInner.class, BackupInner.class, context); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link SyncPoller} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, - String backupVaultName, String backupName) { - final BackupPatch body = null; - return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).getSyncPoller(); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupInner> beginUpdate(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupPatch body, Context context) { - return this.beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context) - .getSyncPoller(); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the 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 backup under a Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, BackupPatch body) { - return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 backup under a Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName) { - final BackupPatch body = null; - return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, BackupPatch body, Context context) { - return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName) { - final BackupPatch body = null; - return updateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).block(); - } - - /** - * Patch a backup - * - * Patch a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Backup object supplied in the body of the operation. - * @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 backup under a Backup Vault. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupPatch body, Context context) { - return updateAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).block(); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupVaultName, String backupName) { - return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName).getSyncPoller(); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String backupVaultName, String backupName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName, context) - .getSyncPoller(); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName) { - return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { - deleteAsync(resourceGroupName, accountName, backupVaultName, backupName).block(); - } - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, - Context context) { - deleteAsync(resourceGroupName, accountName, backupVaultName, backupName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - * - * The nextLink 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 list of Backups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVaultNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByVaultNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - * - * The nextLink 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 list of Backups along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByVaultNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByVaultNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java index 62a87611d80e..de38c88687ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java @@ -4,17 +4,12 @@ package com.azure.resourcemanager.netapp.implementation; -import com.azure.core.http.rest.PagedIterable; 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.netapp.fluent.BackupsClient; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; -import com.azure.resourcemanager.netapp.models.Backup; -import com.azure.resourcemanager.netapp.models.BackupStatus; import com.azure.resourcemanager.netapp.models.Backups; import com.azure.resourcemanager.netapp.models.RestoreStatus; @@ -30,29 +25,6 @@ public BackupsImpl(BackupsClient innerClient, com.azure.resourcemanager.netapp.N this.serviceManager = serviceManager; } - public Response getLatestStatusWithResponse(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { - Response inner = this.serviceClient().getLatestStatusWithResponse(resourceGroupName, - accountName, poolName, volumeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BackupStatusImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BackupStatus getLatestStatus(String resourceGroupName, String accountName, String poolName, - String volumeName) { - BackupStatusInner inner - = this.serviceClient().getLatestStatus(resourceGroupName, accountName, poolName, volumeName); - if (inner != null) { - return new BackupStatusImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getVolumeRestoreStatusWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { Response inner = this.serviceClient().getVolumeRestoreStatusWithResponse(resourceGroupName, @@ -76,146 +48,6 @@ public RestoreStatus getVolumeRestoreStatus(String resourceGroupName, String acc } } - public PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName) { - PagedIterable inner - = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, - String filter, Context context) { - PagedIterable inner - = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName, filter, context); - return Utils.mapPage(inner, inner1 -> new BackupImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - String backupName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceGroupName, accountName, - backupVaultName, backupName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BackupImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Backup get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { - BackupInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName, backupName); - if (inner != null) { - return new BackupImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { - this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName); - } - - public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, - Context context) { - this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName, context); - } - - public Backup getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - String backupName = Utils.getValueFromIdByName(id, "backups"); - if (backupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - String backupName = Utils.getValueFromIdByName(id, "backups"); - if (backupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - String backupName = Utils.getValueFromIdByName(id, "backups"); - if (backupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); - } - this.delete(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); - } - String backupVaultName = Utils.getValueFromIdByName(id, "backupVaults"); - if (backupVaultName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); - } - String backupName = Utils.getValueFromIdByName(id, "backups"); - if (backupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'backups'.", id))); - } - this.delete(resourceGroupName, accountName, backupVaultName, backupName, context); - } - private BackupsClient serviceClient() { return this.innerClient; } @@ -223,8 +55,4 @@ private BackupsClient serviceClient() { private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { return this.serviceManager; } - - public BackupImpl define(String name) { - return new BackupImpl(name, this.manager()); - } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java deleted file mode 100644 index e9012e2f9aa6..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -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.Post; -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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BackupsUnderAccountsClient. - */ -public final class BackupsUnderAccountsClientImpl implements BackupsUnderAccountsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BackupsUnderAccountsService service; - - /** - * The service client containing this operation class. - */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of BackupsUnderAccountsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BackupsUnderAccountsClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(BackupsUnderAccountsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientBackupsUnderAccounts to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - public interface BackupsUnderAccountsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/migrateBackups") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrateBackups(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupsMigrationRequest body, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateBackupsWithResponseAsync(String resourceGroupName, - String accountName, BackupsMigrationRequest body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateBackupsWithResponseAsync(String resourceGroupName, - String accountName, BackupsMigrationRequest body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateBackupsAsync(String resourceGroupName, String accountName, - BackupsMigrationRequest body) { - Mono>> mono = migrateBackupsWithResponseAsync(resourceGroupName, accountName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateBackupsAsync(String resourceGroupName, String accountName, - BackupsMigrationRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = migrateBackupsWithResponseAsync(resourceGroupName, accountName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - BackupsMigrationRequest body) { - return this.beginMigrateBackupsAsync(resourceGroupName, accountName, body).getSyncPoller(); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - BackupsMigrationRequest body, Context context) { - return this.beginMigrateBackupsAsync(resourceGroupName, accountName, body, context).getSyncPoller(); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateBackupsAsync(String resourceGroupName, String accountName, BackupsMigrationRequest body) { - return beginMigrateBackupsAsync(resourceGroupName, accountName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateBackupsAsync(String resourceGroupName, String accountName, BackupsMigrationRequest body, - Context context) { - return beginMigrateBackupsAsync(resourceGroupName, accountName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body) { - migrateBackupsAsync(resourceGroupName, accountName, body).block(); - } - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, - Context context) { - migrateBackupsAsync(resourceGroupName, accountName, body, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java deleted file mode 100644 index 573f5a53ff73..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; -import com.azure.resourcemanager.netapp.models.BackupsUnderAccounts; - -public final class BackupsUnderAccountsImpl implements BackupsUnderAccounts { - private static final ClientLogger LOGGER = new ClientLogger(BackupsUnderAccountsImpl.class); - - private final BackupsUnderAccountsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public BackupsUnderAccountsImpl(BackupsUnderAccountsClient innerClient, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body) { - this.serviceClient().migrateBackups(resourceGroupName, accountName, body); - } - - public void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, - Context context) { - this.serviceClient().migrateBackups(resourceGroupName, accountName, body, context); - } - - private BackupsUnderAccountsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java deleted file mode 100644 index 031b6e07fde3..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java +++ /dev/null @@ -1,363 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -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.Post; -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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BackupsUnderBackupVaultsClient. - */ -public final class BackupsUnderBackupVaultsClientImpl implements BackupsUnderBackupVaultsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BackupsUnderBackupVaultsService service; - - /** - * The service client containing this operation class. - */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of BackupsUnderBackupVaultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BackupsUnderBackupVaultsClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(BackupsUnderBackupVaultsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientBackupsUnderBackupVaults to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - public interface BackupsUnderBackupVaultsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/backupVaults/{backupVaultName}/backups/{backupName}/restoreFiles") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restoreFiles(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupRestoreFiles body, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreFilesWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restoreFiles(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreFilesWithResponseAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (backupVaultName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); - } - if (backupName == null) { - return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restoreFiles(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, backupVaultName, backupName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestoreFilesAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body) { - Mono>> mono - = restoreFilesWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestoreFilesAsync(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = restoreFilesWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestoreFiles(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body) { - return this.beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body) - .getSyncPoller(); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestoreFiles(String resourceGroupName, String accountName, - String backupVaultName, String backupName, BackupRestoreFiles body, Context context) { - return this.beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context) - .getSyncPoller(); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreFilesAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, BackupRestoreFiles body) { - return beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreFilesAsync(String resourceGroupName, String accountName, String backupVaultName, - String backupName, BackupRestoreFiles body, Context context) { - return beginRestoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body) { - restoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body).block(); - } - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body, Context context) { - restoreFilesAsync(resourceGroupName, accountName, backupVaultName, backupName, body, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java deleted file mode 100644 index e82e4f5723b4..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import com.azure.resourcemanager.netapp.models.BackupsUnderBackupVaults; - -public final class BackupsUnderBackupVaultsImpl implements BackupsUnderBackupVaults { - private static final ClientLogger LOGGER = new ClientLogger(BackupsUnderBackupVaultsImpl.class); - - private final BackupsUnderBackupVaultsClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public BackupsUnderBackupVaultsImpl(BackupsUnderBackupVaultsClient innerClient, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body) { - this.serviceClient().restoreFiles(resourceGroupName, accountName, backupVaultName, backupName, body); - } - - public void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body, Context context) { - this.serviceClient().restoreFiles(resourceGroupName, accountName, backupVaultName, backupName, body, context); - } - - private BackupsUnderBackupVaultsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java deleted file mode 100644 index d7e17e88cb6b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -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.Post; -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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BackupsUnderVolumesClient. - */ -public final class BackupsUnderVolumesClientImpl implements BackupsUnderVolumesClient { - /** - * The proxy service used to perform REST calls. - */ - private final BackupsUnderVolumesService service; - - /** - * The service client containing this operation class. - */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of BackupsUnderVolumesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BackupsUnderVolumesClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(BackupsUnderVolumesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientBackupsUnderVolumes to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - public interface BackupsUnderVolumesService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/migrateBackups") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> migrateBackups(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BackupsMigrationRequest body, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateBackupsWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, BackupsMigrationRequest body) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> migrateBackupsWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, BackupsMigrationRequest body, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.migrateBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateBackupsAsync(String resourceGroupName, String accountName, - String poolName, String volumeName, BackupsMigrationRequest body) { - Mono>> mono - = migrateBackupsWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMigrateBackupsAsync(String resourceGroupName, String accountName, - String poolName, String volumeName, BackupsMigrationRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = migrateBackupsWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - String poolName, String volumeName, BackupsMigrationRequest body) { - return this.beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body) - .getSyncPoller(); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginMigrateBackups(String resourceGroupName, String accountName, - String poolName, String volumeName, BackupsMigrationRequest body, Context context) { - return this.beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body, context) - .getSyncPoller(); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateBackupsAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, BackupsMigrationRequest body) { - return beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono migrateBackupsAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, BackupsMigrationRequest body, Context context) { - return beginMigrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body) { - migrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body).block(); - } - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body, Context context) { - migrateBackupsAsync(resourceGroupName, accountName, poolName, volumeName, body, context).block(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java deleted file mode 100644 index 76adfeecb311..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; -import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; - -public final class BackupsUnderVolumesImpl implements BackupsUnderVolumes { - private static final ClientLogger LOGGER = new ClientLogger(BackupsUnderVolumesImpl.class); - - private final BackupsUnderVolumesClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public BackupsUnderVolumesImpl(BackupsUnderVolumesClient innerClient, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body) { - this.serviceClient().migrateBackups(resourceGroupName, accountName, poolName, volumeName, body); - } - - public void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body, Context context) { - this.serviceClient().migrateBackups(resourceGroupName, accountName, poolName, volumeName, body, context); - } - - private BackupsUnderVolumesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java index 679a2128e69d..4e78156d6621 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java @@ -163,9 +163,9 @@ public CapacityPool apply(Context context) { com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); } public CapacityPool refresh() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java index b771fc2c8888..fdb3b357eb5a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java @@ -10,7 +10,6 @@ import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.NetAppAccount; import com.azure.resourcemanager.netapp.models.NetAppAccountPatch; @@ -81,14 +80,6 @@ public Boolean disableShowmount() { return this.innerModel().disableShowmount(); } - public String nfsV4IdDomain() { - return this.innerModel().nfsV4IdDomain(); - } - - public Boolean isMultiAdEnabled() { - return this.innerModel().isMultiAdEnabled(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -159,8 +150,8 @@ public NetAppAccount apply(Context context) { com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); } public NetAppAccount refresh() { @@ -183,14 +174,6 @@ public void renewCredentials(Context context) { serviceManager.accounts().renewCredentials(resourceGroupName, accountName, context); } - public void migrateEncryptionKey() { - serviceManager.accounts().migrateEncryptionKey(resourceGroupName, accountName); - } - - public void migrateEncryptionKey(EncryptionMigrationRequest body, Context context) { - serviceManager.accounts().migrateEncryptionKey(resourceGroupName, accountName, body, context); - } - public NetAppAccountImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -241,16 +224,6 @@ public NetAppAccountImpl withEncryption(AccountEncryption encryption) { } } - public NetAppAccountImpl withNfsV4IdDomain(String nfsV4IdDomain) { - if (isInCreateMode()) { - this.innerModel().withNfsV4IdDomain(nfsV4IdDomain); - return this; - } else { - this.updateBody.withNfsV4IdDomain(nfsV4IdDomain); - return this; - } - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java index 257f0e949146..0e910a62a1ab 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java @@ -22,17 +22,11 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.netapp.fluent.AccountBackupsClient; import com.azure.resourcemanager.netapp.fluent.AccountsClient; import com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient; -import com.azure.resourcemanager.netapp.fluent.BackupVaultsClient; import com.azure.resourcemanager.netapp.fluent.BackupsClient; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; -import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; -import com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; import com.azure.resourcemanager.netapp.fluent.OperationsClient; import com.azure.resourcemanager.netapp.fluent.PoolsClient; @@ -182,20 +176,6 @@ public NetAppResourceQuotaLimitsClient getNetAppResourceQuotaLimits() { return this.netAppResourceQuotaLimits; } - /** - * The NetAppResourceRegionInfosClient object to access its operations. - */ - private final NetAppResourceRegionInfosClient netAppResourceRegionInfos; - - /** - * Gets the NetAppResourceRegionInfosClient object to access its operations. - * - * @return the NetAppResourceRegionInfosClient object. - */ - public NetAppResourceRegionInfosClient getNetAppResourceRegionInfos() { - return this.netAppResourceRegionInfos; - } - /** * The AccountsClient object to access its operations. */ @@ -280,20 +260,6 @@ public BackupsClient getBackups() { return this.backups; } - /** - * The AccountBackupsClient object to access its operations. - */ - private final AccountBackupsClient accountBackups; - - /** - * Gets the AccountBackupsClient object to access its operations. - * - * @return the AccountBackupsClient object. - */ - public AccountBackupsClient getAccountBackups() { - return this.accountBackups; - } - /** * The BackupPoliciesClient object to access its operations. */ @@ -350,62 +316,6 @@ public SubvolumesClient getSubvolumes() { return this.subvolumes; } - /** - * The BackupVaultsClient object to access its operations. - */ - private final BackupVaultsClient backupVaults; - - /** - * Gets the BackupVaultsClient object to access its operations. - * - * @return the BackupVaultsClient object. - */ - public BackupVaultsClient getBackupVaults() { - return this.backupVaults; - } - - /** - * The BackupsUnderBackupVaultsClient object to access its operations. - */ - private final BackupsUnderBackupVaultsClient backupsUnderBackupVaults; - - /** - * Gets the BackupsUnderBackupVaultsClient object to access its operations. - * - * @return the BackupsUnderBackupVaultsClient object. - */ - public BackupsUnderBackupVaultsClient getBackupsUnderBackupVaults() { - return this.backupsUnderBackupVaults; - } - - /** - * The BackupsUnderVolumesClient object to access its operations. - */ - private final BackupsUnderVolumesClient backupsUnderVolumes; - - /** - * Gets the BackupsUnderVolumesClient object to access its operations. - * - * @return the BackupsUnderVolumesClient object. - */ - public BackupsUnderVolumesClient getBackupsUnderVolumes() { - return this.backupsUnderVolumes; - } - - /** - * The BackupsUnderAccountsClient object to access its operations. - */ - private final BackupsUnderAccountsClient backupsUnderAccounts; - - /** - * Gets the BackupsUnderAccountsClient object to access its operations. - * - * @return the BackupsUnderAccountsClient object. - */ - public BackupsUnderAccountsClient getBackupsUnderAccounts() { - return this.backupsUnderAccounts; - } - /** * Initializes an instance of NetAppManagementClient client. * @@ -423,26 +333,20 @@ public BackupsUnderAccountsClient getBackupsUnderAccounts() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-05-01-preview"; + this.apiVersion = "2023-07-01"; this.operations = new OperationsClientImpl(this); this.netAppResources = new NetAppResourcesClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); - this.netAppResourceRegionInfos = new NetAppResourceRegionInfosClientImpl(this); this.accounts = new AccountsClientImpl(this); this.pools = new PoolsClientImpl(this); this.volumes = new VolumesClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); this.snapshotPolicies = new SnapshotPoliciesClientImpl(this); this.backups = new BackupsClientImpl(this); - this.accountBackups = new AccountBackupsClientImpl(this); this.backupPolicies = new BackupPoliciesClientImpl(this); this.volumeQuotaRules = new VolumeQuotaRulesClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); this.subvolumes = new SubvolumesClientImpl(this); - this.backupVaults = new BackupVaultsClientImpl(this); - this.backupsUnderBackupVaults = new BackupsUnderBackupVaultsClientImpl(this); - this.backupsUnderVolumes = new BackupsUnderVolumesClientImpl(this); - this.backupsUnderAccounts = new BackupsUnderAccountsClientImpl(this); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java index 05c90866dc82..0b3b0931de89 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java @@ -29,12 +29,12 @@ public NetAppResourceQuotaLimitsImpl(NetAppResourceQuotaLimitsClient innerClient public PagedIterable list(String location) { PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new SubscriptionQuotaItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SubscriptionQuotaItemImpl(inner1, this.manager())); } public PagedIterable list(String location, Context context) { PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new SubscriptionQuotaItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SubscriptionQuotaItemImpl(inner1, this.manager())); } public Response getWithResponse(String location, String quotaLimitName, Context context) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java deleted file mode 100644 index c97dfe9209b4..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.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.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.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.netapp.fluent.NetAppResourceRegionInfosClient; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.RegionInfosList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in NetAppResourceRegionInfosClient. - */ -public final class NetAppResourceRegionInfosClientImpl implements NetAppResourceRegionInfosClient { - /** - * The proxy service used to perform REST calls. - */ - private final NetAppResourceRegionInfosService service; - - /** - * The service client containing this operation class. - */ - private final NetAppManagementClientImpl client; - - /** - * Initializes an instance of NetAppResourceRegionInfosClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NetAppResourceRegionInfosClientImpl(NetAppManagementClientImpl client) { - this.service = RestProxy.create(NetAppResourceRegionInfosService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for NetAppManagementClientNetAppResourceRegionInfos to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "NetAppManagementClie") - public interface NetAppResourceRegionInfosService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/regionInfos/default") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), location, this.client.getApiVersion(), - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 regarding regionInfo Item along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 information regarding regionInfo Item along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), accept, context); - } - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 regarding regionInfo Item on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location) { - return getWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 information regarding regionInfo Item along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, Context context) { - return getWithResponseAsync(location, context).block(); - } - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 regarding regionInfo Item. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegionInfoResourceInner get(String location) { - return getWithResponse(location, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - * - * The nextLink 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 list of regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - * - * The nextLink 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 list of regionInfo resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java deleted file mode 100644 index 1f153feb2462..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.http.rest.PagedIterable; -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.netapp.fluent.NetAppResourceRegionInfosClient; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; -import com.azure.resourcemanager.netapp.models.RegionInfoResource; - -public final class NetAppResourceRegionInfosImpl implements NetAppResourceRegionInfos { - private static final ClientLogger LOGGER = new ClientLogger(NetAppResourceRegionInfosImpl.class); - - private final NetAppResourceRegionInfosClient innerClient; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - public NetAppResourceRegionInfosImpl(NetAppResourceRegionInfosClient innerClient, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new RegionInfoResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new RegionInfoResourceImpl(inner1, this.manager())); - } - - public Response getWithResponse(String location, Context context) { - Response inner = this.serviceClient().getWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegionInfoResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public RegionInfoResource get(String location) { - RegionInfoResourceInner inner = this.serviceClient().get(location); - if (inner != null) { - return new RegionInfoResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - private NetAppResourceRegionInfosClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java index f2395735d947..9331c1270c6a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java @@ -27,12 +27,12 @@ public OperationsImpl(OperationsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java index 1d2f4b6bba7b..86afd4437b01 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java @@ -112,14 +112,15 @@ Mono>> update(@HostParam("$host") String endpoint, @BodyParam("application/json") CapacityPoolPatch body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, Context context); + @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -989,9 +990,10 @@ private Mono>> deleteWithResponseAsync(String resource if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1030,9 +1032,10 @@ private Mono>> deleteWithResponseAsync(String resource if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, this.client.getApiVersion(), context); + accountName, poolName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java index 5a98e065dcab..c458d0655b3f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java @@ -28,12 +28,12 @@ public PoolsImpl(PoolsClient innerClient, com.azure.resourcemanager.netapp.NetAp public PagedIterable list(String resourceGroupName, String accountName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new CapacityPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapacityPoolImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String accountName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new CapacityPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapacityPoolImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, String poolName, @@ -66,17 +66,17 @@ public void delete(String resourceGroupName, String accountName, String poolName } public CapacityPool getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); @@ -85,17 +85,17 @@ public CapacityPool getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); @@ -104,17 +104,17 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); @@ -123,17 +123,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java deleted file mode 100644 index 75b06404841d..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionInfoResource; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Collections; -import java.util.List; - -public final class RegionInfoResourceImpl implements RegionInfoResource { - private RegionInfoResourceInner innerObject; - - private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; - - RegionInfoResourceImpl(RegionInfoResourceInner innerObject, - com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public RegionStorageToNetworkProximity storageToNetworkProximity() { - return this.innerModel().storageToNetworkProximity(); - } - - public List availabilityZoneMappings() { - List inner = this.innerModel().availabilityZoneMappings(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public RegionInfoResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/Utils.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java similarity index 99% rename from sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/Utils.java rename to sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java index e57610e622a0..ee1578ed1766 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/Utils.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java index e01581f6b8e3..ac801c5c3ceb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java @@ -114,7 +114,7 @@ Mono>> update(@HostParam("$host") String endpoint, @BodyParam("application/json") SnapshotPolicyPatch body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -122,7 +122,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("snapshotPolicyName") String snapshotPolicyName, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}/volumes") @@ -833,9 +833,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, snapshotPolicyName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, snapshotPolicyName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -873,9 +874,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, snapshotPolicyName, this.client.getApiVersion(), context); + accountName, snapshotPolicyName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java index dec956b3979b..ae8a86063680 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java @@ -31,12 +31,12 @@ public SnapshotPoliciesImpl(SnapshotPoliciesClient innerClient, public PagedIterable list(String resourceGroupName, String accountName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new SnapshotPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotPolicyImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String accountName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new SnapshotPolicyImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotPolicyImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, @@ -92,17 +92,17 @@ public SnapshotPolicyVolumeList listVolumes(String resourceGroupName, String acc } public SnapshotPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); @@ -111,17 +111,17 @@ public SnapshotPolicy getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); @@ -130,17 +130,17 @@ public Response getByIdWithResponse(String id, Context context) } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); @@ -149,17 +149,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String snapshotPolicyName = Utils.getValueFromIdByName(id, "snapshotPolicies"); + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "snapshotPolicies"); if (snapshotPolicyName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshotPolicies'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java index 3c2dbd88252e..a025eaee9a96 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java @@ -154,9 +154,9 @@ public SnapshotPolicy apply(Context context) { com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.snapshotPolicyName = Utils.getValueFromIdByName(innerObject.id(), "snapshotPolicies"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "snapshotPolicies"); } public SnapshotPolicy refresh() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java index a5db39da2155..9a6933c57e2a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java @@ -116,7 +116,7 @@ Mono>> update(@HostParam("$host") String endpoint, @PathParam("snapshotName") String snapshotName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") Object body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -125,9 +125,9 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @PathParam("snapshotName") String snapshotName, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/snapshots/{snapshotName}/restoreFiles") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -136,7 +136,8 @@ Mono>> restoreFiles(@HostParam("$host") String endpoin @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @PathParam("snapshotName") String snapshotName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SnapshotRestoreFiles body, Context context); + @BodyParam("application/json") SnapshotRestoreFiles body, @HeaderParam("Accept") String accept, + Context context); } /** @@ -1127,10 +1128,11 @@ private Mono>> deleteWithResponseAsync(String resource if (snapshotName == null) { return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), context)) + accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1177,9 +1179,10 @@ private Mono>> deleteWithResponseAsync(String resource if (snapshotName == null) { return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), accept, context); } /** @@ -1411,10 +1414,11 @@ private Mono>> restoreFilesWithResponseAsync(String re } else { body.validate(); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.restoreFiles(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), body, - context)) + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1467,9 +1471,10 @@ private Mono>> restoreFilesWithResponseAsync(String re } else { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.restoreFiles(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), body, context); + accountName, poolName, volumeName, snapshotName, this.client.getApiVersion(), body, accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java index a7ae03c1f471..1de9c3795758 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java @@ -32,14 +32,14 @@ public PagedIterable list(String resourceGroupName, String accountName String volumeName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); - return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); - return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, String poolName, @@ -109,27 +109,27 @@ public void restoreFiles(String resourceGroupName, String accountName, String po } public Snapshot getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); @@ -139,27 +139,27 @@ public Snapshot getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); @@ -168,27 +168,27 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); @@ -197,27 +197,27 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String snapshotName = Utils.getValueFromIdByName(id, "snapshots"); + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "snapshots"); if (snapshotName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'snapshots'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java index e839135d0b06..e0f3f45c2165 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java @@ -120,11 +120,11 @@ public SubvolumeInfo apply(Context context) { com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); - this.volumeName = Utils.getValueFromIdByName(innerObject.id(), "volumes"); - this.subvolumeName = Utils.getValueFromIdByName(innerObject.id(), "subvolumes"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); + this.subvolumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "subvolumes"); } public SubvolumeInfo refresh() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java index 7f3db8910b81..b346b9d8b2bb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java @@ -119,7 +119,7 @@ Mono>> update(@HostParam("$host") String endpoint, @BodyParam("application/json") SubvolumePatchRequest body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -128,7 +128,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @PathParam("subvolumeName") String subvolumeName, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/subvolumes/{subvolumeName}/getMetadata") @@ -1145,10 +1145,11 @@ private Mono>> deleteWithResponseAsync(String resource if (subvolumeName == null) { return Mono.error(new IllegalArgumentException("Parameter subvolumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, subvolumeName, this.client.getApiVersion(), context)) + accountName, poolName, volumeName, subvolumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1195,9 +1196,10 @@ private Mono>> deleteWithResponseAsync(String resource if (subvolumeName == null) { return Mono.error(new IllegalArgumentException("Parameter subvolumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, subvolumeName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, subvolumeName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java index 3b06055385ef..bf88658f1e6d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java @@ -33,14 +33,14 @@ public PagedIterable listByVolume(String resourceGroupName, Strin String volumeName) { PagedIterable inner = this.serviceClient().listByVolume(resourceGroupName, accountName, poolName, volumeName); - return Utils.mapPage(inner, inner1 -> new SubvolumeInfoImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SubvolumeInfoImpl(inner1, this.manager())); } public PagedIterable listByVolume(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { PagedIterable inner = this.serviceClient().listByVolume(resourceGroupName, accountName, poolName, volumeName, context); - return Utils.mapPage(inner, inner1 -> new SubvolumeInfoImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SubvolumeInfoImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, String poolName, @@ -99,27 +99,27 @@ public SubvolumeModel getMetadata(String resourceGroupName, String accountName, } public SubvolumeInfo getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); + String subvolumeName = ResourceManagerUtils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); @@ -129,27 +129,27 @@ public SubvolumeInfo getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); + String subvolumeName = ResourceManagerUtils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); @@ -158,27 +158,27 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); + String subvolumeName = ResourceManagerUtils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); @@ -187,27 +187,27 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String subvolumeName = Utils.getValueFromIdByName(id, "subvolumes"); + String subvolumeName = ResourceManagerUtils.getValueFromIdByName(id, "subvolumes"); if (subvolumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'subvolumes'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java index c08e51c9274f..93dd5c63a1b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java @@ -101,7 +101,7 @@ Mono>> create(@HostParam("$host") String endpoint, @BodyParam("application/json") VolumeGroupDetailsInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/volumeGroups/{volumeGroupName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -109,7 +109,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("volumeGroupName") String volumeGroupName, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** @@ -735,9 +735,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter volumeGroupName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, volumeGroupName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, volumeGroupName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -777,9 +778,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter volumeGroupName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, volumeGroupName, this.client.getApiVersion(), context); + accountName, volumeGroupName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java index 7060fa97463e..df4a412f9cc4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java @@ -32,14 +32,14 @@ public VolumeGroupsImpl(VolumeGroupsClient innerClient, public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName) { PagedIterable inner = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName); - return Utils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); } public PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context) { PagedIterable inner = this.serviceClient().listByNetAppAccount(resourceGroupName, accountName, context); - return Utils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeGroupImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, @@ -72,17 +72,17 @@ public void delete(String resourceGroupName, String accountName, String volumeGr } public VolumeGroupDetails getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); @@ -91,17 +91,17 @@ public VolumeGroupDetails getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); @@ -110,17 +110,17 @@ public Response getByIdWithResponse(String id, Context conte } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); @@ -129,17 +129,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String volumeGroupName = Utils.getValueFromIdByName(id, "volumeGroups"); + String volumeGroupName = ResourceManagerUtils.getValueFromIdByName(id, "volumeGroups"); if (volumeGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeGroups'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java index ef299b7ebe38..febbb86c0938 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java @@ -325,10 +325,6 @@ public String originatingResourceId() { return this.innerModel().originatingResourceId(); } - public Long inheritedSizeInBytes() { - return this.innerModel().inheritedSizeInBytes(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -404,10 +400,10 @@ public Volume apply(Context context) { VolumeImpl(VolumeInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); - this.volumeName = Utils.getValueFromIdByName(innerObject.id(), "volumes"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); } public Volume refresh() { @@ -447,14 +443,6 @@ public void resetCifsPassword(Context context) { serviceManager.volumes().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName, context); } - public void splitCloneFromParent() { - serviceManager.volumes().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName); - } - - public void splitCloneFromParent(Context context) { - serviceManager.volumes().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName, context); - } - public void breakFileLocks() { serviceManager.volumes().breakFileLocks(resourceGroupName, accountName, poolName, volumeName); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java index 49548a6ebf17..3d531824cd66 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java @@ -145,11 +145,11 @@ public VolumeQuotaRule apply(Context context) { com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = Utils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); - this.poolName = Utils.getValueFromIdByName(innerObject.id(), "capacityPools"); - this.volumeName = Utils.getValueFromIdByName(innerObject.id(), "volumes"); - this.volumeQuotaRuleName = Utils.getValueFromIdByName(innerObject.id(), "volumeQuotaRules"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); + this.volumeQuotaRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumeQuotaRules"); } public VolumeQuotaRule refresh() { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java index cbb24432561d..124f5cd8793d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java @@ -117,7 +117,7 @@ Mono>> update(@HostParam("$host") String endpoint, @BodyParam("application/json") VolumeQuotaRulePatch body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/volumeQuotaRules/{volumeQuotaRuleName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -126,7 +126,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @PathParam("volumeQuotaRuleName") String volumeQuotaRuleName, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** @@ -1136,10 +1136,11 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter volumeQuotaRuleName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, volumeQuotaRuleName, this.client.getApiVersion(), context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, volumeQuotaRuleName, this.client.getApiVersion(), + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1187,9 +1188,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter volumeQuotaRuleName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, volumeQuotaRuleName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, volumeQuotaRuleName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java index 40b328b2d45a..41570c7d99a4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java @@ -31,14 +31,14 @@ public PagedIterable listByVolume(String resourceGroupName, Str String volumeName) { PagedIterable inner = this.serviceClient().listByVolume(resourceGroupName, accountName, poolName, volumeName); - return Utils.mapPage(inner, inner1 -> new VolumeQuotaRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeQuotaRuleImpl(inner1, this.manager())); } public PagedIterable listByVolume(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { PagedIterable inner = this.serviceClient().listByVolume(resourceGroupName, accountName, poolName, volumeName, context); - return Utils.mapPage(inner, inner1 -> new VolumeQuotaRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeQuotaRuleImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, String poolName, @@ -75,27 +75,27 @@ public void delete(String resourceGroupName, String accountName, String poolName } public VolumeQuotaRule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + String volumeQuotaRuleName = ResourceManagerUtils.getValueFromIdByName(id, "volumeQuotaRules"); if (volumeQuotaRuleName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); @@ -106,27 +106,27 @@ public VolumeQuotaRule getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + String volumeQuotaRuleName = ResourceManagerUtils.getValueFromIdByName(id, "volumeQuotaRules"); if (volumeQuotaRuleName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); @@ -135,27 +135,27 @@ public Response getByIdWithResponse(String id, Context context) } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + String volumeQuotaRuleName = ResourceManagerUtils.getValueFromIdByName(id, "volumeQuotaRules"); if (volumeQuotaRuleName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); @@ -164,27 +164,27 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); } - String volumeQuotaRuleName = Utils.getValueFromIdByName(id, "volumeQuotaRules"); + String volumeQuotaRuleName = ResourceManagerUtils.getValueFromIdByName(id, "volumeQuotaRules"); if (volumeQuotaRuleName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumeQuotaRules'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java index 9dc496a5a5ac..4713305302b1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java @@ -126,7 +126,7 @@ Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VolumePatch body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -135,7 +135,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("forceDelete") Boolean forceDelete, @QueryParam("api-version") String apiVersion, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/populateAvailabilityZone") @@ -147,7 +147,7 @@ Mono>> populateAvailabilityZone(@HostParam("$host") St @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -156,29 +156,19 @@ Mono>> revert(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VolumeRevert body, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resetCifsPassword") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> resetCifsPassword(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/splitCloneFromParent") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> splitCloneFromParent(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakFileLocks") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -187,7 +177,7 @@ Mono>> breakFileLocks(@HostParam("$host") String endpo @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BreakFileLocksRequest body, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/getGroupIdListForLdapUser") @@ -201,7 +191,7 @@ Mono>> listGetGroupIdListForLdapUser(@HostParam("$host @BodyParam("application/json") GetGroupIdListForLdapUserRequest body, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -210,9 +200,9 @@ Mono>> breakReplication(@HostParam("$host") String end @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BreakReplicationRequest body, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reestablishReplication") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -221,7 +211,8 @@ Mono>> reestablishReplication(@HostParam("$host") Stri @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ReestablishReplicationRequest body, Context context); + @BodyParam("application/json") ReestablishReplicationRequest body, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus") @@ -243,7 +234,7 @@ Mono> listReplications(@HostParam("$host") String end @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -251,9 +242,9 @@ Mono>> resyncReplication(@HostParam("$host") String en @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -261,9 +252,9 @@ Mono>> deleteReplication(@HostParam("$host") String en @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -272,9 +263,9 @@ Mono>> authorizeReplication(@HostParam("$host") String @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") AuthorizeRequest body, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -282,9 +273,9 @@ Mono>> reInitializeReplication(@HostParam("$host") Str @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -293,9 +284,9 @@ Mono>> poolChange(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PoolChangeRequest body, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/relocate") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -304,9 +295,9 @@ Mono>> relocate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RelocateVolumeRequest body, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/finalizeRelocation") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -314,9 +305,9 @@ Mono>> finalizeRelocation(@HostParam("$host") String e @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revertRelocation") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) @@ -324,7 +315,7 @@ Mono>> revertRelocation(@HostParam("$host") String end @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, - @QueryParam("api-version") String apiVersion, Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -1261,10 +1252,11 @@ private Mono>> deleteWithResponseAsync(String resource if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, forceDelete, this.client.getApiVersion(), context)) + accountName, poolName, volumeName, forceDelete, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1309,9 +1301,10 @@ private Mono>> deleteWithResponseAsync(String resource if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, forceDelete, this.client.getApiVersion(), context); + accountName, poolName, volumeName, forceDelete, this.client.getApiVersion(), accept, context); } /** @@ -1854,9 +1847,11 @@ private Mono>> revertWithResponseAsync(String resource } else { body.validate(); } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.revert(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + .withContext( + context -> service.revert(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1905,9 +1900,10 @@ private Mono>> revertWithResponseAsync(String resource } else { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.revert(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -2128,10 +2124,11 @@ private Mono>> resetCifsPasswordWithResponseAsync(Stri if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.resetCifsPassword(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2174,9 +2171,10 @@ private Mono>> resetCifsPasswordWithResponseAsync(Stri if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetCifsPassword(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** @@ -2350,269 +2348,6 @@ public void resetCifsPassword(String resourceGroupName, String accountName, Stri resetCifsPasswordAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); } - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> splitCloneFromParentWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName) { - 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.splitCloneFromParent(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> splitCloneFromParentWithResponseAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, 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 (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } - if (volumeName == null) { - return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.splitCloneFromParent(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginSplitCloneFromParentAsync(String resourceGroupName, - String accountName, String poolName, String volumeName) { - Mono>> mono - = splitCloneFromParentWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginSplitCloneFromParentAsync(String resourceGroupName, - String accountName, String poolName, String volumeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = splitCloneFromParentWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSplitCloneFromParent(String resourceGroupName, String accountName, - String poolName, String volumeName) { - return this.beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName) - .getSyncPoller(); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSplitCloneFromParent(String resourceGroupName, String accountName, - String poolName, String volumeName, Context context) { - return this.beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName, context) - .getSyncPoller(); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono splitCloneFromParentAsync(String resourceGroupName, String accountName, String poolName, - String volumeName) { - return beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono splitCloneFromParentAsync(String resourceGroupName, String accountName, String poolName, - String volumeName, Context context) { - return beginSplitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName) { - splitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName).block(); - } - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, - Context context) { - splitCloneFromParentAsync(resourceGroupName, accountName, poolName, volumeName, context).block(); - } - /** * Break file locks * @@ -2655,9 +2390,11 @@ private Mono>> breakFileLocksWithResponseAsync(String if (body != null) { body.validate(); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.breakFileLocks(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -2704,9 +2441,10 @@ private Mono>> breakFileLocksWithResponseAsync(String if (body != null) { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.breakFileLocks(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -3273,9 +3011,11 @@ private Mono>> breakReplicationWithResponseAsync(Strin if (body != null) { body.validate(); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.breakReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3322,9 +3062,10 @@ private Mono>> breakReplicationWithResponseAsync(Strin if (body != null) { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.breakReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -3598,10 +3339,11 @@ private Mono>> reestablishReplicationWithResponseAsync } else { body.validate(); } + final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.reestablishReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + .withContext(context -> service.reestablishReplication(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -3651,9 +3393,10 @@ private Mono>> reestablishReplicationWithResponseAsync } else { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.reestablishReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -4220,10 +3963,11 @@ private Mono>> resyncReplicationWithResponseAsync(Stri if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.resyncReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4267,9 +4011,10 @@ private Mono>> resyncReplicationWithResponseAsync(Stri if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.resyncReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** @@ -4489,10 +4234,11 @@ private Mono>> deleteReplicationWithResponseAsync(Stri if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.deleteReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4535,9 +4281,10 @@ private Mono>> deleteReplicationWithResponseAsync(Stri if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.deleteReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** @@ -4755,10 +4502,11 @@ private Mono>> authorizeReplicationWithResponseAsync(S } else { body.validate(); } + final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.authorizeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + .withContext(context -> service.authorizeReplication(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -4807,9 +4555,10 @@ private Mono>> authorizeReplicationWithResponseAsync(S } else { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.authorizeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -5031,10 +4780,11 @@ private Mono>> reInitializeReplicationWithResponseAsyn if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.reInitializeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5077,9 +4827,10 @@ private Mono>> reInitializeReplicationWithResponseAsyn if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.reInitializeReplication(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context); + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** @@ -5299,9 +5050,11 @@ private Mono>> poolChangeWithResponseAsync(String reso } else { body.validate(); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.poolChange(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5350,9 +5103,10 @@ private Mono>> poolChangeWithResponseAsync(String reso } else { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.poolChange(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -5577,9 +5331,11 @@ private Mono>> relocateWithResponseAsync(String resour if (body != null) { body.validate(); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.relocate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5626,9 +5382,10 @@ private Mono>> relocateWithResponseAsync(String resour if (body != null) { body.validate(); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.relocate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), body, context); + accountName, poolName, volumeName, this.client.getApiVersion(), body, accept, context); } /** @@ -5893,10 +5650,11 @@ private Mono>> finalizeRelocationWithResponseAsync(Str if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext( context -> service.finalizeRelocation(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -5939,9 +5697,10 @@ private Mono>> finalizeRelocationWithResponseAsync(Str if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.finalizeRelocation(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** @@ -6153,9 +5912,10 @@ private Mono>> revertRelocationWithResponseAsync(Strin if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.revertRelocation(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), context)) + resourceGroupName, accountName, poolName, volumeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -6198,9 +5958,10 @@ private Mono>> revertRelocationWithResponseAsync(Strin if (volumeName == null) { return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); } + final String accept = "application/json"; context = this.client.mergeContext(context); return service.revertRelocation(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, poolName, volumeName, this.client.getApiVersion(), context); + accountName, poolName, volumeName, this.client.getApiVersion(), accept, context); } /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java index 370e175b6711..87039bca0304 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java @@ -42,12 +42,12 @@ public VolumesImpl(VolumesClient innerClient, com.azure.resourcemanager.netapp.N public PagedIterable list(String resourceGroupName, String accountName, String poolName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, poolName); - return Utils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String accountName, String poolName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, poolName, context); - return Utils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VolumeImpl(inner1, this.manager())); } public Response getWithResponse(String resourceGroupName, String accountName, String poolName, @@ -121,15 +121,6 @@ public void resetCifsPassword(String resourceGroupName, String accountName, Stri this.serviceClient().resetCifsPassword(resourceGroupName, accountName, poolName, volumeName, context); } - public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName) { - this.serviceClient().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName); - } - - public void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, - Context context) { - this.serviceClient().splitCloneFromParent(resourceGroupName, accountName, poolName, volumeName, context); - } - public void breakFileLocks(String resourceGroupName, String accountName, String poolName, String volumeName) { this.serviceClient().breakFileLocks(resourceGroupName, accountName, poolName, volumeName); } @@ -208,14 +199,14 @@ public PagedIterable listReplications(String resourceGroupName, Str String volumeName) { PagedIterable inner = this.serviceClient().listReplications(resourceGroupName, accountName, poolName, volumeName); - return Utils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); } public PagedIterable listReplications(String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { PagedIterable inner = this.serviceClient().listReplications(resourceGroupName, accountName, poolName, volumeName, context); - return Utils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ReplicationImpl(inner1, this.manager())); } public void resyncReplication(String resourceGroupName, String accountName, String poolName, String volumeName) { @@ -294,22 +285,22 @@ public void revertRelocation(String resourceGroupName, String accountName, Strin } public Volume getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); @@ -318,22 +309,22 @@ public Volume getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); @@ -342,22 +333,22 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); @@ -367,22 +358,22 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Boolean forceDelete, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String accountName = Utils.getValueFromIdByName(id, "netAppAccounts"); + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "netAppAccounts"); if (accountName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); } - String poolName = Utils.getValueFromIdByName(id, "capacityPools"); + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); if (poolName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); } - String volumeName = Utils.getValueFromIdByName(id, "volumes"); + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); if (volumeName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java deleted file mode 100644 index 1a4707aa1af4..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountBackups.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of AccountBackups. - */ -public interface AccountBackups { - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); - - /** - * List Backups for a Netapp Account - * - * List all Backups for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param includeOnlyBackupsFromDeletedVolumes An option to specify whether to return backups only from deleted - * volumes. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, - String includeOnlyBackupsFromDeletedVolumes, Context context); - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String backupName, Context context); - - /** - * Get Backup for a Netapp Account - * - * Gets the specified backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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 specified backup for a Netapp Account. - */ - Backup get(String resourceGroupName, String accountName, String backupName); - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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. - */ - void delete(String resourceGroupName, String accountName, String backupName); - - /** - * Delete Backup for a Netapp Account - * - * Delete the specified Backup for a Netapp Account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupName The name of the backup. - * @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. - */ - void delete(String resourceGroupName, String accountName, String backupName, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java index e989c99f2595..e7c8474d99a2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java @@ -149,37 +149,6 @@ Response getByResourceGroupWithResponse(String resourceGroupName, */ void renewCredentials(String resourceGroupName, String accountName, Context context); - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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. - */ - void migrateEncryptionKey(String resourceGroupName, String accountName); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body The required parameters to perform encryption migration. - * @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. - */ - void migrateEncryptionKey(String resourceGroupName, String accountName, EncryptionMigrationRequest body, - Context context); - /** * Describe a NetApp Account * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java deleted file mode 100644 index b3e82fc92299..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of Backup. - */ -public interface Backup { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the backupId property: backupId - * - * UUID v4 used to identify the Backup. - * - * @return the backupId value. - */ - String backupId(); - - /** - * Gets the creationDate property: creationDate - * - * The creation date of the backup. - * - * @return the creationDate value. - */ - OffsetDateTime creationDate(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the size property: Size of backup in bytes. - * - * @return the size value. - */ - Long size(); - - /** - * Gets the label property: Label for backup. - * - * @return the label value. - */ - String label(); - - /** - * Gets the backupType property: backupType - * - * Type of backup Manual or Scheduled. - * - * @return the backupType value. - */ - BackupType backupType(); - - /** - * Gets the failureReason property: Failure reason. - * - * @return the failureReason value. - */ - String failureReason(); - - /** - * Gets the volumeResourceId property: ResourceId used to identify the Volume. - * - * @return the volumeResourceId value. - */ - String volumeResourceId(); - - /** - * Gets the useExistingSnapshot property: Manual backup an already existing snapshot. This will always be false for - * scheduled backups and true/false for manual backups. - * - * @return the useExistingSnapshot value. - */ - Boolean useExistingSnapshot(); - - /** - * Gets the snapshotName property: The name of the snapshot. - * - * @return the snapshotName value. - */ - String snapshotName(); - - /** - * Gets the backupPolicyResourceId property: ResourceId used to identify the backup policy. - * - * @return the backupPolicyResourceId value. - */ - String backupPolicyResourceId(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupInner object. - * - * @return the inner object. - */ - BackupInner innerModel(); - - /** - * The entirety of the Backup definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, - DefinitionStages.WithVolumeResourceId, DefinitionStages.WithCreate { - } - - /** - * The Backup definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Backup definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Backup definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName, backupVaultName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @return the next definition stage. - */ - WithVolumeResourceId withExistingBackupVault(String resourceGroupName, String accountName, - String backupVaultName); - } - - /** - * The stage of the Backup definition allowing to specify volumeResourceId. - */ - interface WithVolumeResourceId { - /** - * Specifies the volumeResourceId property: ResourceId used to identify the Volume. - * - * @param volumeResourceId ResourceId used to identify the Volume. - * @return the next definition stage. - */ - WithCreate withVolumeResourceId(String volumeResourceId); - } - - /** - * The stage of the Backup definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithLabel, DefinitionStages.WithUseExistingSnapshot, - DefinitionStages.WithSnapshotName { - /** - * Executes the create request. - * - * @return the created resource. - */ - Backup create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Backup create(Context context); - } - - /** - * The stage of the Backup definition allowing to specify label. - */ - interface WithLabel { - /** - * Specifies the label property: Label for backup. - * - * @param label Label for backup. - * @return the next definition stage. - */ - WithCreate withLabel(String label); - } - - /** - * The stage of the Backup definition allowing to specify useExistingSnapshot. - */ - interface WithUseExistingSnapshot { - /** - * Specifies the useExistingSnapshot property: Manual backup an already existing snapshot. This will always - * be false for scheduled backups and true/false for manual backups. - * - * @param useExistingSnapshot Manual backup an already existing snapshot. This will always be false for - * scheduled backups and true/false for manual backups. - * @return the next definition stage. - */ - WithCreate withUseExistingSnapshot(Boolean useExistingSnapshot); - } - - /** - * The stage of the Backup definition allowing to specify snapshotName. - */ - interface WithSnapshotName { - /** - * Specifies the snapshotName property: The name of the snapshot. - * - * @param snapshotName The name of the snapshot. - * @return the next definition stage. - */ - WithCreate withSnapshotName(String snapshotName); - } - } - - /** - * Begins update for the Backup resource. - * - * @return the stage of resource update. - */ - Backup.Update update(); - - /** - * The template for Backup update. - */ - interface Update extends UpdateStages.WithLabel { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Backup apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Backup apply(Context context); - } - - /** - * The Backup update stages. - */ - interface UpdateStages { - /** - * The stage of the Backup update allowing to specify label. - */ - interface WithLabel { - /** - * Specifies the label property: Label for backup. - * - * @param label Label for backup. - * @return the next definition stage. - */ - Update withLabel(String label); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Backup refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Backup refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java deleted file mode 100644 index 10b95c292fe3..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Backup patch. - */ -@Fluent -public final class BackupPatch { - /* - * Backup Patch Properties - */ - @JsonProperty(value = "properties") - private BackupPatchProperties innerProperties; - - /** - * Creates an instance of BackupPatch class. - */ - public BackupPatch() { - } - - /** - * Get the innerProperties property: Backup Patch Properties. - * - * @return the innerProperties value. - */ - private BackupPatchProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the label property: Label for backup. - * - * @return the label value. - */ - public String label() { - return this.innerProperties() == null ? null : this.innerProperties().label(); - } - - /** - * Set the label property: Label for backup. - * - * @param label the label value to set. - * @return the BackupPatch object itself. - */ - public BackupPatch withLabel(String label) { - if (this.innerProperties() == null) { - this.innerProperties = new BackupPatchProperties(); - } - this.innerProperties().withLabel(label); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java deleted file mode 100644 index c9e02848aff9..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * Restore payload for Single File Backup Restore. - */ -@Fluent -public final class BackupRestoreFiles { - /* - * List of files to be restored - */ - @JsonProperty(value = "fileList", required = true) - private List fileList; - - /* - * Destination folder where the files will be restored. The path name should start with a forward slash. If it is - * omitted from request then restore is done at the root folder of the destination volume by default - */ - @JsonProperty(value = "restoreFilePath") - private String restoreFilePath; - - /* - * Resource Id of the destination volume on which the files need to be restored - */ - @JsonProperty(value = "destinationVolumeId", required = true) - private String destinationVolumeId; - - /** - * Creates an instance of BackupRestoreFiles class. - */ - public BackupRestoreFiles() { - } - - /** - * Get the fileList property: List of files to be restored. - * - * @return the fileList value. - */ - public List fileList() { - return this.fileList; - } - - /** - * Set the fileList property: List of files to be restored. - * - * @param fileList the fileList value to set. - * @return the BackupRestoreFiles object itself. - */ - public BackupRestoreFiles withFileList(List fileList) { - this.fileList = fileList; - return this; - } - - /** - * Get the restoreFilePath property: Destination folder where the files will be restored. The path name should - * start with a forward slash. If it is omitted from request then restore is done at the root folder of the - * destination volume by default. - * - * @return the restoreFilePath value. - */ - public String restoreFilePath() { - return this.restoreFilePath; - } - - /** - * Set the restoreFilePath property: Destination folder where the files will be restored. The path name should - * start with a forward slash. If it is omitted from request then restore is done at the root folder of the - * destination volume by default. - * - * @param restoreFilePath the restoreFilePath value to set. - * @return the BackupRestoreFiles object itself. - */ - public BackupRestoreFiles withRestoreFilePath(String restoreFilePath) { - this.restoreFilePath = restoreFilePath; - return this; - } - - /** - * Get the destinationVolumeId property: Resource Id of the destination volume on which the files need to be - * restored. - * - * @return the destinationVolumeId value. - */ - public String destinationVolumeId() { - return this.destinationVolumeId; - } - - /** - * Set the destinationVolumeId property: Resource Id of the destination volume on which the files need to be - * restored. - * - * @param destinationVolumeId the destinationVolumeId value to set. - * @return the BackupRestoreFiles object itself. - */ - public BackupRestoreFiles withDestinationVolumeId(String destinationVolumeId) { - this.destinationVolumeId = destinationVolumeId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileList() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property fileList in model BackupRestoreFiles")); - } - if (destinationVolumeId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property destinationVolumeId in model BackupRestoreFiles")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupRestoreFiles.class); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java deleted file mode 100644 index 7b5447a254d9..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; - -/** - * An immutable client-side representation of BackupStatus. - */ -public interface BackupStatus { - /** - * Gets the healthy property: Backup health status. - * - * @return the healthy value. - */ - Boolean healthy(); - - /** - * Gets the relationshipStatus property: Status of the backup mirror relationship. - * - * @return the relationshipStatus value. - */ - RelationshipStatus relationshipStatus(); - - /** - * Gets the mirrorState property: The status of the backup. - * - * @return the mirrorState value. - */ - MirrorState mirrorState(); - - /** - * Gets the unhealthyReason property: Reason for the unhealthy backup relationship. - * - * @return the unhealthyReason value. - */ - String unhealthyReason(); - - /** - * Gets the errorMessage property: Displays error message if the backup is in an error state. - * - * @return the errorMessage value. - */ - String errorMessage(); - - /** - * Gets the lastTransferSize property: Displays the last transfer size. - * - * @return the lastTransferSize value. - */ - Long lastTransferSize(); - - /** - * Gets the lastTransferType property: Displays the last transfer type. - * - * @return the lastTransferType value. - */ - String lastTransferType(); - - /** - * Gets the totalTransferBytes property: Displays the total bytes transferred. - * - * @return the totalTransferBytes value. - */ - Long totalTransferBytes(); - - /** - * Gets the transferProgressBytes property: Displays the total number of bytes transferred for the ongoing - * operation. - * - * @return the transferProgressBytes value. - */ - Long transferProgressBytes(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner object. - * - * @return the inner object. - */ - BackupStatusInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java deleted file mode 100644 index 840e5383705b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * backupType - * - * Type of backup Manual or Scheduled. - */ -public final class BackupType extends ExpandableStringEnum { - /** - * Static value Manual for BackupType. - */ - public static final BackupType MANUAL = fromString("Manual"); - - /** - * Static value Scheduled for BackupType. - */ - public static final BackupType SCHEDULED = fromString("Scheduled"); - - /** - * Creates a new instance of BackupType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BackupType() { - } - - /** - * Creates or finds a BackupType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BackupType. - */ - @JsonCreator - public static BackupType fromString(String name) { - return fromString(name, BackupType.class); - } - - /** - * Gets known BackupType values. - * - * @return known BackupType values. - */ - public static Collection values() { - return values(BackupType.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java deleted file mode 100644 index 778124fa7ed5..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import java.util.Map; - -/** - * An immutable client-side representation of BackupVault. - */ -public interface BackupVault { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner object. - * - * @return the inner object. - */ - BackupVaultInner innerModel(); - - /** - * The entirety of the BackupVault definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The BackupVault definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BackupVault definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the BackupVault definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the BackupVault definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @return the next definition stage. - */ - WithCreate withExistingNetAppAccount(String resourceGroupName, String accountName); - } - - /** - * The stage of the BackupVault definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags { - /** - * Executes the create request. - * - * @return the created resource. - */ - BackupVault create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BackupVault create(Context context); - } - - /** - * The stage of the BackupVault definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - } - - /** - * Begins update for the BackupVault resource. - * - * @return the stage of resource update. - */ - BackupVault.Update update(); - - /** - * The template for BackupVault update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BackupVault apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BackupVault apply(Context context); - } - - /** - * The BackupVault update stages. - */ - interface UpdateStages { - /** - * The stage of the BackupVault update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BackupVault refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BackupVault refresh(Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java deleted file mode 100644 index 0a25d4bb2e7f..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** - * Backup Vault information. - */ -@Fluent -public final class BackupVaultPatch { - /* - * Resource tags - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * Creates an instance of BackupVaultPatch class. - */ - public BackupVaultPatch() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the BackupVaultPatch object itself. - */ - public BackupVaultPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java deleted file mode 100644 index bdf958fac078..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of BackupVaults. - */ -public interface BackupVaults { - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedIterable}. - */ - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName); - - /** - * Describe all Backup Vaults - * - * List and describe all Backup Vaults in the NetApp account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @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 list of Backup Vaults as paginated response with {@link PagedIterable}. - */ - PagedIterable listByNetAppAccount(String resourceGroupName, String accountName, Context context); - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 Backup Vault along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - Context context); - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 Backup Vault. - */ - BackupVault get(String resourceGroupName, String accountName, String backupVaultName); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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. - */ - void delete(String resourceGroupName, String accountName, String backupVaultName); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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. - */ - void delete(String resourceGroupName, String accountName, String backupVaultName, Context context); - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param id the resource ID. - * @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 Backup Vault along with {@link Response}. - */ - BackupVault getById(String id); - - /** - * Describe the Backup Vault - * - * Get the Backup Vault. - * - * @param id the resource ID. - * @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 Backup Vault along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete NetApp Backup Vault - * - * Delete the specified Backup Vault. - * - * @param id the resource ID. - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new BackupVault resource. - * - * @param name resource name. - * @return the first stage of the new BackupVault definition. - */ - BackupVault.DefinitionStages.Blank define(String name); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java deleted file mode 100644 index 81bc9513ab55..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * List of Backup Vaults. - */ -@Fluent -public final class BackupVaultsList { - /* - * A list of Backup Vaults - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Creates an instance of BackupVaultsList class. - */ - public BackupVaultsList() { - } - - /** - * Get the value property: A list of Backup Vaults. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of Backup Vaults. - * - * @param value the value value to set. - * @return the BackupVaultsList object itself. - */ - public BackupVaultsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to get the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the BackupVaultsList object itself. - */ - public BackupVaultsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java index 918e26f40971..f80539951799 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backups.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.netapp.models; -import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; @@ -12,40 +11,6 @@ * Resource collection API of Backups. */ public interface Backups { - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume along with {@link Response}. - */ - Response getLatestStatusWithResponse(String resourceGroupName, String accountName, String poolName, - String volumeName, Context context); - - /** - * Get the latest backup status of a volume - * - * Get the latest status of the backup for a volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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 latest status of the backup for a volume. - */ - BackupStatus getLatestStatus(String resourceGroupName, String accountName, String poolName, String volumeName); - /** * Get volume's restore status * @@ -80,164 +45,4 @@ Response getVolumeRestoreStatusWithResponse(String resourceGroupN */ RestoreStatus getVolumeRestoreStatus(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); - - /** - * List Backups - * - * List all backups Under a Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param filter An option to specify the VolumeResourceId. If present, then only returns the backups under the - * specified volume. - * @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 list of Backups as paginated response with {@link PagedIterable}. - */ - PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, - String filter, Context context); - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, - String backupName, Context context); - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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 specified Backup under Backup Vault. - */ - Backup get(String resourceGroupName, String accountName, String backupVaultName, String backupName); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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. - */ - void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @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. - */ - void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, - Context context); - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param id the resource ID. - * @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 specified Backup under Backup Vault along with {@link Response}. - */ - Backup getById(String id); - - /** - * Describe the Backup under Backup Vault - * - * Get the specified Backup under Backup Vault. - * - * @param id the resource ID. - * @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 specified Backup under Backup Vault along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete backup - * - * Delete a Backup under the Backup Vault. - * - * @param id the resource ID. - * @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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Backup resource. - * - * @param name resource name. - * @return the first stage of the new Backup definition. - */ - Backup.DefinitionStages.Blank define(String name); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java deleted file mode 100644 index 3bdae065250b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * List of Backups. - */ -@Fluent -public final class BackupsList { - /* - * A list of Backups - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Creates an instance of BackupsList class. - */ - public BackupsList() { - } - - /** - * Get the value property: A list of Backups. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of Backups. - * - * @param value the value value to set. - * @return the BackupsList object itself. - */ - public BackupsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to get the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the BackupsList object itself. - */ - public BackupsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java deleted file mode 100644 index 6db10d82b8a0..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Migrate Backups Request. - */ -@Fluent -public final class BackupsMigrationRequest { - /* - * The ResourceId of the Backup Vault - */ - @JsonProperty(value = "backupVaultId", required = true) - private String backupVaultId; - - /** - * Creates an instance of BackupsMigrationRequest class. - */ - public BackupsMigrationRequest() { - } - - /** - * Get the backupVaultId property: The ResourceId of the Backup Vault. - * - * @return the backupVaultId value. - */ - public String backupVaultId() { - return this.backupVaultId; - } - - /** - * Set the backupVaultId property: The ResourceId of the Backup Vault. - * - * @param backupVaultId the backupVaultId value to set. - * @return the BackupsMigrationRequest object itself. - */ - public BackupsMigrationRequest withBackupVaultId(String backupVaultId) { - this.backupVaultId = backupVaultId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (backupVaultId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property backupVaultId in model BackupsMigrationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BackupsMigrationRequest.class); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java deleted file mode 100644 index 2f0176a3561a..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.util.Context; - -/** - * Resource collection API of BackupsUnderAccounts. - */ -public interface BackupsUnderAccounts { - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the 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. - */ - void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body); - - /** - * Create a new migrate request for backups under account - * - * Migrate the backups under a NetApp account to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param body Migrate backups under an account payload supplied in the body of the operation. - * @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. - */ - void migrateBackups(String resourceGroupName, String accountName, BackupsMigrationRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java deleted file mode 100644 index 45e4d720539b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.util.Context; - -/** - * Resource collection API of BackupsUnderBackupVaults. - */ -public interface BackupsUnderBackupVaults { - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the 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. - */ - void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body); - - /** - * Create a new Backup Restore Files request - * - * Restore the specified files from the specified backup to the active filesystem. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param backupVaultName The name of the Backup Vault. - * @param backupName The name of the backup. - * @param body Restore payload supplied in the body of the operation. - * @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. - */ - void restoreFiles(String resourceGroupName, String accountName, String backupVaultName, String backupName, - BackupRestoreFiles body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java deleted file mode 100644 index d277aa4b64d2..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.util.Context; - -/** - * Resource collection API of BackupsUnderVolumes. - */ -public interface BackupsUnderVolumes { - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the 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. - */ - void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body); - - /** - * Create a new migrate request for backups under volume - * - * Migrate the backups under volume to backup vault. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @param body Migrate backups under volume payload supplied in the body of the operation. - * @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. - */ - void migrateBackups(String resourceGroupName, String accountName, String poolName, String volumeName, - BackupsMigrationRequest body, Context context); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java deleted file mode 100644 index 2c849f388eeb..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionMigrationRequest.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Encryption migration request. - */ -@Fluent -public final class EncryptionMigrationRequest { - /* - * virtualNetworkId - * - * Identifier for the virtual network - */ - @JsonProperty(value = "virtualNetworkId", required = true) - private String virtualNetworkId; - - /* - * privateEndpointId - * - * Identifier of the private endpoint to reach the Azure Key Vault - */ - @JsonProperty(value = "privateEndpointId", required = true) - private String privateEndpointId; - - /** - * Creates an instance of EncryptionMigrationRequest class. - */ - public EncryptionMigrationRequest() { - } - - /** - * Get the virtualNetworkId property: virtualNetworkId - * - * Identifier for the virtual network. - * - * @return the virtualNetworkId value. - */ - public String virtualNetworkId() { - return this.virtualNetworkId; - } - - /** - * Set the virtualNetworkId property: virtualNetworkId - * - * Identifier for the virtual network. - * - * @param virtualNetworkId the virtualNetworkId value to set. - * @return the EncryptionMigrationRequest object itself. - */ - public EncryptionMigrationRequest withVirtualNetworkId(String virtualNetworkId) { - this.virtualNetworkId = virtualNetworkId; - return this; - } - - /** - * Get the privateEndpointId property: privateEndpointId - * - * Identifier of the private endpoint to reach the Azure Key Vault. - * - * @return the privateEndpointId value. - */ - public String privateEndpointId() { - return this.privateEndpointId; - } - - /** - * Set the privateEndpointId property: privateEndpointId - * - * Identifier of the private endpoint to reach the Azure Key Vault. - * - * @param privateEndpointId the privateEndpointId value to set. - * @return the EncryptionMigrationRequest object itself. - */ - public EncryptionMigrationRequest withPrivateEndpointId(String privateEndpointId) { - this.privateEndpointId = privateEndpointId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualNetworkId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property virtualNetworkId in model EncryptionMigrationRequest")); - } - if (privateEndpointId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property privateEndpointId in model EncryptionMigrationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionMigrationRequest.class); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java index 3d8808ca314c..867609d0b592 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java @@ -100,21 +100,6 @@ public interface NetAppAccount { */ Boolean disableShowmount(); - /** - * Gets the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @return the nfsV4IdDomain value. - */ - String nfsV4IdDomain(); - - /** - * Gets the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. - * - * @return the isMultiAdEnabled value. - */ - Boolean isMultiAdEnabled(); - /** * Gets the region of the resource. * @@ -198,9 +183,8 @@ interface WithResourceGroup { * The stage of the NetAppAccount definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithActiveDirectories, - DefinitionStages.WithEncryption, DefinitionStages.WithNfsV4IdDomain { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithActiveDirectories, DefinitionStages.WithEncryption { /** * Executes the create request. * @@ -268,21 +252,6 @@ interface WithEncryption { */ WithCreate withEncryption(AccountEncryption encryption); } - - /** - * The stage of the NetAppAccount definition allowing to specify nfsV4IdDomain. - */ - interface WithNfsV4IdDomain { - /** - * Specifies the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all - * NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.. - * - * @param nfsV4IdDomain Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts - * in the subscription and region and only affect non ldap NFSv4 volumes. - * @return the next definition stage. - */ - WithCreate withNfsV4IdDomain(String nfsV4IdDomain); - } } /** @@ -296,7 +265,7 @@ interface WithNfsV4IdDomain { * The template for NetAppAccount update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithActiveDirectories, - UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain { + UpdateStages.WithEncryption { /** * Executes the update request. * @@ -368,21 +337,6 @@ interface WithEncryption { */ Update withEncryption(AccountEncryption encryption); } - - /** - * The stage of the NetAppAccount update allowing to specify nfsV4IdDomain. - */ - interface WithNfsV4IdDomain { - /** - * Specifies the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all - * NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.. - * - * @param nfsV4IdDomain Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts - * in the subscription and region and only affect non ldap NFSv4 volumes. - * @return the next definition stage. - */ - Update withNfsV4IdDomain(String nfsV4IdDomain); - } } /** @@ -423,29 +377,4 @@ interface WithNfsV4IdDomain { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void renewCredentials(Context context); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @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. - */ - void migrateEncryptionKey(); - - /** - * Migrate volumes encryption key source. - * - * Migrates all volumes in a VNet to a different encryption key source (Microsoft-managed key or Azure Key Vault). - * Operation fails if targeted volumes share encryption sibling set with volumes from another account. - * - * @param body The required parameters to perform encryption migration. - * @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. - */ - void migrateEncryptionKey(EncryptionMigrationRequest body, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java index b33a3abb2b2b..551c73c4e8f0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java @@ -146,40 +146,6 @@ public Boolean disableShowmount() { return this.innerProperties() == null ? null : this.innerProperties().disableShowmount(); } - /** - * Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @return the nfsV4IdDomain value. - */ - public String nfsV4IdDomain() { - return this.innerProperties() == null ? null : this.innerProperties().nfsV4IdDomain(); - } - - /** - * Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp - * accounts in the subscription and region and only affect non ldap NFSv4 volumes. - * - * @param nfsV4IdDomain the nfsV4IdDomain value to set. - * @return the NetAppAccountPatch object itself. - */ - public NetAppAccountPatch withNfsV4IdDomain(String nfsV4IdDomain) { - if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); - } - this.innerProperties().withNfsV4IdDomain(nfsV4IdDomain); - return this; - } - - /** - * Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled. - * - * @return the isMultiAdEnabled value. - */ - public Boolean isMultiAdEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isMultiAdEnabled(); - } - /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java deleted file mode 100644 index b80138280bc2..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of NetAppResourceRegionInfos. - */ -public interface NetAppResourceRegionInfos { - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String location); - - /** - * Describes region specific information. - * - * Provides region specific information. - * - * @param location The name of the Azure region. - * @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 list of regionInfo resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String location, Context context); - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 information regarding regionInfo Item along with {@link Response}. - */ - Response getWithResponse(String location, Context context); - - /** - * Describes region specific information. - * - * Provides storage to network proximity and logical zone mapping information. - * - * @param location The name of the Azure region. - * @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 regarding regionInfo Item. - */ - RegionInfoResource get(String location); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java deleted file mode 100644 index 2b38b85fc6c4..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import java.util.List; - -/** - * An immutable client-side representation of RegionInfoResource. - */ -public interface RegionInfoResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. - * - * @return the storageToNetworkProximity value. - */ - RegionStorageToNetworkProximity storageToNetworkProximity(); - - /** - * Gets the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. - * - * @return the availabilityZoneMappings value. - */ - List availabilityZoneMappings(); - - /** - * Gets the inner com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner object. - * - * @return the inner object. - */ - RegionInfoResourceInner innerModel(); -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java deleted file mode 100644 index 4532e186625b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** - * List of regionInfo resources. - */ -@Fluent -public final class RegionInfosList { - /* - * A list of regionInfo resources - */ - @JsonProperty(value = "value") - private List value; - - /* - * URL to get the next set of results. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Creates an instance of RegionInfosList class. - */ - public RegionInfosList() { - } - - /** - * Get the value property: A list of regionInfo resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of regionInfo resources. - * - * @param value the value value to set. - * @return the RegionInfosList object itself. - */ - public RegionInfosList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL to get the next set of results. - * - * @param nextLink the nextLink value to set. - * @return the RegionInfosList object itself. - */ - public RegionInfosList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java index f92727647284..830b2531dee9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java @@ -22,6 +22,16 @@ public final class RelationshipStatus extends ExpandableStringEnum mountTargets() { /** * Get the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. For creating clone volume, set type to ShortTermClone. + * set type to DataProtection. * * @return the volumeType value. */ @@ -465,7 +465,7 @@ public String volumeType() { /** * Set the volumeType property: What type of volume is this. For destination volumes in Cross Region Replication, - * set type to DataProtection. For creating clone volume, set type to ShortTermClone. + * set type to DataProtection. * * @param volumeType the volumeType value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -1276,17 +1276,6 @@ public String originatingResourceId() { return this.innerProperties() == null ? null : this.innerProperties().originatingResourceId(); } - /** - * Get the inheritedSizeInBytes property: inheritedSizeInBytes - * - * Space shared by short term clone volume with parent volume in bytes. - * - * @return the inheritedSizeInBytes value. - */ - public Long inheritedSizeInBytes() { - return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); - } - /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java index fde5158f3c88..4c88558e735d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java @@ -14,12 +14,6 @@ */ @Fluent public final class VolumePatchPropertiesDataProtection { - /* - * Backup Properties - */ - @JsonProperty(value = "backup") - private VolumeBackupProperties backup; - /* * Snapshot properties. */ @@ -32,26 +26,6 @@ public final class VolumePatchPropertiesDataProtection { public VolumePatchPropertiesDataProtection() { } - /** - * Get the backup property: Backup Properties. - * - * @return the backup value. - */ - public VolumeBackupProperties backup() { - return this.backup; - } - - /** - * Set the backup property: Backup Properties. - * - * @param backup the backup value to set. - * @return the VolumePatchPropertiesDataProtection object itself. - */ - public VolumePatchPropertiesDataProtection withBackup(VolumeBackupProperties backup) { - this.backup = backup; - return this; - } - /** * Get the snapshot property: Snapshot properties. * @@ -78,9 +52,6 @@ public VolumePatchPropertiesDataProtection withSnapshot(VolumeSnapshotProperties * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (backup() != null) { - backup().validate(); - } if (snapshot() != null) { snapshot().validate(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java index 5203d2249da7..81555a292610 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java @@ -14,12 +14,6 @@ */ @Fluent public final class VolumePropertiesDataProtection { - /* - * Backup Properties - */ - @JsonProperty(value = "backup") - private VolumeBackupProperties backup; - /* * Replication properties */ @@ -44,26 +38,6 @@ public final class VolumePropertiesDataProtection { public VolumePropertiesDataProtection() { } - /** - * Get the backup property: Backup Properties. - * - * @return the backup value. - */ - public VolumeBackupProperties backup() { - return this.backup; - } - - /** - * Set the backup property: Backup Properties. - * - * @param backup the backup value to set. - * @return the VolumePropertiesDataProtection object itself. - */ - public VolumePropertiesDataProtection withBackup(VolumeBackupProperties backup) { - this.backup = backup; - return this; - } - /** * Get the replication property: Replication properties. * @@ -130,9 +104,6 @@ public VolumePropertiesDataProtection withVolumeRelocation(VolumeRelocationPrope * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (backup() != null) { - backup().validate(); - } if (replication() != null) { replication().validate(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java index 9ee261040e1c..94599e770d46 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java @@ -211,38 +211,6 @@ void revert(String resourceGroupName, String accountName, String poolName, Strin void resetCifsPassword(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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. - */ - void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName); - - /** - * Split clone from parent volume - * - * Split operation to convert clone volume to an independent volume. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The name of the NetApp account. - * @param poolName The name of the capacity pool. - * @param volumeName The name of the volume. - * @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. - */ - void splitCloneFromParent(String resourceGroupName, String accountName, String poolName, String volumeName, - Context context); - /** * Break file locks * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java index 58a55bf7c72c..4329b7cbfb93 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java @@ -4,12 +4,10 @@ module com.azure.resourcemanager.netapp { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.netapp; exports com.azure.resourcemanager.netapp.fluent; exports com.azure.resourcemanager.netapp.fluent.models; exports com.azure.resourcemanager.netapp.models; - opens com.azure.resourcemanager.netapp.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.netapp.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json index da3590a492f2..98e17e49daaa 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService" ], [ "com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.AccountBackupsClientImpl$AccountBackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService" ], [ "com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService" ], [ "com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService" ], [ "com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService" ] ] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json index 853d44aed642..87eaa157228e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json @@ -73,16 +73,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RegionInfosList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner", "allDeclaredConstructors" : true, @@ -168,11 +158,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.CapacityPoolList", "allDeclaredConstructors" : true, @@ -233,21 +218,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeBackupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.ReplicationObject", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RemotePath", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties", "allDeclaredConstructors" : true, @@ -408,41 +383,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupsList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.BackupPoliciesList", "allDeclaredConstructors" : true, @@ -558,36 +503,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupVaultsList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupVaultPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupRestoreFiles", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupsMigrationRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.MetricAggregationType", "allDeclaredConstructors" : true, @@ -728,11 +643,6 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.netapp.models.Type", "allDeclaredConstructors" : true, diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java deleted file mode 100644 index a4fbe02221ec..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for AccountBackups Delete. - */ -public final class AccountBackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Backups_Account_Delete - * .json - */ - /** - * Sample code: AccountBackups_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().delete("resourceGroup", "accountName", "backupName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java deleted file mode 100644 index 15b90c226302..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for AccountBackups Get. - */ -public final class AccountBackupsGetSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Backups_Account_Get. - * json - */ - /** - * Sample code: AccountBackups_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().getWithResponse("myRG", "account1", "backup1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListByNetAppAccountSamples.java deleted file mode 100644 index 045e1c2a8471..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListByNetAppAccountSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for AccountBackups ListByNetAppAccount. - */ -public final class AccountBackupsListByNetAppAccountSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Backups_Account_List. - * json - */ - /** - * Sample code: AccountBackups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountBackupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accountBackups().listByNetAppAccount("myRG", "account1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java index 91bcf031ac22..28318649eed1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java @@ -12,8 +12,8 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Accounts_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -25,8 +25,8 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Accounts_CreateOrUpdateAD.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java index ea1d1b26d9ab..314009375bc1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java @@ -10,7 +10,7 @@ public final class AccountsDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_Delete.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java index 8c48bc1201c2..fc0ddefcd358 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class AccountsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_Get.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java index 2d2cb54c7561..32c14bc32e1a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class AccountsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java index d66a5cd843b9..0e90cb3b1570 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java @@ -10,7 +10,7 @@ public final class AccountsListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java deleted file mode 100644 index 45d252661a48..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsMigrateEncryptionKeySamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; - -/** - * Samples for Accounts MigrateEncryptionKey. - */ -public final class AccountsMigrateEncryptionKeySamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Accounts_MigrateEncryptionKey.json - */ - /** - * Sample code: Accounts_MigrateEncryptionKey. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void accountsMigrateEncryptionKey(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.accounts().migrateEncryptionKey("myRG", "account1", new EncryptionMigrationRequest() - .withVirtualNetworkId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/vnet1") - .withPrivateEndpointId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.Network/privateEndpoints/privip1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java index 79efa2e75d30..5bbc4d6b5de0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java @@ -9,8 +9,8 @@ */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Accounts_RenewCredentials.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java index 400b099f06fe..d3037295a9df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java @@ -14,7 +14,7 @@ public final class AccountsUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Accounts_Update.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java index e6ac5c088426..33918be3b79d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java @@ -10,8 +10,7 @@ public final class BackupPoliciesCreateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Create. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java index 4cef5420c527..a1a3cc2cbd0a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java @@ -10,8 +10,7 @@ public final class BackupPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Delete. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Delete.json */ /** * Sample code: Backups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java index b3a07fa1be28..b9500598b171 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java @@ -10,8 +10,7 @@ public final class BackupPoliciesGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Get. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java index 97dabf4282ac..80526eeaeac3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java @@ -10,8 +10,7 @@ public final class BackupPoliciesListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_List. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_List.json */ /** * Sample code: Backups_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java index 9bc3790dd161..ad1240f60d2f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java @@ -12,8 +12,7 @@ public final class BackupPoliciesUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupPolicies_Update. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java deleted file mode 100644 index 147afd1de7e8..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for BackupVaults CreateOrUpdate. - */ -public final class BackupVaultsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Create. - * json - */ - /** - * Sample code: BackupVault_CreateOrUpdate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().define("backupVault1").withRegion("eastus").withExistingNetAppAccount("myRG", "account1") - .create(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java deleted file mode 100644 index 7a116ac9d468..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for BackupVaults Delete. - */ -public final class BackupVaultsDeleteSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Delete. - * json - */ - /** - * Sample code: BackupVaults_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java deleted file mode 100644 index b4d1190d8bd7..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for BackupVaults Get. - */ -public final class BackupVaultsGetSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Get.json - */ - /** - * Sample code: BackupVaults_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java deleted file mode 100644 index 4cd6d2246b3f..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for BackupVaults ListByNetAppAccount. - */ -public final class BackupVaultsListByNetAppAccountSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_List.json - */ - /** - * Sample code: BackupVaults_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java deleted file mode 100644 index cb850971ce72..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for BackupVaults Update. - */ -public final class BackupVaultsUpdateSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/BackupVaults_Update. - * json - */ - /** - * Sample code: BackupVaults_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupVault resource = manager.backupVaults() - .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withTags(mapOf("Tag1", "Value1")).apply(); - } - - // Use "Map.of" if available - @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/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java deleted file mode 100644 index 2cde03e73752..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for Backups Create. - */ -public final class BackupsCreateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderBackupVault_Create.json - */ - /** - * Sample code: BackupsUnderBackupVault_Create. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().define("backup1").withExistingBackupVault("myRG", "account1", "backupVault1") - .withVolumeResourceId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") - .withLabel("myLabel").create(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java deleted file mode 100644 index d254bf8a1e6e..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for Backups Delete. - */ -public final class BackupsDeleteSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderBackupVault_Delete.json - */ - /** - * Sample code: BackupsUnderBackupVault_Delete. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().delete("resourceGroup", "account1", "backupVault1", "backup1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java deleted file mode 100644 index 7a4567042c13..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for Backups GetLatestStatus. - */ -public final class BackupsGetLatestStatusSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_LatestBackupStatus.json - */ - /** - * Sample code: Volumes_BackupStatus. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java deleted file mode 100644 index 3332175159c8..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for Backups Get. - */ -public final class BackupsGetSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderBackupVault_Get.json - */ - /** - * Sample code: BackupsUnderBackupVault_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().getWithResponse("myRG", "account1", "backupVault1", "backup1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java index ce7f7aac31b8..5fb2dc0dc12e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusSamples.java @@ -10,8 +10,7 @@ public final class BackupsGetVolumeRestoreStatusSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_RestoreStatus. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java deleted file mode 100644 index 3f1cf23aaea0..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for Backups ListByVault. - */ -public final class BackupsListByVaultSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderBackupVault_List.json - */ - /** - * Sample code: Backups_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java deleted file mode 100644 index c6eeda7592f0..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - -/** - * Samples for BackupsUnderAccount MigrateBackups. - */ -public final class BackupsUnderAccountMigrateBackupsSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderAccount_Migrate.json - */ - /** - * Sample code: BackupsUnderAccount_Migrate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderAccounts().migrateBackups("myRG", "account1", - new BackupsMigrationRequest().withBackupVaultId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java deleted file mode 100644 index 0aba83a038c4..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.util.Arrays; - -/** - * Samples for BackupsUnderBackupVault RestoreFiles. - */ -public final class BackupsUnderBackupVaultRestoreFilesSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderBackupVault_SingleFileRestore.json - */ - /** - * Sample code: Backups_SingleFileRestore. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderBackupVaults().restoreFiles("myRG", "account1", "backupVault1", "backup1", - new BackupRestoreFiles().withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) - .withDestinationVolumeId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java deleted file mode 100644 index c73e610df53a..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - -/** - * Samples for BackupsUnderVolume MigrateBackups. - */ -public final class BackupsUnderVolumeMigrateBackupsSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderVolume_Migrate.json - */ - /** - * Sample code: BackupsUnderVolume_Migrate. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderVolumes().migrateBackups("myRG", "account1", "pool1", "volume1", - new BackupsMigrationRequest().withBackupVaultId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java deleted file mode 100644 index 63101b9b1529..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.resourcemanager.netapp.models.Backup; - -/** - * Samples for Backups Update. - */ -public final class BackupsUpdateSamples { - /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * BackupsUnderBackupVault_Update.json - */ - /** - * Sample code: BackupsUnderBackupVault_Update. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Backup resource = manager.backups() - .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java index fcb1cf614561..35969ed3f9b1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java @@ -11,8 +11,8 @@ */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * CheckFilePathAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java index 3d0f73faf51e..a2f88093e4b5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java @@ -13,8 +13,7 @@ public final class NetAppResourceCheckNameAvailabilitySamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/CheckNameAvailability. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java index 3b27b75f6ff3..147594cf2499 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java @@ -13,8 +13,7 @@ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/CheckQuotaAvailability - * .json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java index 108eb1c5f2c4..9e51c370a3a1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java @@ -11,8 +11,8 @@ */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * NetworkSiblingSet_Query.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java index c2b20645fd69..5500bab67fbf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java @@ -10,7 +10,7 @@ public final class NetAppResourceQueryRegionInfoSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/RegionInfo.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/RegionInfo.json */ /** * Sample code: RegionInfo_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java index 9dd41d5a0a89..dca31426845d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java @@ -10,7 +10,7 @@ public final class NetAppResourceQuotaLimitsGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/QuotaLimits_Get.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java index 8d4787285e33..66d896611a26 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java @@ -10,7 +10,7 @@ public final class NetAppResourceQuotaLimitsListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/QuotaLimits_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java deleted file mode 100644 index 3c9c6cb38f6b..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for NetAppResourceRegionInfos Get. - */ -public final class NetAppResourceRegionInfosGetSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/RegionInfos_Get.json - */ - /** - * Sample code: RegionInfos_Get. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void regionInfosGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceRegionInfos().getWithResponse("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java deleted file mode 100644 index 02752093ad61..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for NetAppResourceRegionInfos List. - */ -public final class NetAppResourceRegionInfosListSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/RegionInfos_List.json - */ - /** - * Sample code: RegionInfos_List. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void regionInfosList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceRegionInfos().list("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java index 15bbc0430173..ed275fe11d65 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java @@ -12,8 +12,8 @@ */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * NetworkSiblingSet_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java index 463388bdd003..5bd1d4668479 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/OperationList.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java index 4869e1891f09..a524db14bee7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java @@ -13,8 +13,7 @@ public final class PoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_CreateOrUpdate. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java index 6d8db1ddcb61..0e594238ac41 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java @@ -10,7 +10,7 @@ public final class PoolsDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_Delete.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java index e56fddecb097..2c51519f16ea 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java @@ -10,7 +10,7 @@ public final class PoolsGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_Get.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Get.json */ /** * Sample code: Pools_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java index 2e961867fa83..8aa1eee3675f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java @@ -10,7 +10,7 @@ public final class PoolsListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_List.json */ /** * Sample code: Pools_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java index f5fe7c55c3fa..470901425c2c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java @@ -12,7 +12,7 @@ public final class PoolsUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Pools_Update.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Pools_Update.json */ /** * Sample code: Pools_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java index aae86f4a5b57..e5c66125722e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java @@ -14,8 +14,8 @@ */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * SnapshotPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java index da7d1a44128e..5f2a1d87cbd1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java @@ -9,8 +9,8 @@ */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * SnapshotPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java index f8cde64a98e8..72db9de82920 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java @@ -10,8 +10,7 @@ public final class SnapshotPoliciesGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_Get. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java index 5574a041540f..21b5ed43e2a4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java @@ -10,8 +10,7 @@ public final class SnapshotPoliciesListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/SnapshotPolicies_List. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java index a25c7e7ce5e5..a5bb38141df2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java @@ -9,8 +9,9 @@ */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * SnapshotPolicies_ListVolumes.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_ListVolumes. + * json */ /** * Sample code: SnapshotPolicies_ListVolumes. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java index f4a41efa5351..812ce45e685e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java @@ -15,8 +15,8 @@ */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * SnapshotPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java index 302ada3fab96..cc17606d91af 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsCreateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Create.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java index 3edb41904b6d..223702dfc220 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Delete.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java index 7585261ec6b5..e0675850165c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Get.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java index 63f601a28cbe..8fa136e6cbb7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java @@ -10,7 +10,7 @@ public final class SnapshotsListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java index 74acf6151e6c..c671af1d2dd9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java @@ -12,8 +12,9 @@ */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Snapshots_SingleFileRestore.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_SingleFileRestore. + * json */ /** * Sample code: Snapshots_SingleFileRestore. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java index 3280c9f33ff5..07b0fe485056 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java @@ -14,7 +14,7 @@ public final class SnapshotsUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Snapshots_Update.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java index 83a418a35241..cd4df6a721e7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java @@ -10,7 +10,7 @@ public final class SubvolumesCreateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Create.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java index bb11590e61ba..2898e37d8cd2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java @@ -10,7 +10,7 @@ public final class SubvolumesDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Delete.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java index d9d7525de289..a71abbde2928 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java @@ -10,8 +10,7 @@ public final class SubvolumesGetMetadataSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Metadata. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java index fa2857671577..cf955d1f9485 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java @@ -10,7 +10,7 @@ public final class SubvolumesGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Get.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java index ab90eec0a574..cdce6f7702e8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java @@ -10,7 +10,7 @@ public final class SubvolumesListByVolumeSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java index a465d0dbca6c..afbf8247f862 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java @@ -12,7 +12,7 @@ public final class SubvolumesUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Subvolumes_Update.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java index 0eff05d9bcf1..28accab19bf4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java @@ -17,8 +17,9 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeGroups_Create_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_SapHana. + * json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -120,8 +121,8 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeGroups_Create_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java index bc16bf0a5d2e..9759150243f7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java @@ -10,8 +10,7 @@ public final class VolumeGroupsDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeGroups_Delete. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java index 2748af4fbdaa..fc4c499282df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java @@ -9,8 +9,8 @@ */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeGroups_Get_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -22,8 +22,8 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeGroups_Get_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java index 1a6d674bd54e..38a07faf613e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java @@ -9,8 +9,8 @@ */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeGroups_List_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -22,8 +22,8 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeGroups_List_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java index 2da955527f37..c706c6c0ea11 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java @@ -11,8 +11,8 @@ */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeQuotaRules_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java index 5d39bd28d355..015739da7292 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java @@ -9,8 +9,8 @@ */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeQuotaRules_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java index 103c9a87eaae..032e47636a29 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java @@ -10,8 +10,7 @@ public final class VolumeQuotaRulesGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_Get. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java index ee73ab65c3bd..ebb99927e062 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java @@ -10,8 +10,7 @@ public final class VolumeQuotaRulesListByVolumeSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/VolumeQuotaRules_List. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java index 8f01c9d2011a..b74bcd3d0e09 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java @@ -11,8 +11,8 @@ */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * VolumeQuotaRules_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java index e3607400b3ea..359f224e4d5c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java @@ -11,8 +11,9 @@ */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_AuthorizeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_AuthorizeReplication. + * json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java index 8a9f8ddd26ac..52c7cdebd077 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java @@ -12,8 +12,7 @@ public final class VolumesBreakFileLocksSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_BreakFileLocks - * .json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java index ecbf12b4eebe..5444220d7e55 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java @@ -11,8 +11,8 @@ */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_BreakReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java index 48d98ddfd325..cf4551de252c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.netapp.generated; -import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.ServiceLevel; /** @@ -13,8 +12,7 @@ public final class VolumesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_CreateOrUpdate - * .json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -26,7 +24,6 @@ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetApp .withCreationToken("my-unique-file-path").withUsageThreshold(107374182400L) .withSubnetId( "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") - .withServiceLevel(ServiceLevel.PREMIUM).withThroughputMibps(128.0F) - .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_KEY_VAULT).create(); + .withServiceLevel(ServiceLevel.PREMIUM).create(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java index e32b1fbd4fb5..d9ef057ff7a2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_DeleteReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java index 7f33ff068326..2a2bf178654c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java @@ -10,7 +10,7 @@ public final class VolumesDeleteSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Delete.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java index 888a232f9fab..dc27858c7e32 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_FinalizeRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java index 95ed53a1fa93..d4a1c3b11904 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java @@ -10,7 +10,7 @@ public final class VolumesGetSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Get.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java index 1741052d7d82..0f738243fb30 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java @@ -12,8 +12,7 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/GroupIdListForLDAPUser - * .json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java index b284ae121329..24c115d0498e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_ListReplications.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java index c728eff657fb..41acf4cf9917 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java @@ -10,7 +10,7 @@ public final class VolumesListSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_List.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_List.json */ /** * Sample code: Volumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java index 906e20300495..3cb52baf8bca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java @@ -12,8 +12,7 @@ public final class VolumesPoolChangeSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_PoolChange. - * json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java index eccdee4ab423..359a692c9dc1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/ * Volumes_PopulateAvailabilityZones.json */ /** diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java index 08a4e783cd36..6055a1836278 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java @@ -9,8 +9,9 @@ */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_ReInitializeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReInitializeReplication + * .json */ /** * Sample code: Volumes_ReInitializeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java index 86f46da93b2f..bf0f9b94b0cd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java @@ -11,8 +11,9 @@ */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_ReestablishReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReestablishReplication. + * json */ /** * Sample code: Volumes_ReestablishReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java index 5ae1bd044b5b..c789c755272e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java @@ -12,7 +12,7 @@ public final class VolumesRelocateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Relocate.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java index e004f0c0e020..d1c4567ff94f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_ReplicationStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java index 381917ba5006..978e96cba49e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_ResetCifsPassword.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java index d5e0c21501c7..e02ae435b63a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_ResyncReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java index dc6f323f36d3..c8780fbe2f06 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java @@ -9,8 +9,8 @@ */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/ - * Volumes_RevertRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java index d6bc8849d30f..671610d9595d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java @@ -12,7 +12,7 @@ public final class VolumesRevertSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Revert.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java deleted file mode 100644 index 791dafea0bed..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesSplitCloneFromParentSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -/** - * Samples for Volumes SplitCloneFromParent. - */ -public final class VolumesSplitCloneFromParentSamples { - /* - * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_SplitClone. - * json - */ - /** - * Sample code: Volumes_SplitClone. - * - * @param manager Entry point to NetAppFilesManager. - */ - public static void volumesSplitClone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.volumes().splitCloneFromParent("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java index db80d91115ed..7184d5dd6a5b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.resourcemanager.netapp.models.Volume; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; /** * Samples for Volumes Update. @@ -14,7 +12,7 @@ public final class VolumesUpdateSamples { /* * x-ms-original-file: - * specification/netapp/resource-manager/Microsoft.NetApp/preview/2023-05-01-preview/examples/Volumes_Update.json + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-07-01/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. @@ -24,9 +22,6 @@ public final class VolumesUpdateSamples { public static void volumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { Volume resource = manager.volumes() .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE).getValue(); - resource.update().withDataProtection(new VolumePatchPropertiesDataProtection().withBackup( - new VolumeBackupProperties().withPolicyEnforced(false).withBackupEnabled(true).withBackupVaultId( - "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRP/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"))) - .apply(); + resource.update().apply(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetWithResponseMockTests.java deleted file mode 100644 index 6be08c90d67a..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountBackupsGetWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccountBackupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"backupId\":\"auxofshfph\",\"creationDate\":\"2021-08-16T03:23:29Z\",\"provisioningState\":\"lai\",\"size\":161630464243090095,\"label\":\"ywhslwkojpllndnp\",\"backupType\":\"Manual\",\"failureReason\":\"qafgfugsnnfhyet\",\"volumeResourceId\":\"fypococtfjgti\",\"useExistingSnapshot\":false,\"snapshotName\":\"zuyt\",\"backupPolicyResourceId\":\"mlmuowol\"},\"id\":\"uir\",\"name\":\"p\",\"type\":\"ons\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Backup response = manager.accountBackups() - .getWithResponse("w", "epdfgkmtdherng", "tcjuahokqto", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("ywhslwkojpllndnp", response.label()); - Assertions.assertEquals("fypococtfjgti", response.volumeResourceId()); - Assertions.assertEquals(false, response.useExistingSnapshot()); - Assertions.assertEquals("zuyt", response.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListByNetAppAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListByNetAppAccountMockTests.java deleted file mode 100644 index c797b2ba0636..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountBackupsListByNetAppAccountMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AccountBackupsListByNetAppAccountMockTests { - @Test - public void testListByNetAppAccount() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"backupId\":\"kholvd\",\"creationDate\":\"2021-01-29T05:35:31Z\",\"provisioningState\":\"auo\",\"size\":6379682554104052694,\"label\":\"rtvtiukye\",\"backupType\":\"Scheduled\",\"failureReason\":\"mnahmnxh\",\"volumeResourceId\":\"xjqirwrweoox\",\"useExistingSnapshot\":false,\"snapshotName\":\"hx\",\"backupPolicyResourceId\":\"snewmozqvbub\"},\"id\":\"amhsycxhxzgazt\",\"name\":\"abo\",\"type\":\"dvmfqhppub\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.accountBackups().listByNetAppAccount("qinjipnwjf", "jqlafcbahhpzp", - "foiyjwpfilk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rtvtiukye", response.iterator().next().label()); - Assertions.assertEquals("xjqirwrweoox", response.iterator().next().volumeResourceId()); - Assertions.assertEquals(false, response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("hx", response.iterator().next().snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java index 1922bbbcc36e..de8dd4ae667a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java @@ -45,7 +45,7 @@ public void testRenewCredentials() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.accounts().renewCredentials("pdnqqskawaoqvmmb", "pqfrtqlkz", com.azure.core.util.Context.NONE); + manager.accounts().renewCredentials("fgcviz", "zdwlvwlyoupfgfb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java index e825f68621ac..63d61f123c39 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java @@ -12,14 +12,14 @@ public final class AuthorizeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AuthorizeRequest model - = BinaryData.fromString("{\"remoteVolumeResourceId\":\"wiipfpub\"}").toObject(AuthorizeRequest.class); - Assertions.assertEquals("wiipfpub", model.remoteVolumeResourceId()); + = BinaryData.fromString("{\"remoteVolumeResourceId\":\"koievseo\"}").toObject(AuthorizeRequest.class); + Assertions.assertEquals("koievseo", model.remoteVolumeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("wiipfpub"); + AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("koievseo"); model = BinaryData.fromObject(model).toObject(AuthorizeRequest.class); - Assertions.assertEquals("wiipfpub", model.remoteVolumeResourceId()); + Assertions.assertEquals("koievseo", model.remoteVolumeResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupInnerTests.java deleted file mode 100644 index 21a9f54300f6..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import org.junit.jupiter.api.Assertions; - -public final class BackupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupInner model = BinaryData.fromString( - "{\"properties\":{\"backupId\":\"shfwpracstwity\",\"creationDate\":\"2021-10-09T17:15:47Z\",\"provisioningState\":\"xccedcpnmdyodn\",\"size\":4239411735034713219,\"label\":\"jc\",\"backupType\":\"Manual\",\"failureReason\":\"tiugcxnav\",\"volumeResourceId\":\"wxqibyq\",\"useExistingSnapshot\":false,\"snapshotName\":\"wxwlmdjrkvfgb\",\"backupPolicyResourceId\":\"vpdbodaciz\"},\"id\":\"q\",\"name\":\"hkr\",\"type\":\"ibdeibq\"}") - .toObject(BackupInner.class); - Assertions.assertEquals("jc", model.label()); - Assertions.assertEquals("wxqibyq", model.volumeResourceId()); - Assertions.assertEquals(false, model.useExistingSnapshot()); - Assertions.assertEquals("wxwlmdjrkvfgb", model.snapshotName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupInner model = new BackupInner().withLabel("jc").withVolumeResourceId("wxqibyq") - .withUseExistingSnapshot(false).withSnapshotName("wxwlmdjrkvfgb"); - model = BinaryData.fromObject(model).toObject(BackupInner.class); - Assertions.assertEquals("jc", model.label()); - Assertions.assertEquals("wxqibyq", model.volumeResourceId()); - Assertions.assertEquals(false, model.useExistingSnapshot()); - Assertions.assertEquals("wxwlmdjrkvfgb", model.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchPropertiesTests.java deleted file mode 100644 index bcbe92359477..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPatchProperties model - = BinaryData.fromString("{\"label\":\"fzeeyebizik\"}").toObject(BackupPatchProperties.class); - Assertions.assertEquals("fzeeyebizik", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPatchProperties model = new BackupPatchProperties().withLabel("fzeeyebizik"); - model = BinaryData.fromObject(model).toObject(BackupPatchProperties.class); - Assertions.assertEquals("fzeeyebizik", model.label()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchTests.java deleted file mode 100644 index fa057ee02895..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupPatch; -import org.junit.jupiter.api.Assertions; - -public final class BackupPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPatch model - = BinaryData.fromString("{\"properties\":{\"label\":\"lffhmouwqlg\"}}").toObject(BackupPatch.class); - Assertions.assertEquals("lffhmouwqlg", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPatch model = new BackupPatch().withLabel("lffhmouwqlg"); - model = BinaryData.fromObject(model).toObject(BackupPatch.class); - Assertions.assertEquals("lffhmouwqlg", model.label()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java index 03650dc318cc..f19ee8112b4c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java @@ -33,7 +33,7 @@ public void testCreate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"etag\":\"oywjxhpdulont\",\"properties\":{\"backupPolicyId\":\"np\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1537036510,\"weeklyBackupsToKeep\":529591375,\"monthlyBackupsToKeep\":595356327,\"volumesAssigned\":188519413,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"urfqkfuare\",\"backupsCount\":570950846,\"policyEnabled\":false}]},\"location\":\"klnvnafvvkyfede\",\"tags\":{\"xypokkhmi\":\"oslc\"},\"id\":\"q\",\"name\":\"ymc\",\"type\":\"ngnbdxxew\"}"; + = "{\"etag\":\"zinkfkbgbzbowxeq\",\"properties\":{\"backupPolicyId\":\"ljmygvkzqkjjeokb\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1829804009,\"weeklyBackupsToKeep\":1049990644,\"monthlyBackupsToKeep\":1442604370,\"volumesAssigned\":1208921361,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"wvz\",\"backupsCount\":765217570,\"policyEnabled\":true},{\"volumeName\":\"bzdixzmq\",\"backupsCount\":1928163279,\"policyEnabled\":false}]},\"location\":\"opqhewjptmc\",\"tags\":{\"mzlbiojlvfhrb\":\"ostzelndlatu\",\"qvcww\":\"pn\"},\"id\":\"yurmochpprprs\",\"name\":\"mo\",\"type\":\"ayzejnhlbkpbz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,16 +50,17 @@ public void testCreate() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - BackupPolicy response = manager.backupPolicies().define("oxhlw").withRegion("gwydyy") - .withExistingNetAppAccount("vitac", "xmfcsserxhtv") - .withTags(mapOf("bvqt", "vkh", "izjcpeog", "narfdlpukhpyrn")).withDailyBackupsToKeep(428404939) - .withWeeklyBackupsToKeep(1979503095).withMonthlyBackupsToKeep(1699550993).withEnabled(false).create(); + BackupPolicy response = manager.backupPolicies().define("asiibmiybnnust").withRegion("nzcyjtotp") + .withExistingNetAppAccount("ciqdsme", "iitdfuxt") + .withTags(mapOf("ihed", "vpbdbzqgq", "mkyi", "vqwt", "qcwdhoh", "cysihs", "sufco", "dtmcd")) + .withDailyBackupsToKeep(677853893).withWeeklyBackupsToKeep(915134983).withMonthlyBackupsToKeep(1400929714) + .withEnabled(true).create(); - Assertions.assertEquals("klnvnafvvkyfede", response.location()); - Assertions.assertEquals("oslc", response.tags().get("xypokkhmi")); - Assertions.assertEquals(1537036510, response.dailyBackupsToKeep()); - Assertions.assertEquals(529591375, response.weeklyBackupsToKeep()); - Assertions.assertEquals(595356327, response.monthlyBackupsToKeep()); + Assertions.assertEquals("opqhewjptmc", response.location()); + Assertions.assertEquals("ostzelndlatu", response.tags().get("mzlbiojlvfhrb")); + Assertions.assertEquals(1829804009, response.dailyBackupsToKeep()); + Assertions.assertEquals(1049990644, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1442604370, response.monthlyBackupsToKeep()); Assertions.assertEquals(false, response.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java index bc596ce7e354..d0555ac0264e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java @@ -45,7 +45,7 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.backupPolicies().delete("qqekewvnqvcdlgu", "ucmfdj", "nlaxpunjqikcz", com.azure.core.util.Context.NONE); + manager.backupPolicies().delete("gv", "irpghriypoqeyh", "qhykprlpyzn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java index 069cf3e0fd83..3a4a09154523 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"etag\":\"jbsahrtdtpde\",\"properties\":{\"backupPolicyId\":\"ac\",\"provisioningState\":\"m\",\"dailyBackupsToKeep\":818366731,\"weeklyBackupsToKeep\":1927909421,\"monthlyBackupsToKeep\":958421959,\"volumesAssigned\":49810118,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"gdirazf\",\"backupsCount\":1368173114,\"policyEnabled\":false}]},\"location\":\"bmdujtmvcopexc\",\"tags\":{\"ltqs\":\"rbuhhlky\",\"kffdjktsys\":\"ogtu\",\"jtkbusqogsfika\":\"dfvclglxnfu\",\"arujt\":\"ians\"},\"id\":\"iqxf\",\"name\":\"yjqtt\",\"type\":\"wkpqhjpenuygbq\"}"; + = "{\"etag\":\"pctf\",\"properties\":{\"backupPolicyId\":\"dxotng\",\"provisioningState\":\"gugey\",\"dailyBackupsToKeep\":1242659668,\"weeklyBackupsToKeep\":1204887332,\"monthlyBackupsToKeep\":692345701,\"volumesAssigned\":249369524,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"mfp\",\"backupsCount\":1515954350,\"policyEnabled\":false},{\"volumeName\":\"vyhyhsgzfc\",\"backupsCount\":396816762,\"policyEnabled\":false},{\"volumeName\":\"gbeglqgleo\",\"backupsCount\":1725930797,\"policyEnabled\":true},{\"volumeName\":\"luan\",\"backupsCount\":416708927,\"policyEnabled\":true}]},\"location\":\"eebtijvacvb\",\"tags\":{\"nw\":\"bqqxlaj\"},\"id\":\"acevehjkuyx\",\"name\":\"afgaoqlt\",\"type\":\"aeylinm\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,13 +49,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); BackupPolicy response = manager.backupPolicies() - .getWithResponse("amlbnseqacjjvpil", "uooqjagmdit", "ueio", com.azure.core.util.Context.NONE).getValue(); + .getWithResponse("dfqwmkyoq", "fdvruz", "lzo", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("bmdujtmvcopexc", response.location()); - Assertions.assertEquals("rbuhhlky", response.tags().get("ltqs")); - Assertions.assertEquals(818366731, response.dailyBackupsToKeep()); - Assertions.assertEquals(1927909421, response.weeklyBackupsToKeep()); - Assertions.assertEquals(958421959, response.monthlyBackupsToKeep()); + Assertions.assertEquals("eebtijvacvb", response.location()); + Assertions.assertEquals("bqqxlaj", response.tags().get("nw")); + Assertions.assertEquals(1242659668, response.dailyBackupsToKeep()); + Assertions.assertEquals(1204887332, response.weeklyBackupsToKeep()); + Assertions.assertEquals(692345701, response.monthlyBackupsToKeep()); Assertions.assertEquals(false, response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java index a61b582f11bb..b3661822075c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"etag\":\"ccxlzhcoxovnek\",\"properties\":{\"backupPolicyId\":\"nlusfnrd\",\"provisioningState\":\"xtxrdcqtjvidt\",\"dailyBackupsToKeep\":695049640,\"weeklyBackupsToKeep\":1779546866,\"monthlyBackupsToKeep\":818370137,\"volumesAssigned\":2099497391,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"wkasiziesf\",\"backupsCount\":1027973509,\"policyEnabled\":true},{\"volumeName\":\"qfecjxeygtuhx\",\"backupsCount\":1670662701,\"policyEnabled\":true},{\"volumeName\":\"wmrswnjlxuzrh\",\"backupsCount\":519622226,\"policyEnabled\":true},{\"volumeName\":\"baqehgpdoh\",\"backupsCount\":1232652299,\"policyEnabled\":false}]},\"location\":\"coi\",\"tags\":{\"bnwgfmxj\":\"xncnwfe\",\"y\":\"cgbjbgdlfgt\",\"ctqhamzjrwdk\":\"naquflq\"},\"id\":\"zeqyjleziun\",\"name\":\"xdfzantkw\",\"type\":\"eg\"}]}"; + = "{\"value\":[{\"etag\":\"q\",\"properties\":{\"backupPolicyId\":\"kcxk\",\"provisioningState\":\"bn\",\"dailyBackupsToKeep\":866421840,\"weeklyBackupsToKeep\":490406344,\"monthlyBackupsToKeep\":928926099,\"volumesAssigned\":1250131057,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"wijpsttexoqqpwc\",\"backupsCount\":2114285001,\"policyEnabled\":true}]},\"location\":\"runcuwmqspkcd\",\"tags\":{\"qbnj\":\"lctddunqndyfpch\",\"qqoli\":\"rcgegydcwboxjum\",\"aiouaubrjt\":\"r\"},\"id\":\"oq\",\"name\":\"fuojrngif\",\"type\":\"rzpasccbiuimzdly\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,13 +50,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.backupPolicies().list("onwpnga", "innixjawrtmjfj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("coi", response.iterator().next().location()); - Assertions.assertEquals("xncnwfe", response.iterator().next().tags().get("bnwgfmxj")); - Assertions.assertEquals(695049640, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(1779546866, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(818370137, response.iterator().next().monthlyBackupsToKeep()); - Assertions.assertEquals(false, response.iterator().next().enabled()); + = manager.backupPolicies().list("gdakchz", "vl", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("runcuwmqspkcd", response.iterator().next().location()); + Assertions.assertEquals("lctddunqndyfpch", response.iterator().next().tags().get("qbnj")); + Assertions.assertEquals(866421840, response.iterator().next().dailyBackupsToKeep()); + Assertions.assertEquals(490406344, response.iterator().next().weeklyBackupsToKeep()); + Assertions.assertEquals(928926099, response.iterator().next().monthlyBackupsToKeep()); + Assertions.assertEquals(true, response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java index 9843db0fd673..5dd36df41359 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java @@ -16,39 +16,30 @@ public final class BackupPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"qlbjbsybbqwrvt\",\"properties\":{\"backupPolicyId\":\"gmfpgvmp\",\"provisioningState\":\"as\",\"dailyBackupsToKeep\":753407395,\"weeklyBackupsToKeep\":522033644,\"monthlyBackupsToKeep\":178976731,\"volumesAssigned\":1464941672,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"bdsrez\",\"backupsCount\":187520251,\"policyEnabled\":false},{\"volumeName\":\"uyowqkdwy\",\"backupsCount\":174588693,\"policyEnabled\":false},{\"volumeName\":\"rcgp\",\"backupsCount\":1400964444,\"policyEnabled\":false},{\"volumeName\":\"ejzanlfz\",\"backupsCount\":386879497,\"policyEnabled\":false}]},\"location\":\"bzonok\",\"tags\":{\"irgzp\":\"jq\"},\"id\":\"rlazszrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"},{\"etag\":\"flsjc\",\"properties\":{\"backupPolicyId\":\"szfjvfbgofelja\",\"provisioningState\":\"qmqhldvriii\",\"dailyBackupsToKeep\":1756672367,\"weeklyBackupsToKeep\":401482588,\"monthlyBackupsToKeep\":1672429293,\"volumesAssigned\":42140994,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"xsowu\",\"backupsCount\":750613603,\"policyEnabled\":true},{\"volumeName\":\"ahhxvrh\",\"backupsCount\":2135501499,\"policyEnabled\":true}]},\"location\":\"g\",\"tags\":{\"xujxuknd\":\"pughftqsxh\",\"ihwhbotzingamvpp\":\"digrjguufzdmsyqt\",\"zqzudph\":\"o\"},\"id\":\"amvdkfwynwcvtbv\",\"name\":\"ayhmtnvyqiatkz\",\"type\":\"pcnp\"},{\"etag\":\"cjaesgvvs\",\"properties\":{\"backupPolicyId\":\"yajguqfhwygzlv\",\"provisioningState\":\"kfxu\",\"dailyBackupsToKeep\":2087511541,\"weeklyBackupsToKeep\":1547666647,\"monthlyBackupsToKeep\":252265287,\"volumesAssigned\":372421736,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"qdpsqxqvpsvu\",\"backupsCount\":1326232205,\"policyEnabled\":false},{\"volumeName\":\"elvezrypq\",\"backupsCount\":643673289,\"policyEnabled\":true}]},\"location\":\"erqwkyhkobopg\",\"tags\":{\"wep\":\"k\"},\"id\":\"qpcrf\",\"name\":\"bwccsnjvcdwxlpqe\",\"type\":\"ftnkhtj\"},{\"etag\":\"i\",\"properties\":{\"backupPolicyId\":\"wfqatmtd\",\"provisioningState\":\"mdvy\",\"dailyBackupsToKeep\":932898449,\"weeklyBackupsToKeep\":1851759881,\"monthlyBackupsToKeep\":624157964,\"volumesAssigned\":2142197435,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"ryuzh\",\"backupsCount\":524454595,\"policyEnabled\":true},{\"volumeName\":\"rvqqaatj\",\"backupsCount\":379667314,\"policyEnabled\":true},{\"volumeName\":\"upmfiibfg\",\"backupsCount\":2107533163,\"policyEnabled\":false}]},\"location\":\"vrwxkv\",\"tags\":{\"vjayvblmhvkzu\":\"gllqwjy\"},\"id\":\"bxvvyhg\",\"name\":\"opbyrqufegxu\",\"type\":\"wz\"}]}") + "{\"value\":[{\"etag\":\"ofncckwyfzqwhxxb\",\"properties\":{\"backupPolicyId\":\"qa\",\"provisioningState\":\"feqztppriol\",\"dailyBackupsToKeep\":621148688,\"weeklyBackupsToKeep\":1270431726,\"monthlyBackupsToKeep\":929982715,\"volumesAssigned\":1321856720,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"obqwcsdbnwdcfh\",\"backupsCount\":1589501712,\"policyEnabled\":true},{\"volumeName\":\"uvglsbjjcanvx\",\"backupsCount\":235845887,\"policyEnabled\":false},{\"volumeName\":\"utncorm\",\"backupsCount\":1945766703,\"policyEnabled\":false}]},\"location\":\"cofudflvkgjub\",\"tags\":{\"nqntorudsgsahm\":\"nnqvsa\",\"rauwjuetaebu\":\"yc\",\"dmovsm\":\"u\"},\"id\":\"l\",\"name\":\"wabm\",\"type\":\"oefki\"}]}") .toObject(BackupPoliciesList.class); - Assertions.assertEquals("bzonok", model.value().get(0).location()); - Assertions.assertEquals("jq", model.value().get(0).tags().get("irgzp")); - Assertions.assertEquals(753407395, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(522033644, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(178976731, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.value().get(0).enabled()); + Assertions.assertEquals("cofudflvkgjub", model.value().get(0).location()); + Assertions.assertEquals("nnqvsa", model.value().get(0).tags().get("nqntorudsgsahm")); + Assertions.assertEquals(621148688, model.value().get(0).dailyBackupsToKeep()); + Assertions.assertEquals(1270431726, model.value().get(0).weeklyBackupsToKeep()); + Assertions.assertEquals(929982715, model.value().get(0).monthlyBackupsToKeep()); + Assertions.assertEquals(false, model.value().get(0).enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPoliciesList model = new BackupPoliciesList().withValue(Arrays.asList( - new BackupPolicyInner().withLocation("bzonok").withTags(mapOf("irgzp", "jq")) - .withDailyBackupsToKeep(753407395).withWeeklyBackupsToKeep(522033644) - .withMonthlyBackupsToKeep(178976731).withEnabled(true), - new BackupPolicyInner().withLocation("g") - .withTags(mapOf("xujxuknd", "pughftqsxh", "ihwhbotzingamvpp", "digrjguufzdmsyqt", "zqzudph", "o")) - .withDailyBackupsToKeep(1756672367).withWeeklyBackupsToKeep(401482588) - .withMonthlyBackupsToKeep(1672429293).withEnabled(true), - new BackupPolicyInner().withLocation("erqwkyhkobopg").withTags(mapOf("wep", "k")) - .withDailyBackupsToKeep(2087511541).withWeeklyBackupsToKeep(1547666647) - .withMonthlyBackupsToKeep(252265287).withEnabled(true), - new BackupPolicyInner().withLocation("vrwxkv").withTags(mapOf("vjayvblmhvkzu", "gllqwjy")) - .withDailyBackupsToKeep(932898449).withWeeklyBackupsToKeep(1851759881) - .withMonthlyBackupsToKeep(624157964).withEnabled(false))); + BackupPoliciesList model + = new BackupPoliciesList().withValue(Arrays.asList(new BackupPolicyInner().withLocation("cofudflvkgjub") + .withTags(mapOf("nqntorudsgsahm", "nnqvsa", "rauwjuetaebu", "yc", "dmovsm", "u")) + .withDailyBackupsToKeep(621148688).withWeeklyBackupsToKeep(1270431726) + .withMonthlyBackupsToKeep(929982715).withEnabled(false))); model = BinaryData.fromObject(model).toObject(BackupPoliciesList.class); - Assertions.assertEquals("bzonok", model.value().get(0).location()); - Assertions.assertEquals("jq", model.value().get(0).tags().get("irgzp")); - Assertions.assertEquals(753407395, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(522033644, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(178976731, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.value().get(0).enabled()); + Assertions.assertEquals("cofudflvkgjub", model.value().get(0).location()); + Assertions.assertEquals("nnqvsa", model.value().get(0).tags().get("nqntorudsgsahm")); + Assertions.assertEquals(621148688, model.value().get(0).dailyBackupsToKeep()); + Assertions.assertEquals(1270431726, model.value().get(0).weeklyBackupsToKeep()); + Assertions.assertEquals(929982715, model.value().get(0).monthlyBackupsToKeep()); + Assertions.assertEquals(false, model.value().get(0).enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java index 57c7b02854b5..aa76ba8710b2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java @@ -14,28 +14,27 @@ public final class BackupPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyInner model = BinaryData.fromString( - "{\"etag\":\"nhlmctlpdng\",\"properties\":{\"backupPolicyId\":\"vgbmhr\",\"provisioningState\":\"kw\",\"dailyBackupsToKeep\":881216516,\"weeklyBackupsToKeep\":1630324691,\"monthlyBackupsToKeep\":568576807,\"volumesAssigned\":1374422252,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"aixexccbdreaxh\",\"backupsCount\":1486564388,\"policyEnabled\":false}]},\"location\":\"vqahqkghtpwi\",\"tags\":{\"z\":\"yjsvfyc\",\"rvmtgjq\":\"fvoow\",\"nsxkmcwaekrrjr\":\"pyostronzmyhgfi\"},\"id\":\"afxtsgum\",\"name\":\"jglikkxwslolb\",\"type\":\"pvuzlmv\"}") + "{\"etag\":\"vtpuqujmqlgk\",\"properties\":{\"backupPolicyId\":\"tndoaongbjc\",\"provisioningState\":\"ujitcjedftww\",\"dailyBackupsToKeep\":1066178212,\"weeklyBackupsToKeep\":565058049,\"monthlyBackupsToKeep\":229411798,\"volumesAssigned\":242462331,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ouicybxarzgszu\",\"backupsCount\":37759464,\"policyEnabled\":true},{\"volumeName\":\"opidoamciodh\",\"backupsCount\":1741139859,\"policyEnabled\":true},{\"volumeName\":\"hnzbonl\",\"backupsCount\":1184830478,\"policyEnabled\":true},{\"volumeName\":\"okdwb\",\"backupsCount\":1161774579,\"policyEnabled\":false}]},\"location\":\"cmrvexzt\",\"tags\":{\"lmnguxaw\":\"qgsfraoyzkoow\"},\"id\":\"aldsy\",\"name\":\"uximerqfobw\",\"type\":\"znkbykutwpfhpagm\"}") .toObject(BackupPolicyInner.class); - Assertions.assertEquals("vqahqkghtpwi", model.location()); - Assertions.assertEquals("yjsvfyc", model.tags().get("z")); - Assertions.assertEquals(881216516, model.dailyBackupsToKeep()); - Assertions.assertEquals(1630324691, model.weeklyBackupsToKeep()); - Assertions.assertEquals(568576807, model.monthlyBackupsToKeep()); + Assertions.assertEquals("cmrvexzt", model.location()); + Assertions.assertEquals("qgsfraoyzkoow", model.tags().get("lmnguxaw")); + Assertions.assertEquals(1066178212, model.dailyBackupsToKeep()); + Assertions.assertEquals(565058049, model.weeklyBackupsToKeep()); + Assertions.assertEquals(229411798, model.monthlyBackupsToKeep()); Assertions.assertEquals(true, model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyInner model = new BackupPolicyInner().withLocation("vqahqkghtpwi") - .withTags(mapOf("z", "yjsvfyc", "rvmtgjq", "fvoow", "nsxkmcwaekrrjr", "pyostronzmyhgfi")) - .withDailyBackupsToKeep(881216516).withWeeklyBackupsToKeep(1630324691).withMonthlyBackupsToKeep(568576807) - .withEnabled(true); + BackupPolicyInner model = new BackupPolicyInner().withLocation("cmrvexzt") + .withTags(mapOf("lmnguxaw", "qgsfraoyzkoow")).withDailyBackupsToKeep(1066178212) + .withWeeklyBackupsToKeep(565058049).withMonthlyBackupsToKeep(229411798).withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyInner.class); - Assertions.assertEquals("vqahqkghtpwi", model.location()); - Assertions.assertEquals("yjsvfyc", model.tags().get("z")); - Assertions.assertEquals(881216516, model.dailyBackupsToKeep()); - Assertions.assertEquals(1630324691, model.weeklyBackupsToKeep()); - Assertions.assertEquals(568576807, model.monthlyBackupsToKeep()); + Assertions.assertEquals("cmrvexzt", model.location()); + Assertions.assertEquals("qgsfraoyzkoow", model.tags().get("lmnguxaw")); + Assertions.assertEquals(1066178212, model.dailyBackupsToKeep()); + Assertions.assertEquals(565058049, model.weeklyBackupsToKeep()); + Assertions.assertEquals(229411798, model.monthlyBackupsToKeep()); Assertions.assertEquals(true, model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java index a5198d2dcbbc..fc3dc8554443 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java @@ -14,29 +14,27 @@ public final class BackupPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyPatch model = BinaryData.fromString( - "{\"properties\":{\"backupPolicyId\":\"kqjjlwuenvrkp\",\"provisioningState\":\"uaibrebqaaysj\",\"dailyBackupsToKeep\":1330578772,\"weeklyBackupsToKeep\":1662544736,\"monthlyBackupsToKeep\":2018222858,\"volumesAssigned\":1782265251,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ffiakp\",\"backupsCount\":882438810,\"policyEnabled\":false}]},\"location\":\"tedltmmj\",\"tags\":{\"auyqncygupkv\":\"eozphv\",\"dscwxqupevzhf\":\"p\",\"pelmcuvhixbjxyf\":\"totxhojujb\",\"lrcoolsttpki\":\"n\"},\"id\":\"kkbnu\",\"name\":\"rywvtylbfpn\",\"type\":\"urdoi\"}") + "{\"properties\":{\"backupPolicyId\":\"bminrfdwoyuhhzi\",\"provisioningState\":\"efozbhdms\",\"dailyBackupsToKeep\":1531171615,\"weeklyBackupsToKeep\":1354395459,\"monthlyBackupsToKeep\":572432734,\"volumesAssigned\":1916559931,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"u\",\"backupsCount\":674060065,\"policyEnabled\":false}]},\"location\":\"cslfaoqzpiyylha\",\"tags\":{\"hka\":\"whccs\",\"ggwoluhczb\":\"vwitqscyw\",\"i\":\"emh\"},\"id\":\"sbrgz\",\"name\":\"wmsweypqwd\",\"type\":\"ggicccnxqhue\"}") .toObject(BackupPolicyPatch.class); - Assertions.assertEquals("tedltmmj", model.location()); - Assertions.assertEquals("eozphv", model.tags().get("auyqncygupkv")); - Assertions.assertEquals(1330578772, model.dailyBackupsToKeep()); - Assertions.assertEquals(1662544736, model.weeklyBackupsToKeep()); - Assertions.assertEquals(2018222858, model.monthlyBackupsToKeep()); + Assertions.assertEquals("cslfaoqzpiyylha", model.location()); + Assertions.assertEquals("whccs", model.tags().get("hka")); + Assertions.assertEquals(1531171615, model.dailyBackupsToKeep()); + Assertions.assertEquals(1354395459, model.weeklyBackupsToKeep()); + Assertions.assertEquals(572432734, model.monthlyBackupsToKeep()); Assertions.assertEquals(true, model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyPatch model = new BackupPolicyPatch().withLocation("tedltmmj") - .withTags(mapOf("auyqncygupkv", "eozphv", "dscwxqupevzhf", "p", "pelmcuvhixbjxyf", "totxhojujb", - "lrcoolsttpki", "n")) - .withDailyBackupsToKeep(1330578772).withWeeklyBackupsToKeep(1662544736).withMonthlyBackupsToKeep(2018222858) - .withEnabled(true); + BackupPolicyPatch model = new BackupPolicyPatch().withLocation("cslfaoqzpiyylha") + .withTags(mapOf("hka", "whccs", "ggwoluhczb", "vwitqscyw", "i", "emh")).withDailyBackupsToKeep(1531171615) + .withWeeklyBackupsToKeep(1354395459).withMonthlyBackupsToKeep(572432734).withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyPatch.class); - Assertions.assertEquals("tedltmmj", model.location()); - Assertions.assertEquals("eozphv", model.tags().get("auyqncygupkv")); - Assertions.assertEquals(1330578772, model.dailyBackupsToKeep()); - Assertions.assertEquals(1662544736, model.weeklyBackupsToKeep()); - Assertions.assertEquals(2018222858, model.monthlyBackupsToKeep()); + Assertions.assertEquals("cslfaoqzpiyylha", model.location()); + Assertions.assertEquals("whccs", model.tags().get("hka")); + Assertions.assertEquals(1531171615, model.dailyBackupsToKeep()); + Assertions.assertEquals(1354395459, model.weeklyBackupsToKeep()); + Assertions.assertEquals(572432734, model.monthlyBackupsToKeep()); Assertions.assertEquals(true, model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java index 23f996b654f1..38dfd124d9f2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java @@ -12,22 +12,22 @@ public final class BackupPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyProperties model = BinaryData.fromString( - "{\"backupPolicyId\":\"lfktgplcrpwjxe\",\"provisioningState\":\"oi\",\"dailyBackupsToKeep\":1406843727,\"weeklyBackupsToKeep\":76074858,\"monthlyBackupsToKeep\":509080980,\"volumesAssigned\":820542416,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"zejjoqk\",\"backupsCount\":424496113,\"policyEnabled\":false}]}") + "{\"backupPolicyId\":\"skdsnfdsdoakg\",\"provisioningState\":\"lmkk\",\"dailyBackupsToKeep\":1673981436,\"weeklyBackupsToKeep\":246193278,\"monthlyBackupsToKeep\":1837577186,\"volumesAssigned\":1686383029,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"twvogvbbe\",\"backupsCount\":1690092543,\"policyEnabled\":true},{\"volumeName\":\"qmoa\",\"backupsCount\":840228808,\"policyEnabled\":false},{\"volumeName\":\"zr\",\"backupsCount\":1964426059,\"policyEnabled\":true}]}") .toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1406843727, model.dailyBackupsToKeep()); - Assertions.assertEquals(76074858, model.weeklyBackupsToKeep()); - Assertions.assertEquals(509080980, model.monthlyBackupsToKeep()); + Assertions.assertEquals(1673981436, model.dailyBackupsToKeep()); + Assertions.assertEquals(246193278, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1837577186, model.monthlyBackupsToKeep()); Assertions.assertEquals(true, model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1406843727) - .withWeeklyBackupsToKeep(76074858).withMonthlyBackupsToKeep(509080980).withEnabled(true); + BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1673981436) + .withWeeklyBackupsToKeep(246193278).withMonthlyBackupsToKeep(1837577186).withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1406843727, model.dailyBackupsToKeep()); - Assertions.assertEquals(76074858, model.weeklyBackupsToKeep()); - Assertions.assertEquals(509080980, model.monthlyBackupsToKeep()); + Assertions.assertEquals(1673981436, model.dailyBackupsToKeep()); + Assertions.assertEquals(246193278, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1837577186, model.monthlyBackupsToKeep()); Assertions.assertEquals(true, model.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPropertiesTests.java deleted file mode 100644 index e1956de34ce0..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupProperties model = BinaryData.fromString( - "{\"backupId\":\"qkgh\",\"creationDate\":\"2021-11-17T03:58:19Z\",\"provisioningState\":\"zwmk\",\"size\":1102306209532433694,\"label\":\"pjorwkqnyhg\",\"backupType\":\"Manual\",\"failureReason\":\"jivfxzsjabib\",\"volumeResourceId\":\"ystawfsdjpvkvp\",\"useExistingSnapshot\":true,\"snapshotName\":\"kzbzkdvncjabudu\",\"backupPolicyResourceId\":\"kakmokzh\"}") - .toObject(BackupProperties.class); - Assertions.assertEquals("pjorwkqnyhg", model.label()); - Assertions.assertEquals("ystawfsdjpvkvp", model.volumeResourceId()); - Assertions.assertEquals(true, model.useExistingSnapshot()); - Assertions.assertEquals("kzbzkdvncjabudu", model.snapshotName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupProperties model = new BackupProperties().withLabel("pjorwkqnyhg").withVolumeResourceId("ystawfsdjpvkvp") - .withUseExistingSnapshot(true).withSnapshotName("kzbzkdvncjabudu"); - model = BinaryData.fromObject(model).toObject(BackupProperties.class); - Assertions.assertEquals("pjorwkqnyhg", model.label()); - Assertions.assertEquals("ystawfsdjpvkvp", model.volumeResourceId()); - Assertions.assertEquals(true, model.useExistingSnapshot()); - Assertions.assertEquals("kzbzkdvncjabudu", model.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java deleted file mode 100644 index 4503cba99a2c..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupRestoreFilesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupRestoreFiles model = BinaryData.fromString( - "{\"fileList\":[\"onbzoggculapzwy\",\"pgogtqxepny\",\"b\",\"uajlyj\"],\"restoreFilePath\":\"vofqzhvfc\",\"destinationVolumeId\":\"byfmowuxr\"}") - .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("onbzoggculapzwy", model.fileList().get(0)); - Assertions.assertEquals("vofqzhvfc", model.restoreFilePath()); - Assertions.assertEquals("byfmowuxr", model.destinationVolumeId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupRestoreFiles model - = new BackupRestoreFiles().withFileList(Arrays.asList("onbzoggculapzwy", "pgogtqxepny", "b", "uajlyj")) - .withRestoreFilePath("vofqzhvfc").withDestinationVolumeId("byfmowuxr"); - model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("onbzoggculapzwy", model.fileList().get(0)); - Assertions.assertEquals("vofqzhvfc", model.restoreFilePath()); - Assertions.assertEquals("byfmowuxr", model.destinationVolumeId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupStatusInnerTests.java deleted file mode 100644 index a6759cfd83ee..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupStatusInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; - -public final class BackupStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupStatusInner model = BinaryData.fromString( - "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Uninitialized\",\"unhealthyReason\":\"oefki\",\"errorMessage\":\"vtpuqujmqlgk\",\"lastTransferSize\":2595329865796026079,\"lastTransferType\":\"oaongbjc\",\"totalTransferBytes\":3888691267660480720,\"transferProgressBytes\":4564203424204648247}") - .toObject(BackupStatusInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupStatusInner model = new BackupStatusInner(); - model = BinaryData.fromObject(model).toObject(BackupStatusInner.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java deleted file mode 100644 index 7d8249c0573c..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"vvbalx\"},\"location\":\"lchpodbzevwrdn\",\"tags\":{\"stul\":\"kuvsjcswsm\"},\"id\":\"qypfcv\",\"name\":\"er\",\"type\":\"hp\"}") - .toObject(BackupVaultInner.class); - Assertions.assertEquals("lchpodbzevwrdn", model.location()); - Assertions.assertEquals("kuvsjcswsm", model.tags().get("stul")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultInner model - = new BackupVaultInner().withLocation("lchpodbzevwrdn").withTags(mapOf("stul", "kuvsjcswsm")); - model = BinaryData.fromObject(model).toObject(BackupVaultInner.class); - Assertions.assertEquals("lchpodbzevwrdn", model.location()); - Assertions.assertEquals("kuvsjcswsm", model.tags().get("stul")); - } - - // Use "Map.of" if available - @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/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java deleted file mode 100644 index 67ddfa66972d..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupVaultPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultPatch model = BinaryData.fromString( - "{\"tags\":{\"xgqddrih\":\"cxsspuunnoxyh\",\"ewda\":\"fhoqca\",\"xkzb\":\"mdjvlpj\",\"ncj\":\"msgeivsiykzk\"}}") - .toObject(BackupVaultPatch.class); - Assertions.assertEquals("cxsspuunnoxyh", model.tags().get("xgqddrih")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultPatch model = new BackupVaultPatch() - .withTags(mapOf("xgqddrih", "cxsspuunnoxyh", "ewda", "fhoqca", "xkzb", "mdjvlpj", "ncj", "msgeivsiykzk")); - model = BinaryData.fromObject(model).toObject(BackupVaultPatch.class); - Assertions.assertEquals("cxsspuunnoxyh", model.tags().get("xgqddrih")); - } - - // Use "Map.of" if available - @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/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java deleted file mode 100644 index a8937175a783..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties; - -public final class BackupVaultPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultProperties model - = BinaryData.fromString("{\"provisioningState\":\"mfpjbabw\"}").toObject(BackupVaultProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultProperties model = new BackupVaultProperties(); - model = BinaryData.fromObject(model).toObject(BackupVaultProperties.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java deleted file mode 100644 index acb1a97a247d..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"drwjjkhvyom\",\"tags\":{\"vxnqmhrpqpd\":\"u\",\"ssffxuifmc\":\"wmkoisq\"},\"id\":\"ypobkdqzr\",\"name\":\"zsylollgt\",\"type\":\"czzydmxzjij\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVault response = manager.backupVaults().define("ljvrcmyfqipgxhnp").withRegion("ey") - .withExistingNetAppAccount("iwzcxmjpbyeph", "gt").withTags(mapOf("jlrxwtoaukhfk", "lpaugmrm", - "oaedsxjwuivedwcg", "cisiz", "mguaml", "eewxeiqbpsmg", "lzgaufcshhvnew", "dlrgms")) - .create(); - - Assertions.assertEquals("drwjjkhvyom", response.location()); - Assertions.assertEquals("u", response.tags().get("vxnqmhrpqpd")); - } - - // Use "Map.of" if available - @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/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java deleted file mode 100644 index a17467881f9d..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"bjpmcubk\"},\"location\":\"foxx\",\"tags\":{\"havpmhbrbqgvg\":\"v\",\"efjokn\":\"vpbbt\"},\"id\":\"sqyzqedikdfr\",\"name\":\"biqmrjgei\",\"type\":\"fqlggw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVault response = manager.backupVaults() - .getWithResponse("ulwgniiprglvawuw", "d", "fypiv", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("foxx", response.location()); - Assertions.assertEquals("v", response.tags().get("havpmhbrbqgvg")); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java deleted file mode 100644 index a2406298ebd9..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsListByNetAppAccountMockTests { - @Test - public void testListByNetAppAccount() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"pemmucfxhik\"},\"location\":\"lrmymyincqlhri\",\"tags\":{\"cgxuugqkctotiowl\":\"lmiiiovg\"},\"id\":\"teqdptj\",\"name\":\"wdtgukranblw\",\"type\":\"hqlkccuzgygqwaho\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.backupVaults().listByNetAppAccount("ihywartspph", "ixkykxd", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lrmymyincqlhri", response.iterator().next().location()); - Assertions.assertEquals("lmiiiovg", response.iterator().next().tags().get("cgxuugqkctotiowl")); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java deleted file mode 100644 index 9383657f664a..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.azure.resourcemanager.netapp.models.BackupVaultsList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"bajlka\"},\"location\":\"wxyiopidkqq\",\"tags\":{\"dmligovibrxk\":\"vscx\",\"cbgoor\":\"mloazuru\",\"ybfhjxa\":\"te\",\"il\":\"vvjgslor\"},\"id\":\"yw\",\"name\":\"t\",\"type\":\"gkxnyedabg\"},{\"properties\":{\"provisioningState\":\"dtj\"},\"location\":\"wbcihxuuwh\",\"tags\":{\"akkud\":\"xccybvpa\",\"wjplma\":\"px\"},\"id\":\"stcyohpfkyrkdbd\",\"name\":\"iogsjkmnwq\",\"type\":\"nobaiyhddviacegf\"}],\"nextLink\":\"ntfpmvmemfnc\"}") - .toObject(BackupVaultsList.class); - Assertions.assertEquals("wxyiopidkqq", model.value().get(0).location()); - Assertions.assertEquals("vscx", model.value().get(0).tags().get("dmligovibrxk")); - Assertions.assertEquals("ntfpmvmemfnc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultsList model = new BackupVaultsList() - .withValue(Arrays.asList( - new BackupVaultInner().withLocation("wxyiopidkqq") - .withTags(mapOf("dmligovibrxk", "vscx", "cbgoor", "mloazuru", "ybfhjxa", "te", "il", "vvjgslor")), - new BackupVaultInner().withLocation("wbcihxuuwh").withTags(mapOf("akkud", "xccybvpa", "wjplma", "px")))) - .withNextLink("ntfpmvmemfnc"); - model = BinaryData.fromObject(model).toObject(BackupVaultsList.class); - Assertions.assertEquals("wxyiopidkqq", model.value().get(0).location()); - Assertions.assertEquals("vscx", model.value().get(0).tags().get("dmligovibrxk")); - Assertions.assertEquals("ntfpmvmemfnc", model.nextLink()); - } - - // Use "Map.of" if available - @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/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java deleted file mode 100644 index 71c6e1b820aa..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"backupId\":\"qwm\",\"creationDate\":\"2021-02-08T03:25:21Z\",\"provisioningState\":\"Succeeded\",\"size\":4559406956172132091,\"label\":\"xynpdkvgf\",\"backupType\":\"Manual\",\"failureReason\":\"yjibuzphdugne\",\"volumeResourceId\":\"knpgoxgjiuq\",\"useExistingSnapshot\":true,\"snapshotName\":\"ozipqwjedmurrxx\",\"backupPolicyResourceId\":\"wpktvqylkmqpzoyh\"},\"id\":\"bcg\",\"name\":\"gcl\",\"type\":\"xoe\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Backup response = manager.backups().define("fpgpicrmnzhrgm") - .withExistingBackupVault("vkhlggdhbemz", "kzsz", "wiwtglxxhl").withVolumeResourceId("wohqfzizvu") - .withLabel("iibakcl").withUseExistingSnapshot(false).withSnapshotName("jsvthnwpzteko").create(); - - Assertions.assertEquals("xynpdkvgf", response.label()); - Assertions.assertEquals("knpgoxgjiuq", response.volumeResourceId()); - Assertions.assertEquals(true, response.useExistingSnapshot()); - Assertions.assertEquals("ozipqwjedmurrxx", response.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java deleted file mode 100644 index 318c605c27ba..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupsGetLatestStatusWithResponseMockTests { - @Test - public void testGetLatestStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"jnnawtqa\",\"errorMessage\":\"xuckpggqoweyir\",\"lastTransferSize\":4448034441017849158,\"lastTransferType\":\"ngwflqqmpizruwn\",\"totalTransferBytes\":2484776416149492622,\"transferProgressBytes\":363622537990763049}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupStatus response = manager.backups() - .getLatestStatusWithResponse("nlb", "jkwrusnkq", "hsyrqunj", "hdenxaulk", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java index 17f7ef0caf2a..8e917581c6db 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeRestoreStatusWithResponseMockTests.java @@ -30,7 +30,7 @@ public void testGetVolumeRestoreStatusWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"glbyvi\",\"errorMessage\":\"ctbrxkjzwrgxffm\",\"totalTransferBytes\":7584093446155046981}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"rzpgep\",\"errorMessage\":\"yb\",\"totalTransferBytes\":6730843668651593065}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -47,8 +47,8 @@ public void testGetVolumeRestoreStatusWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - RestoreStatus response = manager.backups().getVolumeRestoreStatusWithResponse("fcngjsa", "sii", - "tmkzjvkviirhgfgr", "sdp", com.azure.core.util.Context.NONE).getValue(); + RestoreStatus response = manager.backups().getVolumeRestoreStatusWithResponse("slzkwrrwoycqu", "wyh", + "hnomdrkywuh", "svfuurutlwexxwl", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java deleted file mode 100644 index d0fc2d717391..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"backupId\":\"glqivbgkcv\",\"creationDate\":\"2021-10-11T22:54:01Z\",\"provisioningState\":\"vuqd\",\"size\":9122110446872658150,\"label\":\"iypfp\",\"backupType\":\"Scheduled\",\"failureReason\":\"zgp\",\"volumeResourceId\":\"tivhjknidibgqjx\",\"useExistingSnapshot\":false,\"snapshotName\":\"hgovfgp\",\"backupPolicyResourceId\":\"qmhhaowj\"},\"id\":\"zvuporqzdfuydz\",\"name\":\"kfvxcnq\",\"type\":\"xqpswok\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Backup response = manager.backups().getWithResponse("yjpmspbpssdfppyo", "tieyujtvczkcny", "rxmunjdxvgln", - "vxlx", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("iypfp", response.label()); - Assertions.assertEquals("tivhjknidibgqjx", response.volumeResourceId()); - Assertions.assertEquals(false, response.useExistingSnapshot()); - Assertions.assertEquals("hgovfgp", response.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java deleted file mode 100644 index 7f25251a15c9..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupsListByVaultMockTests { - @Test - public void testListByVault() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"backupId\":\"tuxuuyilflq\",\"creationDate\":\"2021-01-23T22:11:32Z\",\"provisioningState\":\"vrehmrnjhvsujzt\",\"size\":4221894519881278297,\"label\":\"jtwhauunf\",\"backupType\":\"Manual\",\"failureReason\":\"letlx\",\"volumeResourceId\":\"mr\",\"useExistingSnapshot\":false,\"snapshotName\":\"uifamowaziynknlq\",\"backupPolicyResourceId\":\"dvpiwh\"},\"id\":\"szdtmaajquh\",\"name\":\"xylrjvmtygjbmz\",\"type\":\"ospspshckf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.backups().listByVault("fbkgozxwopdby", "p", "zqaclna", - "xbiygnugjknfsmf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jtwhauunf", response.iterator().next().label()); - Assertions.assertEquals("mr", response.iterator().next().volumeResourceId()); - Assertions.assertEquals(false, response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("uifamowaziynknlq", response.iterator().next().snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListTests.java deleted file mode 100644 index 2d77cf622458..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.BackupsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupId\":\"rzgszufoxci\",\"creationDate\":\"2021-06-16T02:13:56Z\",\"provisioningState\":\"doamciodhkha\",\"size\":676590971547397849,\"label\":\"zbonlwnt\",\"backupType\":\"Scheduled\",\"failureReason\":\"kdwbwhkszz\",\"volumeResourceId\":\"mrv\",\"useExistingSnapshot\":true,\"snapshotName\":\"vbtqgsfraoyzk\",\"backupPolicyResourceId\":\"wtl\"},\"id\":\"guxawqaldsyuuxi\",\"name\":\"erqf\",\"type\":\"bw\"},{\"properties\":{\"backupId\":\"nkbykutwpfhp\",\"creationDate\":\"2021-04-26T06:25:06Z\",\"provisioningState\":\"r\",\"size\":6854590524371553523,\"label\":\"fdsd\",\"backupType\":\"Scheduled\",\"failureReason\":\"tdlmkkzevd\",\"volumeResourceId\":\"hewpusdsttwv\",\"useExistingSnapshot\":true,\"snapshotName\":\"bejdcn\",\"backupPolicyResourceId\":\"qmoa\"},\"id\":\"fgmjzrwrdgrt\",\"name\":\"aenuuz\",\"type\":\"opbminrfdw\"},{\"properties\":{\"backupId\":\"uhhziuiefozbhdm\",\"creationDate\":\"2021-02-14T10:35:20Z\",\"provisioningState\":\"zqhof\",\"size\":7787317883311090832,\"label\":\"qu\",\"backupType\":\"Scheduled\",\"failureReason\":\"icslfaoq\",\"volumeResourceId\":\"piyylhalnswhccsp\",\"useExistingSnapshot\":true,\"snapshotName\":\"vwitqscyw\",\"backupPolicyResourceId\":\"gwol\"},\"id\":\"czbwemhairsbr\",\"name\":\"z\",\"type\":\"wmsweypqwd\"},{\"properties\":{\"backupId\":\"gicccnxqhuex\",\"creationDate\":\"2021-01-10T11:07:16Z\",\"provisioningState\":\"lstvlzywe\",\"size\":7397633883241527739,\"label\":\"csdtclusiypbs\",\"backupType\":\"Manual\",\"failureReason\":\"gusl\",\"volumeResourceId\":\"eadcygqukyhejhz\",\"useExistingSnapshot\":true,\"snapshotName\":\"fpel\",\"backupPolicyResourceId\":\"p\"},\"id\":\"ksrpqv\",\"name\":\"jzraehtwdwrf\",\"type\":\"swibyr\"}],\"nextLink\":\"l\"}") - .toObject(BackupsList.class); - Assertions.assertEquals("zbonlwnt", model.value().get(0).label()); - Assertions.assertEquals("mrv", model.value().get(0).volumeResourceId()); - Assertions.assertEquals(true, model.value().get(0).useExistingSnapshot()); - Assertions.assertEquals("vbtqgsfraoyzk", model.value().get(0).snapshotName()); - Assertions.assertEquals("l", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupsList model = new BackupsList().withValue(Arrays.asList( - new BackupInner().withLabel("zbonlwnt").withVolumeResourceId("mrv").withUseExistingSnapshot(true) - .withSnapshotName("vbtqgsfraoyzk"), - new BackupInner().withLabel("fdsd").withVolumeResourceId("hewpusdsttwv").withUseExistingSnapshot(true) - .withSnapshotName("bejdcn"), - new BackupInner().withLabel("qu").withVolumeResourceId("piyylhalnswhccsp").withUseExistingSnapshot(true) - .withSnapshotName("vwitqscyw"), - new BackupInner().withLabel("csdtclusiypbs").withVolumeResourceId("eadcygqukyhejhz") - .withUseExistingSnapshot(true).withSnapshotName("fpel"))) - .withNextLink("l"); - model = BinaryData.fromObject(model).toObject(BackupsList.class); - Assertions.assertEquals("zbonlwnt", model.value().get(0).label()); - Assertions.assertEquals("mrv", model.value().get(0).volumeResourceId()); - Assertions.assertEquals(true, model.value().get(0).useExistingSnapshot()); - Assertions.assertEquals("vbtqgsfraoyzk", model.value().get(0).snapshotName()); - Assertions.assertEquals("l", model.nextLink()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java deleted file mode 100644 index e2cb61869ea6..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; -import org.junit.jupiter.api.Assertions; - -public final class BackupsMigrationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupsMigrationRequest model - = BinaryData.fromString("{\"backupVaultId\":\"jpvd\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("jpvd", model.backupVaultId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("jpvd"); - model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("jpvd", model.backupVaultId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java index b6130fc8319f..e5df6fae0f89 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java @@ -12,18 +12,18 @@ public final class BreakFileLocksRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BreakFileLocksRequest model - = BinaryData.fromString("{\"clientIp\":\"pqiiobyuqe\",\"confirmRunningDisruptiveOperation\":true}") + = BinaryData.fromString("{\"clientIp\":\"adbzmnvdfznud\",\"confirmRunningDisruptiveOperation\":true}") .toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("pqiiobyuqe", model.clientIp()); + Assertions.assertEquals("adbzmnvdfznud", model.clientIp()); Assertions.assertEquals(true, model.confirmRunningDisruptiveOperation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BreakFileLocksRequest model - = new BreakFileLocksRequest().withClientIp("pqiiobyuqe").withConfirmRunningDisruptiveOperation(true); + = new BreakFileLocksRequest().withClientIp("adbzmnvdfznud").withConfirmRunningDisruptiveOperation(true); model = BinaryData.fromObject(model).toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("pqiiobyuqe", model.clientIp()); + Assertions.assertEquals("adbzmnvdfznud", model.clientIp()); Assertions.assertEquals(true, model.confirmRunningDisruptiveOperation()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java index 88e2633b9c16..4fe2803e7626 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java @@ -17,30 +17,30 @@ public final class CapacityPoolInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolInner model = BinaryData.fromString( - "{\"etag\":\"zcjrvxdjzlmwlx\",\"properties\":{\"poolId\":\"ug\",\"size\":6340547465391917507,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"awjvzunluthnnp\",\"totalThroughputMibps\":83.22846,\"utilizedThroughputMibps\":85.84867,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"aejxd\",\"tags\":{\"dzumveekg\":\"skzbb\",\"bsjyofdx\":\"wozuhkf\",\"oekqvk\":\"uusdttouwa\",\"vbxwyjsflhh\":\"lns\"},\"id\":\"aalnjixi\",\"name\":\"xyawj\",\"type\":\"yaqcslyjpkiidz\"}") + "{\"etag\":\"fqkquj\",\"properties\":{\"poolId\":\"suyonobglaocq\",\"size\":3198824190275494463,\"serviceLevel\":\"Premium\",\"provisioningState\":\"g\",\"totalThroughputMibps\":24.563444,\"utilizedThroughputMibps\":78.17242,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"location\":\"vwfudwpzntxhd\",\"tags\":{\"rxsbkyvp\":\"rqjbhckfrl\",\"uzbpzkafku\":\"ca\",\"rnwb\":\"b\"},\"id\":\"ehhseyvjusrts\",\"name\":\"hspkdeemao\",\"type\":\"mx\"}") .toObject(CapacityPoolInner.class); - Assertions.assertEquals("aejxd", model.location()); - Assertions.assertEquals("skzbb", model.tags().get("dzumveekg")); - Assertions.assertEquals(6340547465391917507L, model.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); + Assertions.assertEquals("vwfudwpzntxhd", model.location()); + Assertions.assertEquals("rqjbhckfrl", model.tags().get("rxsbkyvp")); + Assertions.assertEquals(3198824190275494463L, model.size()); + Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertEquals(true, model.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("aejxd") - .withTags(mapOf("dzumveekg", "skzbb", "bsjyofdx", "wozuhkf", "oekqvk", "uusdttouwa", "vbxwyjsflhh", "lns")) - .withSize(6340547465391917507L).withServiceLevel(ServiceLevel.ULTRA).withQosType(QosType.MANUAL) - .withCoolAccess(false).withEncryptionType(EncryptionType.SINGLE); + CapacityPoolInner model = new CapacityPoolInner().withLocation("vwfudwpzntxhd") + .withTags(mapOf("rxsbkyvp", "rqjbhckfrl", "uzbpzkafku", "ca", "rnwb", "b")).withSize(3198824190275494463L) + .withServiceLevel(ServiceLevel.PREMIUM).withQosType(QosType.AUTO).withCoolAccess(true) + .withEncryptionType(EncryptionType.SINGLE); model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("aejxd", model.location()); - Assertions.assertEquals("skzbb", model.tags().get("dzumveekg")); - Assertions.assertEquals(6340547465391917507L, model.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); + Assertions.assertEquals("vwfudwpzntxhd", model.location()); + Assertions.assertEquals("rqjbhckfrl", model.tags().get("rxsbkyvp")); + Assertions.assertEquals(3198824190275494463L, model.size()); + Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertEquals(true, model.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java index c56007cf8f47..133c670efc91 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java @@ -19,43 +19,43 @@ public final class CapacityPoolListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"uahaquhcdhmd\",\"properties\":{\"poolId\":\"laexqp\",\"size\":6851389169185127110,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ws\",\"totalThroughputMibps\":4.791844,\"utilizedThroughputMibps\":44.560753,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"lf\",\"tags\":{\"b\":\"gwb\",\"dawkzbali\":\"e\",\"hashsfwxosow\":\"urqhaka\"},\"id\":\"xcug\",\"name\":\"cjooxdjebwpucwwf\",\"type\":\"ovbvmeueciv\"},{\"etag\":\"zceuojgjrw\",\"properties\":{\"poolId\":\"eiotwmcdytdx\",\"size\":1652378653214086505,\"serviceLevel\":\"Standard\",\"provisioningState\":\"rjaw\",\"totalThroughputMibps\":30.658787,\"utilizedThroughputMibps\":90.02147,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"bkpyc\",\"tags\":{\"auwhvylwzbtdhx\":\"wndnhj\"},\"id\":\"jznb\",\"name\":\"pow\",\"type\":\"wpr\"},{\"etag\":\"lve\",\"properties\":{\"poolId\":\"lupj\",\"size\":4993789432354588709,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"obbc\",\"totalThroughputMibps\":4.627323,\"utilizedThroughputMibps\":29.920107,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"location\":\"pbewtghfgblcgwx\",\"tags\":{\"hjkbegibtnmxieb\":\"v\",\"zjuzgwyz\":\"waloayqcgwr\",\"pwxqp\":\"htxongmtsavjc\",\"yvxqtayriwwroy\":\"rknftguvriuhprwm\"},\"id\":\"bexrmcq\",\"name\":\"bycnojvkn\",\"type\":\"e\"}],\"nextLink\":\"sgzvahapjyzhpv\"}") + "{\"value\":[{\"etag\":\"eaxib\",\"properties\":{\"poolId\":\"jwbhqwalmuz\",\"size\":6168274838392071541,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"pdkzjancuxr\",\"totalThroughputMibps\":66.62854,\"utilizedThroughputMibps\":93.76715,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"jswztsdbpg\",\"tags\":{\"xbzpfzab\":\"txhp\",\"ovplw\":\"lcuhxwtctyqiklb\"},\"id\":\"bhvgy\",\"name\":\"gu\",\"type\":\"svmkfssxquk\"},{\"etag\":\"plgmgsxnk\",\"properties\":{\"poolId\":\"kde\",\"size\":7084872588122570574,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"opwi\",\"totalThroughputMibps\":41.176914,\"utilizedThroughputMibps\":20.48598,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"iuebbaumny\",\"tags\":{\"hsmtxpsiebtfhvp\":\"edeojnabc\"},\"id\":\"sapskr\",\"name\":\"qmhjjdhtld\",\"type\":\"kyzxuutk\"},{\"etag\":\"ws\",\"properties\":{\"poolId\":\"svlxotogtwrup\",\"size\":1377433518907384393,\"serviceLevel\":\"Standard\",\"provisioningState\":\"micykvceoveilo\",\"totalThroughputMibps\":15.381831,\"utilizedThroughputMibps\":64.81392,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"location\":\"k\",\"tags\":{\"kphywpnvjto\":\"dhbt\"},\"id\":\"nermcl\",\"name\":\"plpho\",\"type\":\"uscrpabgyepsb\"}],\"nextLink\":\"azqugxywpmueefj\"}") .toObject(CapacityPoolList.class); - Assertions.assertEquals("lf", model.value().get(0).location()); - Assertions.assertEquals("gwb", model.value().get(0).tags().get("b")); - Assertions.assertEquals(6851389169185127110L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.value().get(0).serviceLevel()); + Assertions.assertEquals("jswztsdbpg", model.value().get(0).location()); + Assertions.assertEquals("txhp", model.value().get(0).tags().get("xbzpfzab")); + Assertions.assertEquals(6168274838392071541L, model.value().get(0).size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); Assertions.assertEquals(false, model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("sgzvahapjyzhpv", model.nextLink()); + Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); + Assertions.assertEquals("azqugxywpmueefj", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolList model = new CapacityPoolList().withValue(Arrays.asList( - new CapacityPoolInner().withLocation("lf") - .withTags(mapOf("b", "gwb", "dawkzbali", "e", "hashsfwxosow", "urqhaka")).withSize(6851389169185127110L) - .withServiceLevel(ServiceLevel.STANDARD_ZRS).withQosType(QosType.AUTO).withCoolAccess(false) - .withEncryptionType(EncryptionType.DOUBLE), - new CapacityPoolInner().withLocation("bkpyc").withTags(mapOf("auwhvylwzbtdhx", "wndnhj")) - .withSize(1652378653214086505L).withServiceLevel(ServiceLevel.STANDARD).withQosType(QosType.AUTO) - .withCoolAccess(false).withEncryptionType(EncryptionType.SINGLE), - new CapacityPoolInner().withLocation("pbewtghfgblcgwx") - .withTags(mapOf("hjkbegibtnmxieb", "v", "zjuzgwyz", "waloayqcgwr", "pwxqp", "htxongmtsavjc", - "yvxqtayriwwroy", "rknftguvriuhprwm")) - .withSize(4993789432354588709L).withServiceLevel(ServiceLevel.ULTRA).withQosType(QosType.MANUAL) - .withCoolAccess(true).withEncryptionType(EncryptionType.DOUBLE))) - .withNextLink("sgzvahapjyzhpv"); + CapacityPoolList model + = new CapacityPoolList() + .withValue(Arrays.asList( + new CapacityPoolInner().withLocation("jswztsdbpg") + .withTags(mapOf("xbzpfzab", "txhp", "ovplw", "lcuhxwtctyqiklb")).withSize(6168274838392071541L) + .withServiceLevel(ServiceLevel.ULTRA).withQosType(QosType.AUTO).withCoolAccess(false) + .withEncryptionType(EncryptionType.SINGLE), + new CapacityPoolInner().withLocation("iuebbaumny").withTags(mapOf("hsmtxpsiebtfhvp", "edeojnabc")) + .withSize(7084872588122570574L).withServiceLevel(ServiceLevel.ULTRA).withQosType(QosType.MANUAL) + .withCoolAccess(false).withEncryptionType(EncryptionType.DOUBLE), + new CapacityPoolInner().withLocation("k").withTags(mapOf("kphywpnvjto", "dhbt")) + .withSize(1377433518907384393L).withServiceLevel(ServiceLevel.STANDARD) + .withQosType(QosType.AUTO).withCoolAccess(true).withEncryptionType(EncryptionType.DOUBLE))) + .withNextLink("azqugxywpmueefj"); model = BinaryData.fromObject(model).toObject(CapacityPoolList.class); - Assertions.assertEquals("lf", model.value().get(0).location()); - Assertions.assertEquals("gwb", model.value().get(0).tags().get("b")); - Assertions.assertEquals(6851389169185127110L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.value().get(0).serviceLevel()); + Assertions.assertEquals("jswztsdbpg", model.value().get(0).location()); + Assertions.assertEquals("txhp", model.value().get(0).tags().get("xbzpfzab")); + Assertions.assertEquals(6168274838392071541L, model.value().get(0).size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); Assertions.assertEquals(false, model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("sgzvahapjyzhpv", model.nextLink()); + Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); + Assertions.assertEquals("azqugxywpmueefj", model.nextLink()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java index 1c24f4dbc2d9..d9b991c5aaa0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java @@ -15,27 +15,25 @@ public final class CapacityPoolPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolPatch model = BinaryData.fromString( - "{\"properties\":{\"size\":7700111059874879228,\"qosType\":\"Auto\",\"coolAccess\":true},\"location\":\"pgylg\",\"tags\":{\"c\":\"txmedj\",\"gktrmgucnapkte\":\"lynqwwncwzzh\",\"pfqbuaceopzf\":\"ellwptfdy\",\"lzdahzxctobgbkdm\":\"rhhuaopppcqeqx\"},\"id\":\"izpost\",\"name\":\"grcfb\",\"type\":\"nrmfqjhhk\"}") + "{\"properties\":{\"size\":2542526403950408941,\"qosType\":\"Auto\",\"coolAccess\":false},\"location\":\"fadmws\",\"tags\":{\"gomz\":\"gvxp\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"}") .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("pgylg", model.location()); - Assertions.assertEquals("txmedj", model.tags().get("c")); - Assertions.assertEquals(7700111059874879228L, model.size()); + Assertions.assertEquals("fadmws", model.location()); + Assertions.assertEquals("gvxp", model.tags().get("gomz")); + Assertions.assertEquals(2542526403950408941L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); + Assertions.assertEquals(false, model.coolAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("pgylg") - .withTags(mapOf("c", "txmedj", "gktrmgucnapkte", "lynqwwncwzzh", "pfqbuaceopzf", "ellwptfdy", - "lzdahzxctobgbkdm", "rhhuaopppcqeqx")) - .withSize(7700111059874879228L).withQosType(QosType.AUTO).withCoolAccess(true); + CapacityPoolPatch model = new CapacityPoolPatch().withLocation("fadmws").withTags(mapOf("gomz", "gvxp")) + .withSize(2542526403950408941L).withQosType(QosType.AUTO).withCoolAccess(false); model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("pgylg", model.location()); - Assertions.assertEquals("txmedj", model.tags().get("c")); - Assertions.assertEquals(7700111059874879228L, model.size()); + Assertions.assertEquals("fadmws", model.location()); + Assertions.assertEquals("gvxp", model.tags().get("gomz")); + Assertions.assertEquals(2542526403950408941L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); + Assertions.assertEquals(false, model.coolAccess()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java index 0c9d7d2fb6fd..556b5da76c64 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java @@ -12,22 +12,22 @@ public final class DailyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DailySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":445064797,\"hour\":2101936696,\"minute\":1225956555,\"usedBytes\":8980911642598746949}") + "{\"snapshotsToKeep\":1081662268,\"hour\":535447173,\"minute\":88116741,\"usedBytes\":4291870996342138092}") .toObject(DailySchedule.class); - Assertions.assertEquals(445064797, model.snapshotsToKeep()); - Assertions.assertEquals(2101936696, model.hour()); - Assertions.assertEquals(1225956555, model.minute()); - Assertions.assertEquals(8980911642598746949L, model.usedBytes()); + Assertions.assertEquals(1081662268, model.snapshotsToKeep()); + Assertions.assertEquals(535447173, model.hour()); + Assertions.assertEquals(88116741, model.minute()); + Assertions.assertEquals(4291870996342138092L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withSnapshotsToKeep(445064797).withHour(2101936696) - .withMinute(1225956555).withUsedBytes(8980911642598746949L); + DailySchedule model = new DailySchedule().withSnapshotsToKeep(1081662268).withHour(535447173) + .withMinute(88116741).withUsedBytes(4291870996342138092L); model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(445064797, model.snapshotsToKeep()); - Assertions.assertEquals(2101936696, model.hour()); - Assertions.assertEquals(1225956555, model.minute()); - Assertions.assertEquals(8980911642598746949L, model.usedBytes()); + Assertions.assertEquals(1081662268, model.snapshotsToKeep()); + Assertions.assertEquals(535447173, model.hour()); + Assertions.assertEquals(88116741, model.minute()); + Assertions.assertEquals(4291870996342138092L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java index c1ece4bb7337..fff20576c954 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java @@ -11,15 +11,16 @@ public final class EncryptionIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EncryptionIdentity model = BinaryData.fromString("{\"principalId\":\"cq\",\"userAssignedIdentity\":\"ccm\"}") - .toObject(EncryptionIdentity.class); - Assertions.assertEquals("ccm", model.userAssignedIdentity()); + EncryptionIdentity model + = BinaryData.fromString("{\"principalId\":\"pnazzm\",\"userAssignedIdentity\":\"runmp\"}") + .toObject(EncryptionIdentity.class); + Assertions.assertEquals("runmp", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EncryptionIdentity model = new EncryptionIdentity().withUserAssignedIdentity("ccm"); + EncryptionIdentity model = new EncryptionIdentity().withUserAssignedIdentity("runmp"); model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("ccm", model.userAssignedIdentity()); + Assertions.assertEquals("runmp", model.userAssignedIdentity()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionMigrationRequestTests.java deleted file mode 100644 index 7068accb72e5..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionMigrationRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EncryptionMigrationRequest; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionMigrationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionMigrationRequest model - = BinaryData.fromString("{\"virtualNetworkId\":\"maofmxagkv\",\"privateEndpointId\":\"melmqkrha\"}") - .toObject(EncryptionMigrationRequest.class); - Assertions.assertEquals("maofmxagkv", model.virtualNetworkId()); - Assertions.assertEquals("melmqkrha", model.privateEndpointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionMigrationRequest model - = new EncryptionMigrationRequest().withVirtualNetworkId("maofmxagkv").withPrivateEndpointId("melmqkrha"); - model = BinaryData.fromObject(model).toObject(EncryptionMigrationRequest.class); - Assertions.assertEquals("maofmxagkv", model.virtualNetworkId()); - Assertions.assertEquals("melmqkrha", model.privateEndpointId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java index 7aeff0568425..1f0056b38dff 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java @@ -13,47 +13,47 @@ public final class ExportPolicyRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportPolicyRule model = BinaryData.fromString( - "{\"ruleIndex\":1651928304,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"ewgdrjervn\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"}") + "{\"ruleIndex\":1115460475,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"srknftguv\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}") .toObject(ExportPolicyRule.class); - Assertions.assertEquals(1651928304, model.ruleIndex()); - Assertions.assertEquals(true, model.unixReadOnly()); + Assertions.assertEquals(1115460475, model.ruleIndex()); + Assertions.assertEquals(false, model.unixReadOnly()); Assertions.assertEquals(true, model.unixReadWrite()); - Assertions.assertEquals(true, model.kerberos5ReadOnly()); - Assertions.assertEquals(true, model.kerberos5ReadWrite()); - Assertions.assertEquals(false, model.kerberos5IReadOnly()); + Assertions.assertEquals(false, model.kerberos5ReadOnly()); + Assertions.assertEquals(false, model.kerberos5ReadWrite()); + Assertions.assertEquals(true, model.kerberos5IReadOnly()); Assertions.assertEquals(false, model.kerberos5IReadWrite()); - Assertions.assertEquals(true, model.kerberos5PReadOnly()); + Assertions.assertEquals(false, model.kerberos5PReadOnly()); Assertions.assertEquals(true, model.kerberos5PReadWrite()); Assertions.assertEquals(false, model.cifs()); - Assertions.assertEquals(false, model.nfsv3()); - Assertions.assertEquals(false, model.nfsv41()); - Assertions.assertEquals("ewgdrjervn", model.allowedClients()); - Assertions.assertEquals(false, model.hasRootAccess()); + Assertions.assertEquals(true, model.nfsv3()); + Assertions.assertEquals(true, model.nfsv41()); + Assertions.assertEquals("srknftguv", model.allowedClients()); + Assertions.assertEquals(true, model.hasRootAccess()); Assertions.assertEquals(ChownMode.UNRESTRICTED, model.chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExportPolicyRule model = new ExportPolicyRule().withRuleIndex(1651928304).withUnixReadOnly(true) - .withUnixReadWrite(true).withKerberos5ReadOnly(true).withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(false).withKerberos5IReadWrite(false).withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(true).withCifs(false).withNfsv3(false).withNfsv41(false) - .withAllowedClients("ewgdrjervn").withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED); + ExportPolicyRule model = new ExportPolicyRule().withRuleIndex(1115460475).withUnixReadOnly(false) + .withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(true).withKerberos5IReadWrite(false).withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(true).withCifs(false).withNfsv3(true).withNfsv41(true) + .withAllowedClients("srknftguv").withHasRootAccess(true).withChownMode(ChownMode.UNRESTRICTED); model = BinaryData.fromObject(model).toObject(ExportPolicyRule.class); - Assertions.assertEquals(1651928304, model.ruleIndex()); - Assertions.assertEquals(true, model.unixReadOnly()); + Assertions.assertEquals(1115460475, model.ruleIndex()); + Assertions.assertEquals(false, model.unixReadOnly()); Assertions.assertEquals(true, model.unixReadWrite()); - Assertions.assertEquals(true, model.kerberos5ReadOnly()); - Assertions.assertEquals(true, model.kerberos5ReadWrite()); - Assertions.assertEquals(false, model.kerberos5IReadOnly()); + Assertions.assertEquals(false, model.kerberos5ReadOnly()); + Assertions.assertEquals(false, model.kerberos5ReadWrite()); + Assertions.assertEquals(true, model.kerberos5IReadOnly()); Assertions.assertEquals(false, model.kerberos5IReadWrite()); - Assertions.assertEquals(true, model.kerberos5PReadOnly()); + Assertions.assertEquals(false, model.kerberos5PReadOnly()); Assertions.assertEquals(true, model.kerberos5PReadWrite()); Assertions.assertEquals(false, model.cifs()); - Assertions.assertEquals(false, model.nfsv3()); - Assertions.assertEquals(false, model.nfsv41()); - Assertions.assertEquals("ewgdrjervn", model.allowedClients()); - Assertions.assertEquals(false, model.hasRootAccess()); + Assertions.assertEquals(true, model.nfsv3()); + Assertions.assertEquals(true, model.nfsv41()); + Assertions.assertEquals("srknftguv", model.allowedClients()); + Assertions.assertEquals(true, model.hasRootAccess()); Assertions.assertEquals(ChownMode.UNRESTRICTED, model.chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java index 4d772e3ef686..64b02f813787 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java @@ -12,14 +12,14 @@ public final class GetGroupIdListForLdapUserRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GetGroupIdListForLdapUserRequest model - = BinaryData.fromString("{\"username\":\"lp\"}").toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("lp", model.username()); + = BinaryData.fromString("{\"username\":\"vxzbncb\"}").toObject(GetGroupIdListForLdapUserRequest.class); + Assertions.assertEquals("vxzbncb", model.username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("lp"); + GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("vxzbncb"); model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("lp", model.username()); + Assertions.assertEquals("vxzbncb", model.username()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java index d0814ea85d7a..ce63612ed5e2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java @@ -12,17 +12,17 @@ public final class GetGroupIdListForLdapUserResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GetGroupIdListForLdapUserResponseInner model - = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"ciuqgbdb\",\"t\",\"uvfbtkuwh\",\"mhykojoxafnndl\"]}") - .toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("ciuqgbdb", model.groupIdsForLdapUser().get(0)); + GetGroupIdListForLdapUserResponseInner model = BinaryData + .fromString("{\"groupIdsForLdapUser\":[\"pstdbhhxsrzd\",\"ucerscdntnevfi\",\"jmygtdsslswtmwer\",\"ofz\"]}") + .toObject(GetGroupIdListForLdapUserResponseInner.class); + Assertions.assertEquals("pstdbhhxsrzd", model.groupIdsForLdapUser().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { GetGroupIdListForLdapUserResponseInner model = new GetGroupIdListForLdapUserResponseInner() - .withGroupIdsForLdapUser(Arrays.asList("ciuqgbdb", "t", "uvfbtkuwh", "mhykojoxafnndl")); + .withGroupIdsForLdapUser(Arrays.asList("pstdbhhxsrzd", "ucerscdntnevfi", "jmygtdsslswtmwer", "ofz")); model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("ciuqgbdb", model.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("pstdbhhxsrzd", model.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java index d67da8b17a36..fdf5a0ec879d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java @@ -12,20 +12,20 @@ public final class HourlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HourlySchedule model = BinaryData - .fromString("{\"snapshotsToKeep\":2084460640,\"minute\":124681073,\"usedBytes\":3697925526495592044}") + .fromString("{\"snapshotsToKeep\":381030924,\"minute\":1017473450,\"usedBytes\":6968746441071799209}") .toObject(HourlySchedule.class); - Assertions.assertEquals(2084460640, model.snapshotsToKeep()); - Assertions.assertEquals(124681073, model.minute()); - Assertions.assertEquals(3697925526495592044L, model.usedBytes()); + Assertions.assertEquals(381030924, model.snapshotsToKeep()); + Assertions.assertEquals(1017473450, model.minute()); + Assertions.assertEquals(6968746441071799209L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(2084460640).withMinute(124681073) - .withUsedBytes(3697925526495592044L); + HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(381030924).withMinute(1017473450) + .withUsedBytes(6968746441071799209L); model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(2084460640, model.snapshotsToKeep()); - Assertions.assertEquals(124681073, model.minute()); - Assertions.assertEquals(3697925526495592044L, model.usedBytes()); + Assertions.assertEquals(381030924, model.snapshotsToKeep()); + Assertions.assertEquals(1017473450, model.minute()); + Assertions.assertEquals(6968746441071799209L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java index 50a9c31e22ed..9606c84da021 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java @@ -12,20 +12,20 @@ public final class LdapSearchScopeOptTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LdapSearchScopeOpt model = BinaryData - .fromString("{\"userDN\":\"psbjta\",\"groupDN\":\"ugxywpmueef\",\"groupMembershipFilter\":\"wfqkquj\"}") + .fromString("{\"userDN\":\"rgvtqag\",\"groupDN\":\"uynhijg\",\"groupMembershipFilter\":\"ebf\"}") .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("psbjta", model.userDN()); - Assertions.assertEquals("ugxywpmueef", model.groupDN()); - Assertions.assertEquals("wfqkquj", model.groupMembershipFilter()); + Assertions.assertEquals("rgvtqag", model.userDN()); + Assertions.assertEquals("uynhijg", model.groupDN()); + Assertions.assertEquals("ebf", model.groupMembershipFilter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("psbjta").withGroupDN("ugxywpmueef") - .withGroupMembershipFilter("wfqkquj"); + LdapSearchScopeOpt model + = new LdapSearchScopeOpt().withUserDN("rgvtqag").withGroupDN("uynhijg").withGroupMembershipFilter("ebf"); model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("psbjta", model.userDN()); - Assertions.assertEquals("ugxywpmueef", model.groupDN()); - Assertions.assertEquals("wfqkquj", model.groupMembershipFilter()); + Assertions.assertEquals("rgvtqag", model.userDN()); + Assertions.assertEquals("uynhijg", model.groupDN()); + Assertions.assertEquals("ebf", model.groupMembershipFilter()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java index c78da96cdf7f..495b71c28aeb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java @@ -16,23 +16,29 @@ public final class ListReplicationsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListReplications model = BinaryData.fromString( - "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"sytgadgvraea\",\"remoteVolumeRegion\":\"e\"}]}") + "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"xogaokonzmnsikv\",\"remoteVolumeRegion\":\"qzeqqkdltfzxm\"},{\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"ur\",\"remoteVolumeRegion\":\"dkwobdagx\"},{\"endpointType\":\"src\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"xbxwa\",\"remoteVolumeRegion\":\"ogqxndlkzgxhuri\"}]}") .toObject(ListReplications.class); Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("sytgadgvraea", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("e", model.value().get(0).remoteVolumeRegion()); + Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.value().get(0).replicationSchedule()); + Assertions.assertEquals("xogaokonzmnsikv", model.value().get(0).remoteVolumeResourceId()); + Assertions.assertEquals("qzeqqkdltfzxm", model.value().get(0).remoteVolumeRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ListReplications model = new ListReplications().withValue(Arrays.asList(new ReplicationInner() - .withEndpointType(EndpointType.SRC).withReplicationSchedule(ReplicationSchedule.HOURLY) - .withRemoteVolumeResourceId("sytgadgvraea").withRemoteVolumeRegion("e"))); + ListReplications model = new ListReplications().withValue(Arrays.asList( + new ReplicationInner().withEndpointType(EndpointType.SRC) + .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY) + .withRemoteVolumeResourceId("xogaokonzmnsikv").withRemoteVolumeRegion("qzeqqkdltfzxm"), + new ReplicationInner().withEndpointType(EndpointType.SRC).withReplicationSchedule(ReplicationSchedule.DAILY) + .withRemoteVolumeResourceId("ur").withRemoteVolumeRegion("dkwobdagx"), + new ReplicationInner().withEndpointType(EndpointType.SRC) + .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY).withRemoteVolumeResourceId("xbxwa") + .withRemoteVolumeRegion("ogqxndlkzgxhuri"))); model = BinaryData.fromObject(model).toObject(ListReplications.class); Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("sytgadgvraea", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("e", model.value().get(0).remoteVolumeRegion()); + Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.value().get(0).replicationSchedule()); + Assertions.assertEquals("xogaokonzmnsikv", model.value().get(0).remoteVolumeResourceId()); + Assertions.assertEquals("qzeqqkdltfzxm", model.value().get(0).remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java index 22979162c4c5..8a5c74e9c6fd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java @@ -16,19 +16,19 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"b0db07e2-0d55-4a16-9043-862d6d43ce8b\",\"tenantId\":\"546cc382-9f0b-4fe7-b2d9-4dfa7e051a07\",\"type\":\"None\",\"userAssignedIdentities\":{\"moyrxvwfudwpz\":{\"principalId\":\"d68aff32-8de2-4773-a763-52f76c726951\",\"clientId\":\"dd60b7cc-a6c3-4f4d-ba11-d942001d4965\"},\"hdzhlrqj\":{\"principalId\":\"0d3e63e2-482a-425c-abe1-8b6f5e7e27ff\",\"clientId\":\"35fa09f1-945c-48a6-a4ac-96cbe97a0fe2\"},\"kfrlhrxsbky\":{\"principalId\":\"780afe23-a49e-4ec3-a63d-d7475b36aef6\",\"clientId\":\"61d91fa7-c397-4758-89ad-109b0a8c16c8\"},\"ca\":{\"principalId\":\"16f6d962-c37b-40e2-9acd-46244b8407cb\",\"clientId\":\"376332a8-28c1-4b72-96b7-a973c8e61ebd\"}}}") + "{\"principalId\":\"c4737fa3-4a9f-43d8-a563-ea2ca59172dd\",\"tenantId\":\"28cd2a9d-619f-471e-8d91-258babd14920\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"nlankxmyskpb\":{\"principalId\":\"b6186b30-9007-4479-9a71-627d4053c229\",\"clientId\":\"b922a97d-6139-4a67-9382-cad812c59f60\"},\"btkcxywnytnrsyn\":{\"principalId\":\"b9b0e7f4-0acc-4924-8d18-4279007d055b\",\"clientId\":\"cdd0c5db-f4a1-40eb-ab94-cb2d252c5933\"},\"dybyxczfclhaa\":{\"principalId\":\"dfdf6aa4-6678-446f-a0c0-f31d89329182\",\"clientId\":\"bbb6aa6b-c831-40e1-83c7-a052a8bd5bfc\"},\"abphlw\":{\"principalId\":\"2be080cf-710e-40ea-96df-3d128bbee929\",\"clientId\":\"86c401f1-b61b-4d9a-a400-630466fd5fe7\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model - = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE).withUserAssignedIdentities( - mapOf("moyrxvwfudwpz", new UserAssignedIdentity(), "hdzhlrqj", new UserAssignedIdentity(), - "kfrlhrxsbky", new UserAssignedIdentity(), "ca", new UserAssignedIdentity())); + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("nlankxmyskpb", new UserAssignedIdentity(), "btkcxywnytnrsyn", new UserAssignedIdentity(), + "dybyxczfclhaa", new UserAssignedIdentity(), "abphlw", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java index 93a09bb25d73..f1bbff645ba9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java @@ -12,24 +12,24 @@ public final class MonthlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonthlySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1895840108,\"daysOfMonth\":\"efkdlf\",\"hour\":1731932488,\"minute\":1662630957,\"usedBytes\":2710412149295788675}") + "{\"snapshotsToKeep\":1521931041,\"daysOfMonth\":\"krmnjijpxacqqud\",\"hour\":402319478,\"minute\":217779301,\"usedBytes\":3011567239664455561}") .toObject(MonthlySchedule.class); - Assertions.assertEquals(1895840108, model.snapshotsToKeep()); - Assertions.assertEquals("efkdlf", model.daysOfMonth()); - Assertions.assertEquals(1731932488, model.hour()); - Assertions.assertEquals(1662630957, model.minute()); - Assertions.assertEquals(2710412149295788675L, model.usedBytes()); + Assertions.assertEquals(1521931041, model.snapshotsToKeep()); + Assertions.assertEquals("krmnjijpxacqqud", model.daysOfMonth()); + Assertions.assertEquals(402319478, model.hour()); + Assertions.assertEquals(217779301, model.minute()); + Assertions.assertEquals(3011567239664455561L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(1895840108).withDaysOfMonth("efkdlf") - .withHour(1731932488).withMinute(1662630957).withUsedBytes(2710412149295788675L); + MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(1521931041).withDaysOfMonth("krmnjijpxacqqud") + .withHour(402319478).withMinute(217779301).withUsedBytes(3011567239664455561L); model = BinaryData.fromObject(model).toObject(MonthlySchedule.class); - Assertions.assertEquals(1895840108, model.snapshotsToKeep()); - Assertions.assertEquals("efkdlf", model.daysOfMonth()); - Assertions.assertEquals(1731932488, model.hour()); - Assertions.assertEquals(1662630957, model.minute()); - Assertions.assertEquals(2710412149295788675L, model.usedBytes()); + Assertions.assertEquals(1521931041, model.snapshotsToKeep()); + Assertions.assertEquals("krmnjijpxacqqud", model.daysOfMonth()); + Assertions.assertEquals(402319478, model.hour()); + Assertions.assertEquals(217779301, model.minute()); + Assertions.assertEquals(3011567239664455561L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java index 2581d9cda0f2..f17bc17b072f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java @@ -12,18 +12,18 @@ public final class MountTargetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MountTargetProperties model = BinaryData.fromString( - "{\"mountTargetId\":\"hin\",\"fileSystemId\":\"oygmift\",\"ipAddress\":\"zdnds\",\"smbServerFqdn\":\"nayqi\"}") + "{\"mountTargetId\":\"wmdyvxqtay\",\"fileSystemId\":\"iwwroyqbexrmc\",\"ipAddress\":\"bycnojvkn\",\"smbServerFqdn\":\"fqsgzvahapjy\"}") .toObject(MountTargetProperties.class); - Assertions.assertEquals("oygmift", model.fileSystemId()); - Assertions.assertEquals("nayqi", model.smbServerFqdn()); + Assertions.assertEquals("iwwroyqbexrmc", model.fileSystemId()); + Assertions.assertEquals("fqsgzvahapjy", model.smbServerFqdn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MountTargetProperties model - = new MountTargetProperties().withFileSystemId("oygmift").withSmbServerFqdn("nayqi"); + = new MountTargetProperties().withFileSystemId("iwwroyqbexrmc").withSmbServerFqdn("fqsgzvahapjy"); model = BinaryData.fromObject(model).toObject(MountTargetProperties.class); - Assertions.assertEquals("oygmift", model.fileSystemId()); - Assertions.assertEquals("nayqi", model.smbServerFqdn()); + Assertions.assertEquals("iwwroyqbexrmc", model.fileSystemId()); + Assertions.assertEquals("fqsgzvahapjy", model.smbServerFqdn()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java index 1153101e2304..47f40b6f4a04 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"properties\":{\"current\":1208874486,\"default\":2137490024},\"id\":\"jhlfzswpchwahf\",\"name\":\"ousnfepgfewe\",\"type\":\"wlyxgncxyk\"}"; + = "{\"properties\":{\"current\":1272047729,\"default\":923595041},\"id\":\"bqplh\",\"name\":\"vnuuepzl\",\"type\":\"phwzsoldweyuqdu\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -48,7 +48,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimits() - .getWithResponse("poaimlnwiaaomyl", "eazulcs", com.azure.core.util.Context.NONE).getValue(); + .getWithResponse("crxgibb", "axconfozauo", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java index 715d1fc564fb..78053182a5c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java @@ -31,7 +31,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"properties\":{\"current\":1258117952,\"default\":2128381794},\"id\":\"jnjwltlwt\",\"name\":\"j\",\"type\":\"uktalhsnvkcdmxz\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":937766926,\"default\":689066944},\"id\":\"gdxpg\",\"name\":\"qchiszep\",\"type\":\"nb\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,7 +49,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.netAppResourceQuotaLimits().list("hujswtwkozzwcul", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimits().list("inyflnorwmduvwp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java deleted file mode 100644 index 32e293b0f9b5..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RegionInfoResource; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourceRegionInfosGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"storageToNetworkProximity\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"p\",\"isAvailable\":true},{\"availabilityZone\":\"jtxvzflbqvgaq\",\"isAvailable\":false}]},\"id\":\"fcq\",\"name\":\"srdvetn\",\"type\":\"sdtutnwlduyc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RegionInfoResource response = manager.netAppResourceRegionInfos() - .getWithResponse("uvyinzqodfvpgs", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_ACROSS_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("p", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, response.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java deleted file mode 100644 index d4def56499bf..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RegionInfoResource; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NetAppResourceRegionInfosListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"xvxcjzhq\",\"isAvailable\":true},{\"availabilityZone\":\"pxtgqscjav\",\"isAvailable\":true},{\"availabilityZone\":\"hdqazkmtgguwp\",\"isAvailable\":false}]},\"id\":\"jcivmmg\",\"name\":\"f\",\"type\":\"fiwrxgkn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - NetAppFilesManager manager = NetAppFilesManager.configure().withHttpClient(httpClient).authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.netAppResourceRegionInfos().list("hdjhlimmbcx", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, - response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("xvxcjzhq", - response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java index 3ca33691617e..92c3d0ad9053 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java @@ -32,7 +32,7 @@ public void testCheckFilePathAvailabilityWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"lrariaawiu\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"iv\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,13 +50,13 @@ public void testCheckFilePathAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("nzeyqxtjj", - new FilePathAvailabilityRequest().withName("zqlqhyc").withSubnetId("vodggxdbee"), + .checkFilePathAvailabilityWithResponse("gaifmvik", + new FilePathAvailabilityRequest().withName("bydvkhbejdz").withSubnetId("xcv"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(false, response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("lrariaawiu", response.message()); + Assertions.assertEquals("iv", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java index 41cc00ff3f5d..a6895c8db7d0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"lefaxvxilcbtgn\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"qnrnrpxehuwryk\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,13 +51,15 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CheckAvailabilityResponse response = manager.netAppResources() - .checkNameAvailabilityWithResponse("bzydvfvfcj", new ResourceNameAvailabilityRequest().withName("aeoisrvh") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS).withResourceGroup("orffukiscv"), + .checkNameAvailabilityWithResponse("xvydfceacvlhvygd", + new ResourceNameAvailabilityRequest().withName("ftumrtwnawjslbiw") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) + .withResourceGroup("jgcyztsfmznba"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(true, response.isAvailable()); + Assertions.assertEquals(false, response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("lefaxvxilcbtgn", response.message()); + Assertions.assertEquals("qnrnrpxehuwryk", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java index 9aa4b930892f..899bd86d8bd9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"uxylfsbtkadpy\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"ejwcwwqiok\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,15 +51,15 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("gy", - new QuotaAvailabilityRequest().withName("wqfbylyrfgiagt") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) - .withResourceGroup("jocqwogfnzjvusf"), + .checkQuotaAvailabilityWithResponse("lvtno", + new QuotaAvailabilityRequest().withName("qfzgemjdftul") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) + .withResourceGroup("tduceamt"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(false, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("uxylfsbtkadpy", response.message()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); + Assertions.assertEquals("ejwcwwqiok", response.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java index 11cce5e31465..bd0aef8ef847 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testQueryNetworkSiblingSetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"networkSiblingSetId\":\"cact\",\"subnetId\":\"wotey\",\"networkSiblingSetStateId\":\"cluqovekqvgqo\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Failed\",\"nicInfoList\":[{\"ipAddress\":\"wyivqikf\",\"volumeResourceIds\":[\"hrfsphuagrtti\",\"teusqczkvyklxu\",\"yja\"]},{\"ipAddress\":\"mmfblcqcuubgqib\",\"volumeResourceIds\":[\"lmetttwgdslqxi\"]}]}"; + = "{\"networkSiblingSetId\":\"odpvruudlgzib\",\"subnetId\":\"ostgkts\",\"networkSiblingSetStateId\":\"dxeclzedqbcvh\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"kdl\",\"volumeResourceIds\":[\"fbumlkx\",\"rqjfsmlm\",\"txhwgfws\",\"tawc\"]},{\"ipAddress\":\"zbrhubskhudyg\",\"volumeResourceIds\":[\"kkqfqjbvle\",\"rfmluiqtq\",\"fa\"]},{\"ipAddress\":\"vnqqybaryeua\",\"volumeResourceIds\":[\"qabqgzslesjcb\"]}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,15 +51,15 @@ public void testQueryNetworkSiblingSetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); NetworkSiblingSet response = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("plcplcwkhi", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("ihlhzdsqtzb").withSubnetId("rgnowcjhfgm"), + .queryNetworkSiblingSetWithResponse("htba", + new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("kgxywr").withSubnetId("kpyklyhp"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cact", response.networkSiblingSetId()); - Assertions.assertEquals("wotey", response.subnetId()); - Assertions.assertEquals("cluqovekqvgqo", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, response.networkFeatures()); - Assertions.assertEquals("hrfsphuagrtti", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("odpvruudlgzib", response.networkSiblingSetId()); + Assertions.assertEquals("ostgkts", response.subnetId()); + Assertions.assertEquals("dxeclzedqbcvh", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); + Assertions.assertEquals("fbumlkx", response.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java index 5ab2cf6e3dc1..0f17facfd355 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java @@ -32,7 +32,7 @@ public void testQueryRegionInfoWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"grjqctojcmi\",\"isAvailable\":true},{\"availabilityZone\":\"eypefojyqd\",\"isAvailable\":false}]}"; + = "{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"vk\",\"isAvailable\":false},{\"availabilityZone\":\"ql\",\"isAvailable\":false},{\"availabilityZone\":\"tczheydbsdshmkx\",\"isAvailable\":true},{\"availabilityZone\":\"vbbxuripl\",\"isAvailable\":false}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,11 +49,11 @@ public void testQueryRegionInfoWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - RegionInfo response - = manager.netAppResources().queryRegionInfoWithResponse("own", com.azure.core.util.Context.NONE).getValue(); + RegionInfo response = manager.netAppResources() + .queryRegionInfoWithResponse("ssxmojms", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("grjqctojcmi", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, response.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T2, response.storageToNetworkProximity()); + Assertions.assertEquals("vk", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(false, response.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java index dec14e810bcf..409bcda9becd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java @@ -33,7 +33,7 @@ public void testUpdateNetworkSiblingSet() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"networkSiblingSetId\":\"xslhvnhlabrqnkk\",\"subnetId\":\"cjbtrgaehvvib\",\"networkSiblingSetStateId\":\"jj\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Failed\",\"nicInfoList\":[{\"ipAddress\":\"pkxztmoobkl\",\"volumeResourceIds\":[\"dgfcwqmp\",\"maqxzhemjyh\"]}]}"; + = "{\"networkSiblingSetId\":\"vvhmxtdrj\",\"subnetId\":\"tac\",\"networkSiblingSetStateId\":\"bj\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"m\",\"volumeResourceIds\":[\"mguaadraufa\",\"tkahzo\",\"ajjziuxxpshne\",\"kulfg\"]},{\"ipAddress\":\"qubkw\",\"volumeResourceIds\":[\"nrdsutujbazpjuoh\"]}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,15 +50,15 @@ public void testUpdateNetworkSiblingSet() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - NetworkSiblingSet response = manager.netAppResources().updateNetworkSiblingSet("hrmooi", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("qseypxiutcxa").withSubnetId("zhyrpeto") - .withNetworkSiblingSetStateId("e").withNetworkFeatures(NetworkFeatures.BASIC_STANDARD), + NetworkSiblingSet response = manager.netAppResources().updateNetworkSiblingSet("ernntiewdjcvbquw", + new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("behwagohb").withSubnetId("f") + .withNetworkSiblingSetStateId("kmr").withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); - Assertions.assertEquals("xslhvnhlabrqnkk", response.networkSiblingSetId()); - Assertions.assertEquals("cjbtrgaehvvib", response.subnetId()); - Assertions.assertEquals("jj", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, response.networkFeatures()); - Assertions.assertEquals("dgfcwqmp", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("vvhmxtdrj", response.networkSiblingSetId()); + Assertions.assertEquals("tac", response.subnetId()); + Assertions.assertEquals("bj", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); + Assertions.assertEquals("mguaadraufa", response.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java index 07de00fb395f..239814c1d340 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java @@ -15,32 +15,26 @@ public final class NetworkSiblingSetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSiblingSetInner model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"ynhijggme\",\"subnetId\":\"siarbutrcvpn\",\"networkSiblingSetStateId\":\"zmhjrunmp\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"nlankxmyskpb\",\"volumeResourceIds\":[\"btkcxywnytnrsyn\",\"qidybyx\",\"zfcl\",\"aaxdbabphlwrq\"]},{\"ipAddress\":\"ktsthsucocmny\",\"volumeResourceIds\":[\"t\"]},{\"ipAddress\":\"twwrqp\",\"volumeResourceIds\":[\"ckzywbiexzfeyue\",\"xibxujwbhqwalm\",\"zyoxaepdkzjan\"]},{\"ipAddress\":\"xrhdwbavxbniwdjs\",\"volumeResourceIds\":[\"s\",\"bpg\"]}]}") + "{\"networkSiblingSetId\":\"pwhonowkg\",\"subnetId\":\"wankixzbi\",\"networkSiblingSetStateId\":\"eputtmrywnuzoqf\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"cqvyxlwhzlsico\",\"volumeResourceIds\":[\"qnwvlrya\"]}]}") .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("ynhijggme", model.networkSiblingSetId()); - Assertions.assertEquals("siarbutrcvpn", model.subnetId()); - Assertions.assertEquals("zmhjrunmp", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - Assertions.assertEquals("btkcxywnytnrsyn", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("pwhonowkg", model.networkSiblingSetId()); + Assertions.assertEquals("wankixzbi", model.subnetId()); + Assertions.assertEquals("eputtmrywnuzoqf", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); + Assertions.assertEquals("qnwvlrya", model.nicInfoList().get(0).volumeResourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkSiblingSetInner model - = new NetworkSiblingSetInner().withNetworkSiblingSetId("ynhijggme").withSubnetId("siarbutrcvpn") - .withNetworkSiblingSetStateId("zmhjrunmp").withNetworkFeatures(NetworkFeatures.BASIC_STANDARD) - .withNicInfoList(Arrays.asList( - new NicInfo() - .withVolumeResourceIds(Arrays.asList("btkcxywnytnrsyn", "qidybyx", "zfcl", "aaxdbabphlwrq")), - new NicInfo().withVolumeResourceIds(Arrays.asList("t")), - new NicInfo() - .withVolumeResourceIds(Arrays.asList("ckzywbiexzfeyue", "xibxujwbhqwalm", "zyoxaepdkzjan")), - new NicInfo().withVolumeResourceIds(Arrays.asList("s", "bpg")))); + = new NetworkSiblingSetInner().withNetworkSiblingSetId("pwhonowkg").withSubnetId("wankixzbi") + .withNetworkSiblingSetStateId("eputtmrywnuzoqf").withNetworkFeatures(NetworkFeatures.STANDARD_BASIC) + .withNicInfoList(Arrays.asList(new NicInfo().withVolumeResourceIds(Arrays.asList("qnwvlrya")))); model = BinaryData.fromObject(model).toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("ynhijggme", model.networkSiblingSetId()); - Assertions.assertEquals("siarbutrcvpn", model.subnetId()); - Assertions.assertEquals("zmhjrunmp", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - Assertions.assertEquals("btkcxywnytnrsyn", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("pwhonowkg", model.networkSiblingSetId()); + Assertions.assertEquals("wankixzbi", model.subnetId()); + Assertions.assertEquals("eputtmrywnuzoqf", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); + Assertions.assertEquals("qnwvlrya", model.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java index a7a8503e1069..2b1bbdd17120 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java @@ -12,15 +12,16 @@ public final class NicInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NicInfo model = BinaryData.fromString("{\"ipAddress\":\"ytxhp\",\"volumeResourceIds\":[\"zpfzabglc\",\"hxw\"]}") - .toObject(NicInfo.class); - Assertions.assertEquals("zpfzabglc", model.volumeResourceIds().get(0)); + NicInfo model + = BinaryData.fromString("{\"ipAddress\":\"hheunmmqhgyx\",\"volumeResourceIds\":[\"noc\",\"koklya\"]}") + .toObject(NicInfo.class); + Assertions.assertEquals("noc", model.volumeResourceIds().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NicInfo model = new NicInfo().withVolumeResourceIds(Arrays.asList("zpfzabglc", "hxw")); + NicInfo model = new NicInfo().withVolumeResourceIds(Arrays.asList("noc", "koklya")); model = BinaryData.fromObject(model).toObject(NicInfo.class); - Assertions.assertEquals("zpfzabglc", model.volumeResourceIds().get(0)); + Assertions.assertEquals("noc", model.volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java index f222eb7110e2..527f97a4a6a7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java @@ -33,7 +33,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"name\":\"fzwiivwzjbhyz\",\"display\":{\"provider\":\"rkambt\",\"resource\":\"egv\",\"operation\":\"vuqeqvldspast\",\"description\":\"kkdmfl\"},\"origin\":\"stmjlxrri\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"ewchpxlktwku\",\"displayName\":\"ycslevufuztcktyh\",\"displayDescription\":\"qedcgzulwm\",\"unit\":\"qzz\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"dzgkr\",\"qeevt\",\"epr\",\"utnwytpzdmovzvf\"],\"internalMetricName\":\"awzqadfl\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"iglaecx\",\"sourceMdmNamespace\":\"t\",\"dimensions\":[{},{}],\"aggregationType\":\"pvz\",\"fillGapWithZero\":false,\"category\":\"mldgxobfirc\",\"resourceIdDimensionNameOverride\":\"pkc\",\"isInternal\":false},{\"name\":\"riykhyawfvjlbox\",\"displayName\":\"kjlmx\",\"displayDescription\":\"mdy\",\"unit\":\"dwdigumb\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"jazysdzhezwwvaiq\"],\"internalMetricName\":\"vv\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"p\",\"sourceMdmNamespace\":\"qyikvy\",\"dimensions\":[{}],\"aggregationType\":\"avluwmncs\",\"fillGapWithZero\":false,\"category\":\"fybvpoek\",\"resourceIdDimensionNameOverride\":\"gsgbdhuzq\",\"isInternal\":false},{\"name\":\"gkynscliqh\",\"displayName\":\"h\",\"displayDescription\":\"komtkubotppn\",\"unit\":\"xz\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"cev\"],\"internalMetricName\":\"gtltdhlf\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"py\",\"sourceMdmNamespace\":\"gtrd\",\"dimensions\":[{},{}],\"aggregationType\":\"mzzs\",\"fillGapWithZero\":false,\"category\":\"rnysux\",\"resourceIdDimensionNameOverride\":\"rafwgckhocxvdf\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"roud\",\"displayName\":\"pavehhr\"},{\"name\":\"bunzozudh\",\"displayName\":\"gkmoyxcdyuibhmfd\"}]}}}]}"; + = "{\"value\":[{\"name\":\"hixbjxyfwnyl\",\"display\":{\"provider\":\"o\",\"resource\":\"ttpkiwkkbnujrywv\",\"operation\":\"lbfpncurd\",\"description\":\"wiithtywub\"},\"origin\":\"bihwqknfdnt\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"goihx\",\"displayName\":\"wct\",\"displayDescription\":\"dzjlu\",\"unit\":\"fdlwg\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"vvt\",\"seinqfiuf\",\"qknp\",\"rgnepttwqmsniffc\"],\"internalMetricName\":\"qnrojlpijnkrxfrd\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"atiz\",\"sourceMdmNamespace\":\"onasxifto\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"hftwesgog\",\"fillGapWithZero\":true,\"category\":\"nnxk\",\"resourceIdDimensionNameOverride\":\"gnyhmossxkkg\",\"isInternal\":true},{\"name\":\"gh\",\"displayName\":\"bdhqxvcxgf\",\"displayDescription\":\"dsofbshrns\",\"unit\":\"uswdv\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"nvjsrtkfa\",\"nopqgikyzirtx\",\"yuxzejntpsewgi\",\"ilqu\"],\"internalMetricName\":\"ydxtqm\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"orgguf\",\"sourceMdmNamespace\":\"aomtbghhavgrvkff\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"hpjbib\",\"fillGapWithZero\":true,\"category\":\"xumvfcluyovw\",\"resourceIdDimensionNameOverride\":\"bkfezzxscyhwzdgi\",\"isInternal\":true},{\"name\":\"zbomvzzbtdcqvpni\",\"displayName\":\"jviylwdshfs\",\"displayDescription\":\"rbgyefry\",\"unit\":\"gaojf\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"mrfhirctymox\"],\"internalMetricName\":\"tpipiwyczuhx\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"jlihhyus\",\"sourceMdmNamespace\":\"kasdvlm\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"zxulucvpamrsreu\",\"fillGapWithZero\":true,\"category\":\"risjnhnytxifqjz\",\"resourceIdDimensionNameOverride\":\"mrhublwpc\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"jupauut\",\"displayName\":\"oqh\"},{\"name\":\"ejqgw\",\"displayName\":\"nfqn\"},{\"name\":\"ypsxjvfoim\",\"displayName\":\"slirciz\"}]}}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,45 +52,45 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("fzwiivwzjbhyz", response.iterator().next().name()); - Assertions.assertEquals("rkambt", response.iterator().next().display().provider()); - Assertions.assertEquals("egv", response.iterator().next().display().resource()); - Assertions.assertEquals("vuqeqvldspast", response.iterator().next().display().operation()); - Assertions.assertEquals("kkdmfl", response.iterator().next().display().description()); - Assertions.assertEquals("stmjlxrri", response.iterator().next().origin()); - Assertions.assertEquals("ewchpxlktwku", + Assertions.assertEquals("hixbjxyfwnyl", response.iterator().next().name()); + Assertions.assertEquals("o", response.iterator().next().display().provider()); + Assertions.assertEquals("ttpkiwkkbnujrywv", response.iterator().next().display().resource()); + Assertions.assertEquals("lbfpncurd", response.iterator().next().display().operation()); + Assertions.assertEquals("wiithtywub", response.iterator().next().display().description()); + Assertions.assertEquals("bihwqknfdnt", response.iterator().next().origin()); + Assertions.assertEquals("goihx", response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ycslevufuztcktyh", + Assertions.assertEquals("wct", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("qedcgzulwm", + Assertions.assertEquals("dzjlu", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qzz", + Assertions.assertEquals("fdlwg", response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); Assertions.assertEquals(MetricAggregationType.AVERAGE, response.iterator().next().serviceSpecification() .metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("dzgkr", response.iterator().next().serviceSpecification().metricSpecifications().get(0) + Assertions.assertEquals("vvt", response.iterator().next().serviceSpecification().metricSpecifications().get(0) .supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("awzqadfl", + Assertions.assertEquals("qnrojlpijnkrxfrd", response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); Assertions.assertEquals(false, response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("iglaecx", + Assertions.assertEquals("atiz", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("t", + Assertions.assertEquals("onasxifto", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("pvz", + Assertions.assertEquals("hftwesgog", response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, + Assertions.assertEquals(true, response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("mldgxobfirc", + Assertions.assertEquals("nnxk", response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("pkc", response.iterator().next().serviceSpecification().metricSpecifications().get(0) - .resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, + Assertions.assertEquals("gnyhmossxkkg", response.iterator().next().serviceSpecification().metricSpecifications() + .get(0).resourceIdDimensionNameOverride()); + Assertions.assertEquals(true, response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("roud", + Assertions.assertEquals("jupauut", response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("pavehhr", + Assertions.assertEquals("oqh", response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java index b708ee6fb964..9f7b9413a38b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java @@ -12,14 +12,14 @@ public final class PoolChangeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolChangeRequest model - = BinaryData.fromString("{\"newPoolResourceId\":\"ibwwiftohqkv\"}").toObject(PoolChangeRequest.class); - Assertions.assertEquals("ibwwiftohqkv", model.newPoolResourceId()); + = BinaryData.fromString("{\"newPoolResourceId\":\"gqrlltmuwla\"}").toObject(PoolChangeRequest.class); + Assertions.assertEquals("gqrlltmuwla", model.newPoolResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("ibwwiftohqkv"); + PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("gqrlltmuwla"); model = BinaryData.fromObject(model).toObject(PoolChangeRequest.class); - Assertions.assertEquals("ibwwiftohqkv", model.newPoolResourceId()); + Assertions.assertEquals("gqrlltmuwla", model.newPoolResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java index 5445635760bb..7f0013c0efdc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java @@ -13,20 +13,20 @@ public final class PoolPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolPatchProperties model - = BinaryData.fromString("{\"size\":5149673217510977863,\"qosType\":\"Manual\",\"coolAccess\":false}") + = BinaryData.fromString("{\"size\":54169882983487255,\"qosType\":\"Auto\",\"coolAccess\":true}") .toObject(PoolPatchProperties.class); - Assertions.assertEquals(5149673217510977863L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); + Assertions.assertEquals(54169882983487255L, model.size()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertEquals(true, model.coolAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolPatchProperties model = new PoolPatchProperties().withSize(5149673217510977863L).withQosType(QosType.MANUAL) - .withCoolAccess(false); + PoolPatchProperties model + = new PoolPatchProperties().withSize(54169882983487255L).withQosType(QosType.AUTO).withCoolAccess(true); model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(5149673217510977863L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); + Assertions.assertEquals(54169882983487255L, model.size()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); + Assertions.assertEquals(true, model.coolAccess()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java index 452a3f6fdfce..76e0449e36e7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java @@ -15,24 +15,23 @@ public final class PoolPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolProperties model = BinaryData.fromString( - "{\"poolId\":\"xznelixhnrztf\",\"size\":8485001570661257107,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"xknalaulppg\",\"totalThroughputMibps\":96.281746,\"utilizedThroughputMibps\":91.14523,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"}") + "{\"poolId\":\"kv\",\"size\":989086550960883148,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"qkrhahvljua\",\"totalThroughputMibps\":69.46674,\"utilizedThroughputMibps\":50.34383,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"}") .toObject(PoolProperties.class); - Assertions.assertEquals(8485001570661257107L, model.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertEquals(989086550960883148L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); Assertions.assertEquals(false, model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolProperties model - = new PoolProperties().withSize(8485001570661257107L).withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withQosType(QosType.MANUAL).withCoolAccess(false).withEncryptionType(EncryptionType.DOUBLE); + PoolProperties model = new PoolProperties().withSize(989086550960883148L).withServiceLevel(ServiceLevel.ULTRA) + .withQosType(QosType.AUTO).withCoolAccess(false).withEncryptionType(EncryptionType.DOUBLE); model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(8485001570661257107L, model.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertEquals(989086550960883148L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); Assertions.assertEquals(false, model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java index 93ccf5b92466..41d540234467 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java @@ -36,7 +36,7 @@ public void testCreateOrUpdate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"etag\":\"gpr\",\"properties\":{\"poolId\":\"tillucbiqtg\",\"size\":56526058003542305,\"serviceLevel\":\"Standard\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":21.163637,\"utilizedThroughputMibps\":90.1712,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"bphbqzmizakakank\",\"tags\":{\"zhajoylhjlmuo\":\"n\",\"eecjmeis\":\"xprimrsop\"},\"id\":\"stvasylwxdzaumw\",\"name\":\"oohgu\",\"type\":\"fuzboyjathwtzolb\"}"; + = "{\"etag\":\"ajlyjtlvofqzhv\",\"properties\":{\"poolId\":\"ibyfmo\",\"size\":6727856303003361360,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":78.12518,\"utilizedThroughputMibps\":77.284424,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"hyzsxjrkamb\",\"tags\":{\"nvuqeqvldspa\":\"egv\",\"kdmflvestmjlx\":\"tjb\",\"zapeewchpx\":\"ril\"},\"id\":\"ktwkuziyc\",\"name\":\"levufuztcktyhj\",\"type\":\"qedcgzulwm\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -53,19 +53,18 @@ public void testCreateOrUpdate() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - CapacityPool response = manager.pools().define("whryvycytdcl").withRegion("bg") - .withExistingNetAppAccount("oylaxxul", "disdosfjbjsvgj").withSize(1887689540352270929L) - .withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withTags(mapOf("utlwxezwzhok", "ylkdghrje", "ehgpp", "bwnhhtql", "csheafidltugsr", "pifhpfeoajvgcxtx")) - .withQosType(QosType.MANUAL).withCoolAccess(true).withEncryptionType(EncryptionType.DOUBLE).create(); + CapacityPool response = manager.pools().define("evwrdnhfuk").withRegion("oqcaaewdaomdj") + .withExistingNetAppAccount("chp", "db").withSize(3770519572473050056L) + .withServiceLevel(ServiceLevel.STANDARD).withTags(mapOf("siykzkdncjdxonbz", "jxxkzbrmsgei", "z", "ggcula")) + .withQosType(QosType.AUTO).withCoolAccess(false).withEncryptionType(EncryptionType.SINGLE).create(); - Assertions.assertEquals("bphbqzmizakakank", response.location()); - Assertions.assertEquals("n", response.tags().get("zhajoylhjlmuo")); - Assertions.assertEquals(56526058003542305L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); + Assertions.assertEquals("hyzsxjrkamb", response.location()); + Assertions.assertEquals("egv", response.tags().get("nvuqeqvldspa")); + Assertions.assertEquals(6727856303003361360L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); Assertions.assertEquals(QosType.MANUAL, response.qosType()); Assertions.assertEquals(false, response.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, response.encryptionType()); + Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java index 2a34a8defff7..50d92ee86bbb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java @@ -34,7 +34,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"etag\":\"pxtxsuwp\",\"properties\":{\"poolId\":\"ujwsawddjibabxvi\",\"size\":2713805626921616669,\"serviceLevel\":\"Standard\",\"provisioningState\":\"zeexavoxtfgle\",\"totalThroughputMibps\":0.8543253,\"utilizedThroughputMibps\":13.757277,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"gsfjac\",\"tags\":{\"xvodhtnsir\":\"hhxud\",\"gzrcxfailcfxwmdb\":\"dhzmmesckdlp\",\"lnacgcc\":\"xdfgsftufqobr\",\"kizvytn\":\"knh\"},\"id\":\"zvulj\",\"name\":\"aaeranokqgukk\",\"type\":\"qnvb\"}"; + = "{\"etag\":\"yakk\",\"properties\":{\"poolId\":\"zp\",\"size\":8657579168665991549,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"lma\",\"totalThroughputMibps\":64.56741,\"utilizedThroughputMibps\":98.82529,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"kdbdgiogsj\",\"tags\":{\"iyhddvi\":\"wqjnob\",\"vm\":\"cegfnmntfp\"},\"id\":\"mfnczd\",\"name\":\"vvbalx\",\"type\":\"l\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -52,14 +52,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); CapacityPool response = manager.pools() - .getWithResponse("ekkkzd", "rtkgdojbmxvavref", "eesvecu", com.azure.core.util.Context.NONE).getValue(); + .getWithResponse("dabg", "vudtjuewbcihx", "uwhcjyxccybv", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("gsfjac", response.location()); - Assertions.assertEquals("hhxud", response.tags().get("xvodhtnsir")); - Assertions.assertEquals(2713805626921616669L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); + Assertions.assertEquals("kdbdgiogsj", response.location()); + Assertions.assertEquals("wqjnob", response.tags().get("iyhddvi")); + Assertions.assertEquals(8657579168665991549L, response.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, response.serviceLevel()); Assertions.assertEquals(QosType.MANUAL, response.qosType()); Assertions.assertEquals(false, response.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, response.encryptionType()); + Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java index dd1df97f3f9d..7c50b5520b8e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java @@ -35,7 +35,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"etag\":\"tjeaahhvjhh\",\"properties\":{\"poolId\":\"kzyb\",\"size\":6116689524962712443,\"serviceLevel\":\"Premium\",\"provisioningState\":\"jks\",\"totalThroughputMibps\":82.007126,\"utilizedThroughputMibps\":94.716125,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"location\":\"jednlj\",\"tags\":{\"smjbnkppxyn\":\"euaulxu\",\"gwklnsr\":\"nlsvxeiz\"},\"id\":\"ffeycx\",\"name\":\"ktp\",\"type\":\"ymerteeammxq\"}]}"; + = "{\"value\":[{\"etag\":\"uisavokq\",\"properties\":{\"poolId\":\"fvazivjlfrqttba\",\"size\":8474916357734436058,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"nwxyiop\",\"totalThroughputMibps\":28.38924,\"utilizedThroughputMibps\":76.790695,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"kdmligovi\",\"tags\":{\"uruocbgo\":\"kpmloa\"},\"id\":\"rb\",\"name\":\"eoybfhjxakvvjgs\",\"type\":\"ordilmywwtkgkxny\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -53,14 +53,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.pools().list("msidxasicddyvv", "skgfmocwahpq", com.azure.core.util.Context.NONE); + = manager.pools().list("mmqtgqqqxhr", "xrxc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jednlj", response.iterator().next().location()); - Assertions.assertEquals("euaulxu", response.iterator().next().tags().get("smjbnkppxyn")); - Assertions.assertEquals(6116689524962712443L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, response.iterator().next().serviceLevel()); - Assertions.assertEquals(QosType.AUTO, response.iterator().next().qosType()); - Assertions.assertEquals(true, response.iterator().next().coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, response.iterator().next().encryptionType()); + Assertions.assertEquals("kdmligovi", response.iterator().next().location()); + Assertions.assertEquals("kpmloa", response.iterator().next().tags().get("uruocbgo")); + Assertions.assertEquals(8474916357734436058L, response.iterator().next().size()); + Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); + Assertions.assertEquals(QosType.MANUAL, response.iterator().next().qosType()); + Assertions.assertEquals(false, response.iterator().next().coolAccess()); + Assertions.assertEquals(EncryptionType.DOUBLE, response.iterator().next().encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java index 3d1c028d4d31..500024b3b9e4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java @@ -12,18 +12,18 @@ public final class QueryNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QueryNetworkSiblingSetRequest model - = BinaryData.fromString("{\"networkSiblingSetId\":\"ik\",\"subnetId\":\"drgvtqagn\"}") + = BinaryData.fromString("{\"networkSiblingSetId\":\"yeamdphagalpb\",\"subnetId\":\"xw\"}") .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("ik", model.networkSiblingSetId()); - Assertions.assertEquals("drgvtqagn", model.subnetId()); + Assertions.assertEquals("yeamdphagalpb", model.networkSiblingSetId()); + Assertions.assertEquals("xw", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("ik").withSubnetId("drgvtqagn"); + = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("yeamdphagalpb").withSubnetId("xw"); model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("ik", model.networkSiblingSetId()); - Assertions.assertEquals("drgvtqagn", model.subnetId()); + Assertions.assertEquals("yeamdphagalpb", model.networkSiblingSetId()); + Assertions.assertEquals("xw", model.subnetId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java index b2d3f54ba5f4..bd53d9da4b3d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java @@ -12,14 +12,14 @@ public final class ReestablishReplicationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReestablishReplicationRequest model - = BinaryData.fromString("{\"sourceVolumeId\":\"koymkcd\"}").toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("koymkcd", model.sourceVolumeId()); + = BinaryData.fromString("{\"sourceVolumeId\":\"emwabnet\"}").toObject(ReestablishReplicationRequest.class); + Assertions.assertEquals("emwabnet", model.sourceVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("koymkcd"); + ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("emwabnet"); model = BinaryData.fromObject(model).toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("koymkcd", model.sourceVolumeId()); + Assertions.assertEquals("emwabnet", model.sourceVolumeId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java index cb4d123413cd..be85868daaac 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java @@ -12,18 +12,18 @@ public final class RegionInfoAvailabilityZoneMappingsItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoAvailabilityZoneMappingsItem model - = BinaryData.fromString("{\"availabilityZone\":\"dhibnuq\",\"isAvailable\":false}") + = BinaryData.fromString("{\"availabilityZone\":\"fbishcbkha\",\"isAvailable\":false}") .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("dhibnuq", model.availabilityZone()); + Assertions.assertEquals("fbishcbkha", model.availabilityZone()); Assertions.assertEquals(false, model.isAvailable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RegionInfoAvailabilityZoneMappingsItem model - = new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("dhibnuq").withIsAvailable(false); + = new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fbishcbkha").withIsAvailable(false); model = BinaryData.fromObject(model).toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("dhibnuq", model.availabilityZone()); + Assertions.assertEquals("fbishcbkha", model.availabilityZone()); Assertions.assertEquals(false, model.isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java index 580f27feb7e6..1a62697c1398 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java @@ -15,25 +15,27 @@ public final class RegionInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"fqkkr\",\"isAvailable\":true},{\"availabilityZone\":\"kgriwflzlfbx\",\"isAvailable\":true},{\"availabilityZone\":\"ycispnqzahmgkb\",\"isAvailable\":true}]}") + "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"c\",\"isAvailable\":true},{\"availabilityZone\":\"sdpydnfyhxdeoejz\",\"isAvailable\":false},{\"availabilityZone\":\"fsj\",\"isAvailable\":true}]}") .toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T2AND_ACROSS_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("fqkkr", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, + model.storageToNetworkProximity()); + Assertions.assertEquals("c", model.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegionInfoInner model = new RegionInfoInner() - .withStorageToNetworkProximity(RegionStorageToNetworkProximity.T2AND_ACROSS_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fqkkr").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("kgriwflzlfbx").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("ycispnqzahmgkb") - .withIsAvailable(true))); + RegionInfoInner model + = new RegionInfoInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2) + .withAvailabilityZoneMappings(Arrays.asList( + new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("c").withIsAvailable(true), + new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("sdpydnfyhxdeoejz") + .withIsAvailable(false), + new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fsj").withIsAvailable(true))); model = BinaryData.fromObject(model).toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T2AND_ACROSS_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("fqkkr", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, + model.storageToNetworkProximity()); + Assertions.assertEquals("c", model.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java deleted file mode 100644 index dc77d1d310aa..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfoResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfoResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"gvcl\",\"isAvailable\":true},{\"availabilityZone\":\"ncghkje\",\"isAvailable\":true}]},\"id\":\"bijhtxfvgxbf\",\"name\":\"mxnehmp\",\"type\":\"ec\"}") - .toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("gvcl", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfoResourceInner model = new RegionInfoResourceInner() - .withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("gvcl").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("ncghkje").withIsAvailable(true))); - model = BinaryData.fromObject(model).toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("gvcl", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java deleted file mode 100644 index 273bfbf0b71c..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionInfosList; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfosListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfosList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"qjsdpydnfyhxdeo\",\"isAvailable\":false},{\"availabilityZone\":\"cwif\",\"isAvailable\":false}]},\"id\":\"gzfbishcbk\",\"name\":\"ajdeyeamdphaga\",\"type\":\"pbuxwgipwhon\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ankixzbinjeput\",\"isAvailable\":false},{\"availabilityZone\":\"wnuzoqftiyqzrnkc\",\"isAvailable\":false},{\"availabilityZone\":\"lwh\",\"isAvailable\":true},{\"availabilityZone\":\"cohoq\",\"isAvailable\":false}]},\"id\":\"lryav\",\"name\":\"hheunmmqhgyx\",\"type\":\"konocu\"},{\"properties\":{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"uconuqszfkbey\",\"isAvailable\":true},{\"availabilityZone\":\"mjmwvvjektcx\",\"isAvailable\":true}]},\"id\":\"wlrsffrzpwv\",\"name\":\"qdqgbi\",\"type\":\"ylihkaetckt\"},{\"properties\":{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"nkymuctqhjfbebrj\",\"isAvailable\":true},{\"availabilityZone\":\"fuwutttxf\",\"isAvailable\":false},{\"availabilityZone\":\"i\",\"isAvailable\":true}]},\"id\":\"epcyvahfnlj\",\"name\":\"yq\",\"type\":\"j\"}],\"nextLink\":\"ujqgidok\"}") - .toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("qjsdpydnfyhxdeo", - model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(false, model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("ujqgidok", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfosList model = new RegionInfosList() - .withValue(Arrays.asList(new RegionInfoResourceInner() - .withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("qjsdpydnfyhxdeo") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("cwif").withIsAvailable(false))), - new RegionInfoResourceInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("ankixzbinjeput") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("wnuzoqftiyqzrnkc") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("lwh").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("cohoq") - .withIsAvailable(false))), - new RegionInfoResourceInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("uconuqszfkbey") - .withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("mjmwvvjektcx") - .withIsAvailable(true))), - new RegionInfoResourceInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("nkymuctqhjfbebrj") - .withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fuwutttxf") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("i").withIsAvailable(true))))) - .withNextLink("ujqgidok"); - model = BinaryData.fromObject(model).toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("qjsdpydnfyhxdeo", - model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(false, model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("ujqgidok", model.nextLink()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java deleted file mode 100644 index 0976f6eecf4d..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.RemotePath; -import org.junit.jupiter.api.Assertions; - -public final class RemotePathTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RemotePath model = BinaryData - .fromString("{\"externalHostName\":\"wubmwmbesldn\",\"serverName\":\"wwtppj\",\"volumeName\":\"lcxog\"}") - .toObject(RemotePath.class); - Assertions.assertEquals("wubmwmbesldn", model.externalHostname()); - Assertions.assertEquals("wwtppj", model.serverName()); - Assertions.assertEquals("lcxog", model.volumeName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RemotePath model - = new RemotePath().withExternalHostname("wubmwmbesldn").withServerName("wwtppj").withVolumeName("lcxog"); - model = BinaryData.fromObject(model).toObject(RemotePath.class); - Assertions.assertEquals("wubmwmbesldn", model.externalHostname()); - Assertions.assertEquals("wwtppj", model.serverName()); - Assertions.assertEquals("lcxog", model.volumeName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java index 1892fbb0d044..a7f0c2a62b52 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java @@ -14,23 +14,23 @@ public final class ReplicationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationInner model = BinaryData.fromString( - "{\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"rwlqu\",\"remoteVolumeRegion\":\"jfqka\"}") + "{\"endpointType\":\"dst\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"dxunkbebxmubyyn\",\"remoteVolumeRegion\":\"lrb\"}") .toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); + Assertions.assertEquals(EndpointType.DST, model.endpointType()); Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); - Assertions.assertEquals("rwlqu", model.remoteVolumeResourceId()); - Assertions.assertEquals("jfqka", model.remoteVolumeRegion()); + Assertions.assertEquals("dxunkbebxmubyyn", model.remoteVolumeResourceId()); + Assertions.assertEquals("lrb", model.remoteVolumeRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReplicationInner model = new ReplicationInner().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.HOURLY).withRemoteVolumeResourceId("rwlqu") - .withRemoteVolumeRegion("jfqka"); + ReplicationInner model = new ReplicationInner().withEndpointType(EndpointType.DST) + .withReplicationSchedule(ReplicationSchedule.HOURLY).withRemoteVolumeResourceId("dxunkbebxmubyyn") + .withRemoteVolumeRegion("lrb"); model = BinaryData.fromObject(model).toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); + Assertions.assertEquals(EndpointType.DST, model.endpointType()); Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); - Assertions.assertEquals("rwlqu", model.remoteVolumeResourceId()); - Assertions.assertEquals("jfqka", model.remoteVolumeRegion()); + Assertions.assertEquals("dxunkbebxmubyyn", model.remoteVolumeResourceId()); + Assertions.assertEquals("lrb", model.remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java index b8001a9a53fe..9419b3f4e815 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java @@ -6,7 +6,6 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.RemotePath; import com.azure.resourcemanager.netapp.models.ReplicationObject; import com.azure.resourcemanager.netapp.models.ReplicationSchedule; import org.junit.jupiter.api.Assertions; @@ -15,31 +14,23 @@ public final class ReplicationObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationObject model = BinaryData.fromString( - "{\"replicationId\":\"rsc\",\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"vfiwjmygtdss\",\"remotePath\":{\"externalHostName\":\"wtmwerio\",\"serverName\":\"zpyqsemwab\",\"volumeName\":\"ets\"},\"remoteVolumeRegion\":\"szhedplvw\"}") + "{\"replicationId\":\"xdult\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"tdzumveekgpw\",\"remoteVolumeRegion\":\"uh\"}") .toObject(ReplicationObject.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); - Assertions.assertEquals("vfiwjmygtdss", model.remoteVolumeResourceId()); - Assertions.assertEquals("wtmwerio", model.remotePath().externalHostname()); - Assertions.assertEquals("zpyqsemwab", model.remotePath().serverName()); - Assertions.assertEquals("ets", model.remotePath().volumeName()); - Assertions.assertEquals("szhedplvw", model.remoteVolumeRegion()); + Assertions.assertEquals(EndpointType.DST, model.endpointType()); + Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); + Assertions.assertEquals("tdzumveekgpw", model.remoteVolumeResourceId()); + Assertions.assertEquals("uh", model.remoteVolumeRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReplicationObject model = new ReplicationObject().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.HOURLY).withRemoteVolumeResourceId("vfiwjmygtdss") - .withRemotePath( - new RemotePath().withExternalHostname("wtmwerio").withServerName("zpyqsemwab").withVolumeName("ets")) - .withRemoteVolumeRegion("szhedplvw"); + ReplicationObject model = new ReplicationObject().withEndpointType(EndpointType.DST) + .withReplicationSchedule(ReplicationSchedule.DAILY).withRemoteVolumeResourceId("tdzumveekgpw") + .withRemoteVolumeRegion("uh"); model = BinaryData.fromObject(model).toObject(ReplicationObject.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); - Assertions.assertEquals("vfiwjmygtdss", model.remoteVolumeResourceId()); - Assertions.assertEquals("wtmwerio", model.remotePath().externalHostname()); - Assertions.assertEquals("zpyqsemwab", model.remotePath().serverName()); - Assertions.assertEquals("ets", model.remotePath().volumeName()); - Assertions.assertEquals("szhedplvw", model.remoteVolumeRegion()); + Assertions.assertEquals(EndpointType.DST, model.endpointType()); + Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); + Assertions.assertEquals("tdzumveekgpw", model.remoteVolumeResourceId()); + Assertions.assertEquals("uh", model.remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java index dfedc0b9ee79..d051fcfe656a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java @@ -14,25 +14,25 @@ public final class ReplicationStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationStatusInner model = BinaryData.fromString( - "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Broken\",\"totalProgress\":\"dreqnovvqf\",\"errorMessage\":\"ljxywsu\"}") + "{\"healthy\":true,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Broken\",\"totalProgress\":\"plvwiwubmwmbes\",\"errorMessage\":\"nkww\"}") .toObject(ReplicationStatusInner.class); Assertions.assertEquals(true, model.healthy()); - Assertions.assertEquals(RelationshipStatus.TRANSFERRING, model.relationshipStatus()); + Assertions.assertEquals(RelationshipStatus.FAILED, model.relationshipStatus()); Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); - Assertions.assertEquals("dreqnovvqf", model.totalProgress()); - Assertions.assertEquals("ljxywsu", model.errorMessage()); + Assertions.assertEquals("plvwiwubmwmbes", model.totalProgress()); + Assertions.assertEquals("nkww", model.errorMessage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReplicationStatusInner model - = new ReplicationStatusInner().withHealthy(true).withRelationshipStatus(RelationshipStatus.TRANSFERRING) - .withMirrorState(MirrorState.BROKEN).withTotalProgress("dreqnovvqf").withErrorMessage("ljxywsu"); + = new ReplicationStatusInner().withHealthy(true).withRelationshipStatus(RelationshipStatus.FAILED) + .withMirrorState(MirrorState.BROKEN).withTotalProgress("plvwiwubmwmbes").withErrorMessage("nkww"); model = BinaryData.fromObject(model).toObject(ReplicationStatusInner.class); Assertions.assertEquals(true, model.healthy()); - Assertions.assertEquals(RelationshipStatus.TRANSFERRING, model.relationshipStatus()); + Assertions.assertEquals(RelationshipStatus.FAILED, model.relationshipStatus()); Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); - Assertions.assertEquals("dreqnovvqf", model.totalProgress()); - Assertions.assertEquals("ljxywsu", model.errorMessage()); + Assertions.assertEquals("plvwiwubmwmbes", model.totalProgress()); + Assertions.assertEquals("nkww", model.errorMessage()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java index f11287d40181..aa690d563d2d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java @@ -11,7 +11,7 @@ public final class RestoreStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RestoreStatusInner model = BinaryData.fromString( - "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"ae\",\"errorMessage\":\"ojvdcpzfoqo\",\"totalTransferBytes\":4892524565143747736}") + "{\"healthy\":true,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"jjxd\",\"errorMessage\":\"buukzclewyhml\",\"totalTransferBytes\":4136836492530491965}") .toObject(RestoreStatusInner.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java index f5b6a9b4d9db..f3dc91ef8d80 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java @@ -12,15 +12,15 @@ public final class SnapshotInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotInner model = BinaryData.fromString( - "{\"location\":\"qgxqquezikyw\",\"properties\":{\"snapshotId\":\"kallatmel\",\"created\":\"2021-06-18T06:04:26Z\",\"provisioningState\":\"iccjzkzivgvvcna\"},\"id\":\"hyrnxxmu\",\"name\":\"edndr\",\"type\":\"v\"}") + "{\"location\":\"sg\",\"properties\":{\"snapshotId\":\"c\",\"created\":\"2021-08-29T01:48:19Z\",\"provisioningState\":\"dsjnka\"},\"id\":\"utiiswacf\",\"name\":\"gdkz\",\"type\":\"ewkfvhqcrai\"}") .toObject(SnapshotInner.class); - Assertions.assertEquals("qgxqquezikyw", model.location()); + Assertions.assertEquals("sg", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotInner model = new SnapshotInner().withLocation("qgxqquezikyw"); + SnapshotInner model = new SnapshotInner().withLocation("sg"); model = BinaryData.fromObject(model).toObject(SnapshotInner.class); - Assertions.assertEquals("qgxqquezikyw", model.location()); + Assertions.assertEquals("sg", model.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java index 1eb9ebb2b632..65ed56a34234 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java @@ -37,7 +37,7 @@ public void testCreateWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"etag\":\"tft\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1034709707,\"minute\":498260807,\"usedBytes\":5239547603354777125},\"dailySchedule\":{\"snapshotsToKeep\":1037799347,\"hour\":1872397233,\"minute\":505151536,\"usedBytes\":3502756066973311769},\"weeklySchedule\":{\"snapshotsToKeep\":1808572524,\"day\":\"ipgawtxx\",\"hour\":156137612,\"minute\":2059766507,\"usedBytes\":8743829512964463352},\"monthlySchedule\":{\"snapshotsToKeep\":607861165,\"daysOfMonth\":\"tfmpcycilrmcayk\",\"hour\":297687924,\"minute\":275753325,\"usedBytes\":3377592071635505398},\"enabled\":false,\"provisioningState\":\"xwpndfcpf\"},\"location\":\"nthjtwkjaosrxuzv\",\"tags\":{\"mgbzahgxqdlyrtl\":\"ktcqio\",\"katbhjm\":\"laprlt\",\"arvlagunbt\":\"nnbsoqeqa\",\"av\":\"febwlnbmhyreeudz\"},\"id\":\"pdqmjxlyyzglgouw\",\"name\":\"lmjjyuo\",\"type\":\"qtobaxkjeyt\"}"; + = "{\"etag\":\"vreljea\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1671689667,\"minute\":1202304870,\"usedBytes\":1705297672247999328},\"dailySchedule\":{\"snapshotsToKeep\":2073795724,\"hour\":1291910908,\"minute\":264997502,\"usedBytes\":7353815266805175635},\"weeklySchedule\":{\"snapshotsToKeep\":1178556723,\"day\":\"bdkelvidizo\",\"hour\":344121425,\"minute\":1181700002,\"usedBytes\":6191416292355922762},\"monthlySchedule\":{\"snapshotsToKeep\":1331407717,\"daysOfMonth\":\"dgnwncypuuwwlt\",\"hour\":740306752,\"minute\":1798680046,\"usedBytes\":5288027656858110726},\"enabled\":true,\"provisioningState\":\"if\"},\"location\":\"hmkdasvfl\",\"tags\":{\"oldforobw\":\"xcudchxgsr\",\"hfovvacqpbtu\":\"lvizb\"},\"id\":\"dxe\",\"name\":\"zab\",\"type\":\"elawumu\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -54,39 +54,38 @@ public void testCreateWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - SnapshotPolicy response = manager.snapshotPolicies().define("qwhix").withRegion("crwnamikz") - .withExistingNetAppAccount("gehkfkimrtixokff", "yinljqe") - .withTags(mapOf("ziqgfuh", "qbsms", "hczznvf", "kzruswh", "wwixzvumw", "ycjsx")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2089696921).withMinute(1519805829) - .withUsedBytes(4952257041034089193L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1065880701).withHour(1806892496) - .withMinute(667519337).withUsedBytes(3451295234524077317L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1949096000).withDay("b").withHour(1840305152) - .withMinute(1547135133).withUsedBytes(8260240583130824742L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(648351672).withDaysOfMonth("zcilnghg") - .withHour(403294934).withMinute(884114239).withUsedBytes(4618802136241516087L)) + SnapshotPolicy response = manager.snapshotPolicies().define("ieekpndzaa").withRegion("czexrxzbujrtrhqv") + .withExistingNetAppAccount("ttadijae", "kmr").withTags(mapOf("gnl", "vk")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(517735759).withMinute(161734406) + .withUsedBytes(5927921282145979607L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(606462246).withHour(619135714) + .withMinute(310350754).withUsedBytes(8944608160105267933L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(203387229).withDay("hheioqaqhvseuf") + .withHour(695023637).withMinute(703231006).withUsedBytes(6853300792215489751L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1303034345).withDaysOfMonth("sismjqfrddga") + .withHour(15155929).withMinute(1363527870).withUsedBytes(490169068933879788L)) .withEnabled(false).create(); - Assertions.assertEquals("nthjtwkjaosrxuzv", response.location()); - Assertions.assertEquals("ktcqio", response.tags().get("mgbzahgxqdlyrtl")); - Assertions.assertEquals(1034709707, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(498260807, response.hourlySchedule().minute()); - Assertions.assertEquals(5239547603354777125L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1037799347, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1872397233, response.dailySchedule().hour()); - Assertions.assertEquals(505151536, response.dailySchedule().minute()); - Assertions.assertEquals(3502756066973311769L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(1808572524, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("ipgawtxx", response.weeklySchedule().day()); - Assertions.assertEquals(156137612, response.weeklySchedule().hour()); - Assertions.assertEquals(2059766507, response.weeklySchedule().minute()); - Assertions.assertEquals(8743829512964463352L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(607861165, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("tfmpcycilrmcayk", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(297687924, response.monthlySchedule().hour()); - Assertions.assertEquals(275753325, response.monthlySchedule().minute()); - Assertions.assertEquals(3377592071635505398L, response.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, response.enabled()); + Assertions.assertEquals("hmkdasvfl", response.location()); + Assertions.assertEquals("xcudchxgsr", response.tags().get("oldforobw")); + Assertions.assertEquals(1671689667, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1202304870, response.hourlySchedule().minute()); + Assertions.assertEquals(1705297672247999328L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(2073795724, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1291910908, response.dailySchedule().hour()); + Assertions.assertEquals(264997502, response.dailySchedule().minute()); + Assertions.assertEquals(7353815266805175635L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(1178556723, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("bdkelvidizo", response.weeklySchedule().day()); + Assertions.assertEquals(344121425, response.weeklySchedule().hour()); + Assertions.assertEquals(1181700002, response.weeklySchedule().minute()); + Assertions.assertEquals(6191416292355922762L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1331407717, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("dgnwncypuuwwlt", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(740306752, response.monthlySchedule().hour()); + Assertions.assertEquals(1798680046, response.monthlySchedule().minute()); + Assertions.assertEquals(5288027656858110726L, response.monthlySchedule().usedBytes()); + Assertions.assertEquals(true, response.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java index 36d7fe2c6d17..6250fc357c58 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java @@ -45,7 +45,7 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.snapshotPolicies().delete("zvaylptrsqqw", "tcmwqkchc", "waxfewzjkj", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("jpdn", "zhajoylhjlmuo", "xprimrsop", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java index cd7fb86888d7..7f4c59a96276 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"etag\":\"qihebw\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":730785712,\"minute\":1832502698,\"usedBytes\":3351326267748259519},\"dailySchedule\":{\"snapshotsToKeep\":1527664829,\"hour\":770460161,\"minute\":307322349,\"usedBytes\":8212495412619748670},\"weeklySchedule\":{\"snapshotsToKeep\":87980458,\"day\":\"lisdjubggbq\",\"hour\":1820494144,\"minute\":2003917859,\"usedBytes\":5918202422727737393},\"monthlySchedule\":{\"snapshotsToKeep\":1063611109,\"daysOfMonth\":\"gacyrcmjdmspo\",\"hour\":361382788,\"minute\":283706298,\"usedBytes\":2234682115333576707},\"enabled\":false,\"provisioningState\":\"ofrzgb\"},\"location\":\"edm\",\"tags\":{\"nsnvpd\":\"vnlvxbcuiiznktwf\",\"z\":\"bmikost\",\"fy\":\"kiwbuqnyoph\",\"elfwy\":\"sgcrpfbcunezzce\"},\"id\":\"wl\",\"name\":\"xjwet\",\"type\":\"psihcla\"}"; + = "{\"etag\":\"edxihchrphkmcrj\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":589779398,\"minute\":531525679,\"usedBytes\":5888369763357785786},\"dailySchedule\":{\"snapshotsToKeep\":95470507,\"hour\":259124213,\"minute\":1290363462,\"usedBytes\":217902170113592881},\"weeklySchedule\":{\"snapshotsToKeep\":810731058,\"day\":\"utlwxezwzhok\",\"hour\":1775135679,\"minute\":278626218,\"usedBytes\":1768563471315587827},\"monthlySchedule\":{\"snapshotsToKeep\":1214606185,\"daysOfMonth\":\"gppipifh\",\"hour\":248320498,\"minute\":1885635288,\"usedBytes\":6741191716385680342},\"enabled\":false,\"provisioningState\":\"xjcsheafidltu\"},\"location\":\"resmkssjhoiftxfk\",\"tags\":{\"ptil\":\"gpr\",\"qtgdqohmcwsl\":\"ucb\",\"tpwb\":\"riz\"},\"id\":\"a\",\"name\":\"llibphbqzmizak\",\"type\":\"kan\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,27 +49,27 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); SnapshotPolicy response = manager.snapshotPolicies() - .getWithResponse("wwinhehf", "pofvwb", "blembnkbwvqvxkd", com.azure.core.util.Context.NONE).getValue(); + .getWithResponse("nwm", "tmvpdvjdhtt", "a", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("edm", response.location()); - Assertions.assertEquals("vnlvxbcuiiznktwf", response.tags().get("nsnvpd")); - Assertions.assertEquals(730785712, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1832502698, response.hourlySchedule().minute()); - Assertions.assertEquals(3351326267748259519L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1527664829, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(770460161, response.dailySchedule().hour()); - Assertions.assertEquals(307322349, response.dailySchedule().minute()); - Assertions.assertEquals(8212495412619748670L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(87980458, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("lisdjubggbq", response.weeklySchedule().day()); - Assertions.assertEquals(1820494144, response.weeklySchedule().hour()); - Assertions.assertEquals(2003917859, response.weeklySchedule().minute()); - Assertions.assertEquals(5918202422727737393L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1063611109, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gacyrcmjdmspo", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(361382788, response.monthlySchedule().hour()); - Assertions.assertEquals(283706298, response.monthlySchedule().minute()); - Assertions.assertEquals(2234682115333576707L, response.monthlySchedule().usedBytes()); + Assertions.assertEquals("resmkssjhoiftxfk", response.location()); + Assertions.assertEquals("gpr", response.tags().get("ptil")); + Assertions.assertEquals(589779398, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(531525679, response.hourlySchedule().minute()); + Assertions.assertEquals(5888369763357785786L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(95470507, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(259124213, response.dailySchedule().hour()); + Assertions.assertEquals(1290363462, response.dailySchedule().minute()); + Assertions.assertEquals(217902170113592881L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(810731058, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("utlwxezwzhok", response.weeklySchedule().day()); + Assertions.assertEquals(1775135679, response.weeklySchedule().hour()); + Assertions.assertEquals(278626218, response.weeklySchedule().minute()); + Assertions.assertEquals(1768563471315587827L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1214606185, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("gppipifh", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(248320498, response.monthlySchedule().hour()); + Assertions.assertEquals(1885635288, response.monthlySchedule().minute()); + Assertions.assertEquals(6741191716385680342L, response.monthlySchedule().usedBytes()); Assertions.assertEquals(false, response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java index 4804fc312f19..241275148a1f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"etag\":\"ltyjedexxmlfmk\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1445110632,\"minute\":1734867159,\"usedBytes\":3494695317807035352},\"dailySchedule\":{\"snapshotsToKeep\":16143450,\"hour\":810465454,\"minute\":400870213,\"usedBytes\":5532317119730945052},\"weeklySchedule\":{\"snapshotsToKeep\":1757124194,\"day\":\"xcushs\",\"hour\":1333151238,\"minute\":107973649,\"usedBytes\":4154943067306073010},\"monthlySchedule\":{\"snapshotsToKeep\":666736445,\"daysOfMonth\":\"vgsgzwywakoihkn\",\"hour\":874789657,\"minute\":1233115603,\"usedBytes\":2710381116141094215},\"enabled\":true,\"provisioningState\":\"ymzotqyryuzcbmq\"},\"location\":\"xmvwfg\",\"tags\":{\"supe\":\"xo\",\"sqltnzo\":\"jlzqnhc\"},\"id\":\"bgsxgnxfyqonmpq\",\"name\":\"xwdofdb\",\"type\":\"iqxeiiqbimht\"}]}"; + = "{\"value\":[{\"etag\":\"prtujwsawdd\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1148238938,\"minute\":149022358,\"usedBytes\":6958305132617717680},\"dailySchedule\":{\"snapshotsToKeep\":177247655,\"hour\":1297733750,\"minute\":1671083084,\"usedBytes\":8033750853148480276},\"weeklySchedule\":{\"snapshotsToKeep\":1119410287,\"day\":\"glecdmdqbwpypq\",\"hour\":543854908,\"minute\":1969231562,\"usedBytes\":7692078568165207428},\"monthlySchedule\":{\"snapshotsToKeep\":1318047091,\"daysOfMonth\":\"xudb\",\"hour\":1229147679,\"minute\":1337444270,\"usedBytes\":5506706101384890254},\"enabled\":true,\"provisioningState\":\"dhzmmesckdlp\"},\"location\":\"zrcxfailcfxwmdbo\",\"tags\":{\"ckknhxkizvy\":\"gsftufqobrjlnacg\",\"nok\":\"nrzvuljraaer\",\"a\":\"gukkjqnvbroy\"},\"id\":\"xulcdisdos\",\"name\":\"jbjsvgjrwh\",\"type\":\"yvycytdclxgcckn\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,27 +50,27 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.snapshotPolicies().list("lkafhonqjuje", "ckpzvcpopmxeln", com.azure.core.util.Context.NONE); + = manager.snapshotPolicies().list("vecuijpx", "xs", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xmvwfg", response.iterator().next().location()); - Assertions.assertEquals("xo", response.iterator().next().tags().get("supe")); - Assertions.assertEquals(1445110632, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1734867159, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(3494695317807035352L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(16143450, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(810465454, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(400870213, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(5532317119730945052L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(1757124194, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xcushs", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(1333151238, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(107973649, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(4154943067306073010L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(666736445, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("vgsgzwywakoihkn", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(874789657, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(1233115603, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(2710381116141094215L, response.iterator().next().monthlySchedule().usedBytes()); + Assertions.assertEquals("zrcxfailcfxwmdbo", response.iterator().next().location()); + Assertions.assertEquals("gsftufqobrjlnacg", response.iterator().next().tags().get("ckknhxkizvy")); + Assertions.assertEquals(1148238938, response.iterator().next().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(149022358, response.iterator().next().hourlySchedule().minute()); + Assertions.assertEquals(6958305132617717680L, response.iterator().next().hourlySchedule().usedBytes()); + Assertions.assertEquals(177247655, response.iterator().next().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1297733750, response.iterator().next().dailySchedule().hour()); + Assertions.assertEquals(1671083084, response.iterator().next().dailySchedule().minute()); + Assertions.assertEquals(8033750853148480276L, response.iterator().next().dailySchedule().usedBytes()); + Assertions.assertEquals(1119410287, response.iterator().next().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("glecdmdqbwpypq", response.iterator().next().weeklySchedule().day()); + Assertions.assertEquals(543854908, response.iterator().next().weeklySchedule().hour()); + Assertions.assertEquals(1969231562, response.iterator().next().weeklySchedule().minute()); + Assertions.assertEquals(7692078568165207428L, response.iterator().next().weeklySchedule().usedBytes()); + Assertions.assertEquals(1318047091, response.iterator().next().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("xudb", response.iterator().next().monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1229147679, response.iterator().next().monthlySchedule().hour()); + Assertions.assertEquals(1337444270, response.iterator().next().monthlySchedule().minute()); + Assertions.assertEquals(5506706101384890254L, response.iterator().next().monthlySchedule().usedBytes()); Assertions.assertEquals(true, response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java index 3276353bb715..270e828dfb2a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java @@ -20,63 +20,100 @@ public final class SnapshotPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"kghimdblxgwimfnj\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":510557599,\"minute\":1675220188,\"usedBytes\":1198847986383751038},\"dailySchedule\":{\"snapshotsToKeep\":1767053067,\"hour\":739435613,\"minute\":1563203885,\"usedBytes\":8338807266312513089},\"weeklySchedule\":{\"snapshotsToKeep\":1648570452,\"day\":\"aw\",\"hour\":113630721,\"minute\":841259449,\"usedBytes\":9051460600298746000},\"monthlySchedule\":{\"snapshotsToKeep\":220414413,\"daysOfMonth\":\"c\",\"hour\":1974208739,\"minute\":833171610,\"usedBytes\":2411008459227076557},\"enabled\":true,\"provisioningState\":\"abfatkl\"},\"location\":\"xbjhwuaanozjosph\",\"tags\":{\"jrvxaglrv\":\"l\",\"tcs\":\"mjwosytx\"},\"id\":\"fcktqumiekke\",\"name\":\"zikhl\",\"type\":\"fjhdg\"}]}") + "{\"value\":[{\"etag\":\"qdcvdrhvoo\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1193557953,\"minute\":1582782062,\"usedBytes\":2322318888299695987},\"dailySchedule\":{\"snapshotsToKeep\":1146790818,\"hour\":542490098,\"minute\":546984067,\"usedBytes\":8637599636999601474},\"weeklySchedule\":{\"snapshotsToKeep\":363113472,\"day\":\"xcxrsl\",\"hour\":1073132708,\"minute\":2107317095,\"usedBytes\":1317249364545510720},\"monthlySchedule\":{\"snapshotsToKeep\":1828084006,\"daysOfMonth\":\"hjwniyqsluic\",\"hour\":1043474675,\"minute\":1810528552,\"usedBytes\":2246531138644222618},\"enabled\":true,\"provisioningState\":\"mpaxmodfvuefywsb\"},\"location\":\"vmwy\",\"tags\":{\"wiyzvqtmnubexkp\":\"ouyftaakc\",\"mquxvypo\":\"ksmond\"},\"id\":\"gkopkwhojvpajqgx\",\"name\":\"smocmbq\",\"type\":\"qvmkcxo\"},{\"etag\":\"pvhelxprg\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1689859600,\"minute\":1462356590,\"usedBytes\":6814865152361254049},\"dailySchedule\":{\"snapshotsToKeep\":2028979165,\"hour\":1827810592,\"minute\":465544934,\"usedBytes\":8371977725942992913},\"weeklySchedule\":{\"snapshotsToKeep\":785036468,\"day\":\"rhos\",\"hour\":341443712,\"minute\":992326017,\"usedBytes\":7744101608598421858},\"monthlySchedule\":{\"snapshotsToKeep\":5318116,\"daysOfMonth\":\"m\",\"hour\":812505700,\"minute\":1391684752,\"usedBytes\":5425852562349977071},\"enabled\":true,\"provisioningState\":\"szdtmhrkwof\"},\"location\":\"voqacpiexpbt\",\"tags\":{\"tkcnqxwb\":\"bwoenwashrt\"},\"id\":\"okulpiujwa\",\"name\":\"sipqii\",\"type\":\"byuqerpqlp\"},{\"etag\":\"cciuqgbdbutau\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1305719459,\"minute\":1787121852,\"usedBytes\":3230556425991226007},\"dailySchedule\":{\"snapshotsToKeep\":1745648414,\"hour\":537605324,\"minute\":1183832331,\"usedBytes\":3465382466938026517},\"weeklySchedule\":{\"snapshotsToKeep\":2073837951,\"day\":\"pichkoymkcdy\",\"hour\":1322696494,\"minute\":556339960,\"usedBytes\":6135641576986595049},\"monthlySchedule\":{\"snapshotsToKeep\":88319304,\"daysOfMonth\":\"ovvqfovljxywsu\",\"hour\":678747249,\"minute\":188945883,\"usedBytes\":1595532838454650942},\"enabled\":true,\"provisioningState\":\"adgvraeaene\"},\"location\":\"zar\",\"tags\":{\"uijfqk\":\"q\",\"ibwwiftohqkv\":\"cewiipfpub\",\"ljphuopxodl\":\"uvksgplsaknynfsy\",\"sjswsrms\":\"iyntorzihle\"},\"id\":\"yzrpzbchckqqzq\",\"name\":\"ox\",\"type\":\"ysuiizynkedya\"},{\"etag\":\"wyhqmibzyhwits\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1679951474,\"minute\":740699984,\"usedBytes\":4085302065865673737},\"dailySchedule\":{\"snapshotsToKeep\":846796617,\"hour\":1107344942,\"minute\":998287381,\"usedBytes\":359022541227333751},\"weeklySchedule\":{\"snapshotsToKeep\":1572322989,\"day\":\"knso\",\"hour\":1498450316,\"minute\":1807799282,\"usedBytes\":7538220819901034139},\"monthlySchedule\":{\"snapshotsToKeep\":706339919,\"daysOfMonth\":\"rlkdmtncvokotl\",\"hour\":44844899,\"minute\":11976377,\"usedBytes\":8627603791684452412},\"enabled\":true,\"provisioningState\":\"gjltdtbnnhado\"},\"location\":\"rkvcikhnvpa\",\"tags\":{\"queziky\":\"x\",\"ccjzkzivgvv\":\"ggxkallatmelwuip\",\"rdvstkwqqtch\":\"nayrhyrnxxmueedn\"},\"id\":\"alm\",\"name\":\"mtdaa\",\"type\":\"gdv\"}]}") .toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("xbjhwuaanozjosph", model.value().get(0).location()); - Assertions.assertEquals("l", model.value().get(0).tags().get("jrvxaglrv")); - Assertions.assertEquals(510557599, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1675220188, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(1198847986383751038L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(1767053067, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(739435613, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(1563203885, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(8338807266312513089L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(1648570452, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("aw", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(113630721, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(841259449, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(9051460600298746000L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(220414413, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("c", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1974208739, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(833171610, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(2411008459227076557L, model.value().get(0).monthlySchedule().usedBytes()); + Assertions.assertEquals("vmwy", model.value().get(0).location()); + Assertions.assertEquals("ouyftaakc", model.value().get(0).tags().get("wiyzvqtmnubexkp")); + Assertions.assertEquals(1193557953, model.value().get(0).hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1582782062, model.value().get(0).hourlySchedule().minute()); + Assertions.assertEquals(2322318888299695987L, model.value().get(0).hourlySchedule().usedBytes()); + Assertions.assertEquals(1146790818, model.value().get(0).dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(542490098, model.value().get(0).dailySchedule().hour()); + Assertions.assertEquals(546984067, model.value().get(0).dailySchedule().minute()); + Assertions.assertEquals(8637599636999601474L, model.value().get(0).dailySchedule().usedBytes()); + Assertions.assertEquals(363113472, model.value().get(0).weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xcxrsl", model.value().get(0).weeklySchedule().day()); + Assertions.assertEquals(1073132708, model.value().get(0).weeklySchedule().hour()); + Assertions.assertEquals(2107317095, model.value().get(0).weeklySchedule().minute()); + Assertions.assertEquals(1317249364545510720L, model.value().get(0).weeklySchedule().usedBytes()); + Assertions.assertEquals(1828084006, model.value().get(0).monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("hjwniyqsluic", model.value().get(0).monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1043474675, model.value().get(0).monthlySchedule().hour()); + Assertions.assertEquals(1810528552, model.value().get(0).monthlySchedule().minute()); + Assertions.assertEquals(2246531138644222618L, model.value().get(0).monthlySchedule().usedBytes()); Assertions.assertEquals(true, model.value().get(0).enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPoliciesList model = new SnapshotPoliciesList().withValue(Arrays.asList(new SnapshotPolicyInner() - .withLocation("xbjhwuaanozjosph").withTags(mapOf("jrvxaglrv", "l", "tcs", "mjwosytx")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(510557599).withMinute(1675220188) - .withUsedBytes(1198847986383751038L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1767053067).withHour(739435613) - .withMinute(1563203885).withUsedBytes(8338807266312513089L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1648570452).withDay("aw").withHour(113630721) - .withMinute(841259449).withUsedBytes(9051460600298746000L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(220414413).withDaysOfMonth("c") - .withHour(1974208739).withMinute(833171610).withUsedBytes(2411008459227076557L)) - .withEnabled(true))); + SnapshotPoliciesList model = new SnapshotPoliciesList().withValue(Arrays.asList( + new SnapshotPolicyInner().withLocation("vmwy") + .withTags(mapOf("wiyzvqtmnubexkp", "ouyftaakc", "mquxvypo", "ksmond")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1193557953).withMinute(1582782062) + .withUsedBytes(2322318888299695987L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1146790818).withHour(542490098) + .withMinute(546984067).withUsedBytes(8637599636999601474L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(363113472).withDay("xcxrsl") + .withHour(1073132708).withMinute(2107317095).withUsedBytes(1317249364545510720L)) + .withMonthlySchedule( + new MonthlySchedule().withSnapshotsToKeep(1828084006).withDaysOfMonth("hjwniyqsluic") + .withHour(1043474675).withMinute(1810528552).withUsedBytes(2246531138644222618L)) + .withEnabled(true), + new SnapshotPolicyInner().withLocation("voqacpiexpbt").withTags(mapOf("tkcnqxwb", "bwoenwashrt")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1689859600).withMinute(1462356590) + .withUsedBytes(6814865152361254049L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(2028979165).withHour(1827810592) + .withMinute(465544934).withUsedBytes(8371977725942992913L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(785036468).withDay("rhos") + .withHour(341443712).withMinute(992326017).withUsedBytes(7744101608598421858L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(5318116).withDaysOfMonth("m") + .withHour(812505700).withMinute(1391684752).withUsedBytes(5425852562349977071L)) + .withEnabled(true), + new SnapshotPolicyInner().withLocation("zar") + .withTags(mapOf("uijfqk", "q", "ibwwiftohqkv", "cewiipfpub", "ljphuopxodl", "uvksgplsaknynfsy", + "sjswsrms", "iyntorzihle")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1305719459).withMinute(1787121852) + .withUsedBytes(3230556425991226007L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1745648414).withHour(537605324) + .withMinute(1183832331).withUsedBytes(3465382466938026517L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(2073837951).withDay("pichkoymkcdy") + .withHour(1322696494).withMinute(556339960).withUsedBytes(6135641576986595049L)) + .withMonthlySchedule( + new MonthlySchedule().withSnapshotsToKeep(88319304).withDaysOfMonth("ovvqfovljxywsu") + .withHour(678747249).withMinute(188945883).withUsedBytes(1595532838454650942L)) + .withEnabled(true), + new SnapshotPolicyInner().withLocation("rkvcikhnvpa") + .withTags(mapOf("queziky", "x", "ccjzkzivgvv", "ggxkallatmelwuip", "rdvstkwqqtch", "nayrhyrnxxmueedn")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1679951474).withMinute(740699984) + .withUsedBytes(4085302065865673737L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(846796617).withHour(1107344942) + .withMinute(998287381).withUsedBytes(359022541227333751L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1572322989).withDay("knso") + .withHour(1498450316).withMinute(1807799282).withUsedBytes(7538220819901034139L)) + .withMonthlySchedule( + new MonthlySchedule().withSnapshotsToKeep(706339919).withDaysOfMonth("rlkdmtncvokotl") + .withHour(44844899).withMinute(11976377).withUsedBytes(8627603791684452412L)) + .withEnabled(true))); model = BinaryData.fromObject(model).toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("xbjhwuaanozjosph", model.value().get(0).location()); - Assertions.assertEquals("l", model.value().get(0).tags().get("jrvxaglrv")); - Assertions.assertEquals(510557599, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1675220188, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(1198847986383751038L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(1767053067, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(739435613, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(1563203885, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(8338807266312513089L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(1648570452, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("aw", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(113630721, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(841259449, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(9051460600298746000L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(220414413, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("c", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1974208739, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(833171610, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(2411008459227076557L, model.value().get(0).monthlySchedule().usedBytes()); + Assertions.assertEquals("vmwy", model.value().get(0).location()); + Assertions.assertEquals("ouyftaakc", model.value().get(0).tags().get("wiyzvqtmnubexkp")); + Assertions.assertEquals(1193557953, model.value().get(0).hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1582782062, model.value().get(0).hourlySchedule().minute()); + Assertions.assertEquals(2322318888299695987L, model.value().get(0).hourlySchedule().usedBytes()); + Assertions.assertEquals(1146790818, model.value().get(0).dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(542490098, model.value().get(0).dailySchedule().hour()); + Assertions.assertEquals(546984067, model.value().get(0).dailySchedule().minute()); + Assertions.assertEquals(8637599636999601474L, model.value().get(0).dailySchedule().usedBytes()); + Assertions.assertEquals(363113472, model.value().get(0).weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xcxrsl", model.value().get(0).weeklySchedule().day()); + Assertions.assertEquals(1073132708, model.value().get(0).weeklySchedule().hour()); + Assertions.assertEquals(2107317095, model.value().get(0).weeklySchedule().minute()); + Assertions.assertEquals(1317249364545510720L, model.value().get(0).weeklySchedule().usedBytes()); + Assertions.assertEquals(1828084006, model.value().get(0).monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("hjwniyqsluic", model.value().get(0).monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1043474675, model.value().get(0).monthlySchedule().hour()); + Assertions.assertEquals(1810528552, model.value().get(0).monthlySchedule().minute()); + Assertions.assertEquals(2246531138644222618L, model.value().get(0).monthlySchedule().usedBytes()); Assertions.assertEquals(true, model.value().get(0).enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java index 31379b3ef795..7293f7f449e8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java @@ -18,63 +18,63 @@ public final class SnapshotPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyInner model = BinaryData.fromString( - "{\"etag\":\"gebdunygaeq\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1475802306,\"minute\":1233334035,\"usedBytes\":6620237582798297782},\"dailySchedule\":{\"snapshotsToKeep\":48002498,\"hour\":1459715111,\"minute\":2063960908,\"usedBytes\":8725801999952390480},\"weeklySchedule\":{\"snapshotsToKeep\":1120671201,\"day\":\"arm\",\"hour\":1679294493,\"minute\":522176461,\"usedBytes\":7091421984194372162},\"monthlySchedule\":{\"snapshotsToKeep\":1756269391,\"daysOfMonth\":\"yxxrwlycoduh\",\"hour\":1842821288,\"minute\":1440361385,\"usedBytes\":4645704067973725569},\"enabled\":true,\"provisioningState\":\"n\"},\"location\":\"xqugjhkycubedd\",\"tags\":{\"zqalkrmnjijpx\":\"ofwq\",\"byxbaaabjy\":\"cqqudf\",\"zrtuzq\":\"ayffim\",\"fdnw\":\"gsexne\"},\"id\":\"wmewzsyy\",\"name\":\"euzsoi\",\"type\":\"judpfrxt\"}") + "{\"etag\":\"gpiohgwxrtfudxe\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1902888428,\"minute\":682770513,\"usedBytes\":5596269908877645907},\"dailySchedule\":{\"snapshotsToKeep\":1104557585,\"hour\":128514806,\"minute\":1947559864,\"usedBytes\":6566741920348285642},\"weeklySchedule\":{\"snapshotsToKeep\":2068705398,\"day\":\"xgwim\",\"hour\":1697714955,\"minute\":1799565782,\"usedBytes\":2192828191882361978},\"monthlySchedule\":{\"snapshotsToKeep\":279128548,\"daysOfMonth\":\"kfoqreyfkzikfj\",\"hour\":195683064,\"minute\":113630721,\"usedBytes\":3613181819399504746},\"enabled\":true,\"provisioningState\":\"elpcirelsfeaenwa\"},\"location\":\"atklddxbjhwuaa\",\"tags\":{\"hyoulpjr\":\"jos\",\"vimjwos\":\"xagl\"},\"id\":\"tx\",\"name\":\"tcs\",\"type\":\"fcktqumiekke\"}") .toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("xqugjhkycubedd", model.location()); - Assertions.assertEquals("ofwq", model.tags().get("zqalkrmnjijpx")); - Assertions.assertEquals(1475802306, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1233334035, model.hourlySchedule().minute()); - Assertions.assertEquals(6620237582798297782L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(48002498, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1459715111, model.dailySchedule().hour()); - Assertions.assertEquals(2063960908, model.dailySchedule().minute()); - Assertions.assertEquals(8725801999952390480L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1120671201, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("arm", model.weeklySchedule().day()); - Assertions.assertEquals(1679294493, model.weeklySchedule().hour()); - Assertions.assertEquals(522176461, model.weeklySchedule().minute()); - Assertions.assertEquals(7091421984194372162L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1756269391, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("yxxrwlycoduh", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1842821288, model.monthlySchedule().hour()); - Assertions.assertEquals(1440361385, model.monthlySchedule().minute()); - Assertions.assertEquals(4645704067973725569L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("atklddxbjhwuaa", model.location()); + Assertions.assertEquals("jos", model.tags().get("hyoulpjr")); + Assertions.assertEquals(1902888428, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(682770513, model.hourlySchedule().minute()); + Assertions.assertEquals(5596269908877645907L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1104557585, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(128514806, model.dailySchedule().hour()); + Assertions.assertEquals(1947559864, model.dailySchedule().minute()); + Assertions.assertEquals(6566741920348285642L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(2068705398, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xgwim", model.weeklySchedule().day()); + Assertions.assertEquals(1697714955, model.weeklySchedule().hour()); + Assertions.assertEquals(1799565782, model.weeklySchedule().minute()); + Assertions.assertEquals(2192828191882361978L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(279128548, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("kfoqreyfkzikfj", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(195683064, model.monthlySchedule().hour()); + Assertions.assertEquals(113630721, model.monthlySchedule().minute()); + Assertions.assertEquals(3613181819399504746L, model.monthlySchedule().usedBytes()); Assertions.assertEquals(true, model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("xqugjhkycubedd") - .withTags(mapOf("zqalkrmnjijpx", "ofwq", "byxbaaabjy", "cqqudf", "zrtuzq", "ayffim", "fdnw", "gsexne")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1475802306).withMinute(1233334035) - .withUsedBytes(6620237582798297782L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(48002498).withHour(1459715111) - .withMinute(2063960908).withUsedBytes(8725801999952390480L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1120671201).withDay("arm").withHour(1679294493) - .withMinute(522176461).withUsedBytes(7091421984194372162L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1756269391).withDaysOfMonth("yxxrwlycoduh") - .withHour(1842821288).withMinute(1440361385).withUsedBytes(4645704067973725569L)) + SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("atklddxbjhwuaa") + .withTags(mapOf("hyoulpjr", "jos", "vimjwos", "xagl")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1902888428).withMinute(682770513) + .withUsedBytes(5596269908877645907L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1104557585).withHour(128514806) + .withMinute(1947559864).withUsedBytes(6566741920348285642L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(2068705398).withDay("xgwim") + .withHour(1697714955).withMinute(1799565782).withUsedBytes(2192828191882361978L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(279128548).withDaysOfMonth("kfoqreyfkzikfj") + .withHour(195683064).withMinute(113630721).withUsedBytes(3613181819399504746L)) .withEnabled(true); model = BinaryData.fromObject(model).toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("xqugjhkycubedd", model.location()); - Assertions.assertEquals("ofwq", model.tags().get("zqalkrmnjijpx")); - Assertions.assertEquals(1475802306, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1233334035, model.hourlySchedule().minute()); - Assertions.assertEquals(6620237582798297782L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(48002498, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1459715111, model.dailySchedule().hour()); - Assertions.assertEquals(2063960908, model.dailySchedule().minute()); - Assertions.assertEquals(8725801999952390480L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1120671201, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("arm", model.weeklySchedule().day()); - Assertions.assertEquals(1679294493, model.weeklySchedule().hour()); - Assertions.assertEquals(522176461, model.weeklySchedule().minute()); - Assertions.assertEquals(7091421984194372162L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1756269391, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("yxxrwlycoduh", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1842821288, model.monthlySchedule().hour()); - Assertions.assertEquals(1440361385, model.monthlySchedule().minute()); - Assertions.assertEquals(4645704067973725569L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("atklddxbjhwuaa", model.location()); + Assertions.assertEquals("jos", model.tags().get("hyoulpjr")); + Assertions.assertEquals(1902888428, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(682770513, model.hourlySchedule().minute()); + Assertions.assertEquals(5596269908877645907L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1104557585, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(128514806, model.dailySchedule().hour()); + Assertions.assertEquals(1947559864, model.dailySchedule().minute()); + Assertions.assertEquals(6566741920348285642L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(2068705398, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xgwim", model.weeklySchedule().day()); + Assertions.assertEquals(1697714955, model.weeklySchedule().hour()); + Assertions.assertEquals(1799565782, model.weeklySchedule().minute()); + Assertions.assertEquals(2192828191882361978L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(279128548, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("kfoqreyfkzikfj", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(195683064, model.monthlySchedule().hour()); + Assertions.assertEquals(113630721, model.monthlySchedule().minute()); + Assertions.assertEquals(3613181819399504746L, model.monthlySchedule().usedBytes()); Assertions.assertEquals(true, model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java index 663595a4d3fd..6593c1948ac9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java @@ -18,64 +18,64 @@ public final class SnapshotPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyPatch model = BinaryData.fromString( - "{\"location\":\"gaowpulpqblylsyx\",\"id\":\"jnsjervtiagxsd\",\"name\":\"uem\",\"type\":\"bzkfzbeyvpn\",\"tags\":{\"xdxr\":\"vinvkj\",\"aztz\":\"uukzclewyhmlw\",\"yq\":\"ofncckwyfzqwhxxb\",\"ztppriolxorjalto\":\"xzfe\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":618891293,\"minute\":1429171965,\"usedBytes\":6564772827394590293},\"dailySchedule\":{\"snapshotsToKeep\":1051180868,\"hour\":1806206586,\"minute\":358085488,\"usedBytes\":1296933680465064139},\"weeklySchedule\":{\"snapshotsToKeep\":1589501712,\"day\":\"pfuvglsbjjca\",\"hour\":1995846414,\"minute\":1075232734,\"usedBytes\":652867049720214090},\"monthlySchedule\":{\"snapshotsToKeep\":1601872964,\"daysOfMonth\":\"cormr\",\"hour\":1360670450,\"minute\":1954508595,\"usedBytes\":2688344690599449184},\"enabled\":false,\"provisioningState\":\"lvkgju\"}}") + "{\"location\":\"bjyvay\",\"id\":\"imrzrtuzqog\",\"name\":\"xnevfdnwn\",\"type\":\"ewzsyyceuzsoib\",\"tags\":{\"dwkqbrq\":\"pfrxtrthzvay\",\"irqtdqoa\":\"bpaxhexiilivpdt\",\"eptra\":\"oruzfgsquyfxrxx\",\"wlwnwxuqlcv\":\"xje\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1148696906,\"minute\":1248229075,\"usedBytes\":1507224315581735893},\"dailySchedule\":{\"snapshotsToKeep\":1080524607,\"hour\":1614496522,\"minute\":77495916,\"usedBytes\":1911538746456059968},\"weeklySchedule\":{\"snapshotsToKeep\":1225956555,\"day\":\"ujhemmsbvdkcrodt\",\"hour\":1997229408,\"minute\":291950475,\"usedBytes\":6410034847924566454},\"monthlySchedule\":{\"snapshotsToKeep\":896449803,\"daysOfMonth\":\"cjvefkdlfo\",\"hour\":1252976241,\"minute\":1706699033,\"usedBytes\":5309095811404897814},\"enabled\":false,\"provisioningState\":\"wpu\"}}") .toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("gaowpulpqblylsyx", model.location()); - Assertions.assertEquals("vinvkj", model.tags().get("xdxr")); - Assertions.assertEquals(618891293, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1429171965, model.hourlySchedule().minute()); - Assertions.assertEquals(6564772827394590293L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1051180868, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1806206586, model.dailySchedule().hour()); - Assertions.assertEquals(358085488, model.dailySchedule().minute()); - Assertions.assertEquals(1296933680465064139L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1589501712, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("pfuvglsbjjca", model.weeklySchedule().day()); - Assertions.assertEquals(1995846414, model.weeklySchedule().hour()); - Assertions.assertEquals(1075232734, model.weeklySchedule().minute()); - Assertions.assertEquals(652867049720214090L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1601872964, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("cormr", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1360670450, model.monthlySchedule().hour()); - Assertions.assertEquals(1954508595, model.monthlySchedule().minute()); - Assertions.assertEquals(2688344690599449184L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("bjyvay", model.location()); + Assertions.assertEquals("pfrxtrthzvay", model.tags().get("dwkqbrq")); + Assertions.assertEquals(1148696906, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1248229075, model.hourlySchedule().minute()); + Assertions.assertEquals(1507224315581735893L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1080524607, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1614496522, model.dailySchedule().hour()); + Assertions.assertEquals(77495916, model.dailySchedule().minute()); + Assertions.assertEquals(1911538746456059968L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1225956555, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("ujhemmsbvdkcrodt", model.weeklySchedule().day()); + Assertions.assertEquals(1997229408, model.weeklySchedule().hour()); + Assertions.assertEquals(291950475, model.weeklySchedule().minute()); + Assertions.assertEquals(6410034847924566454L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(896449803, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("cjvefkdlfo", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1252976241, model.monthlySchedule().hour()); + Assertions.assertEquals(1706699033, model.monthlySchedule().minute()); + Assertions.assertEquals(5309095811404897814L, model.monthlySchedule().usedBytes()); Assertions.assertEquals(false, model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("gaowpulpqblylsyx") - .withTags( - mapOf("xdxr", "vinvkj", "aztz", "uukzclewyhmlw", "yq", "ofncckwyfzqwhxxb", "ztppriolxorjalto", "xzfe")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(618891293).withMinute(1429171965) - .withUsedBytes(6564772827394590293L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1051180868).withHour(1806206586) - .withMinute(358085488).withUsedBytes(1296933680465064139L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1589501712).withDay("pfuvglsbjjca") - .withHour(1995846414).withMinute(1075232734).withUsedBytes(652867049720214090L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1601872964).withDaysOfMonth("cormr") - .withHour(1360670450).withMinute(1954508595).withUsedBytes(2688344690599449184L)) + SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("bjyvay") + .withTags(mapOf("dwkqbrq", "pfrxtrthzvay", "irqtdqoa", "bpaxhexiilivpdt", "eptra", "oruzfgsquyfxrxx", + "wlwnwxuqlcv", "xje")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1148696906).withMinute(1248229075) + .withUsedBytes(1507224315581735893L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1080524607).withHour(1614496522) + .withMinute(77495916).withUsedBytes(1911538746456059968L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1225956555).withDay("ujhemmsbvdkcrodt") + .withHour(1997229408).withMinute(291950475).withUsedBytes(6410034847924566454L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(896449803).withDaysOfMonth("cjvefkdlfo") + .withHour(1252976241).withMinute(1706699033).withUsedBytes(5309095811404897814L)) .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("gaowpulpqblylsyx", model.location()); - Assertions.assertEquals("vinvkj", model.tags().get("xdxr")); - Assertions.assertEquals(618891293, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1429171965, model.hourlySchedule().minute()); - Assertions.assertEquals(6564772827394590293L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1051180868, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1806206586, model.dailySchedule().hour()); - Assertions.assertEquals(358085488, model.dailySchedule().minute()); - Assertions.assertEquals(1296933680465064139L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1589501712, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("pfuvglsbjjca", model.weeklySchedule().day()); - Assertions.assertEquals(1995846414, model.weeklySchedule().hour()); - Assertions.assertEquals(1075232734, model.weeklySchedule().minute()); - Assertions.assertEquals(652867049720214090L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1601872964, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("cormr", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1360670450, model.monthlySchedule().hour()); - Assertions.assertEquals(1954508595, model.monthlySchedule().minute()); - Assertions.assertEquals(2688344690599449184L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("bjyvay", model.location()); + Assertions.assertEquals("pfrxtrthzvay", model.tags().get("dwkqbrq")); + Assertions.assertEquals(1148696906, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1248229075, model.hourlySchedule().minute()); + Assertions.assertEquals(1507224315581735893L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1080524607, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1614496522, model.dailySchedule().hour()); + Assertions.assertEquals(77495916, model.dailySchedule().minute()); + Assertions.assertEquals(1911538746456059968L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1225956555, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("ujhemmsbvdkcrodt", model.weeklySchedule().day()); + Assertions.assertEquals(1997229408, model.weeklySchedule().hour()); + Assertions.assertEquals(291950475, model.weeklySchedule().minute()); + Assertions.assertEquals(6410034847924566454L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(896449803, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("cjvefkdlfo", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1252976241, model.monthlySchedule().hour()); + Assertions.assertEquals(1706699033, model.monthlySchedule().minute()); + Assertions.assertEquals(5309095811404897814L, model.monthlySchedule().usedBytes()); Assertions.assertEquals(false, model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java index d19ad300cea0..89d3199cca10 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java @@ -16,59 +16,58 @@ public final class SnapshotPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":747190122,\"minute\":383996827,\"usedBytes\":8358866216552319675},\"dailySchedule\":{\"snapshotsToKeep\":2045472309,\"hour\":1322383691,\"minute\":1729344688,\"usedBytes\":4145471517526414946},\"weeklySchedule\":{\"snapshotsToKeep\":1389326915,\"day\":\"iilivpdtiirqtd\",\"hour\":887642500,\"minute\":1693357038,\"usedBytes\":3114947430528398041},\"monthlySchedule\":{\"snapshotsToKeep\":1061692620,\"daysOfMonth\":\"uyfxrxxleptramxj\",\"hour\":576385447,\"minute\":800812531,\"usedBytes\":9127393651345868324},\"enabled\":false,\"provisioningState\":\"cvydypatdoo\"}") + "{\"hourlySchedule\":{\"snapshotsToKeep\":885439585,\"minute\":270423154,\"usedBytes\":5614257163136424427},\"dailySchedule\":{\"snapshotsToKeep\":1081755723,\"hour\":564076169,\"minute\":1794228240,\"usedBytes\":5489756358952396230},\"weeklySchedule\":{\"snapshotsToKeep\":253317009,\"day\":\"eqidbqfatpx\",\"hour\":48002498,\"minute\":1459715111,\"usedBytes\":8864644598647393386},\"monthlySchedule\":{\"snapshotsToKeep\":2040504053,\"daysOfMonth\":\"uvarmywdmjsjq\",\"hour\":1756269391,\"minute\":1027618115,\"usedBytes\":6679760626312548131},\"enabled\":false,\"provisioningState\":\"co\"}") .toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(747190122, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(383996827, model.hourlySchedule().minute()); - Assertions.assertEquals(8358866216552319675L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(2045472309, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1322383691, model.dailySchedule().hour()); - Assertions.assertEquals(1729344688, model.dailySchedule().minute()); - Assertions.assertEquals(4145471517526414946L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1389326915, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("iilivpdtiirqtd", model.weeklySchedule().day()); - Assertions.assertEquals(887642500, model.weeklySchedule().hour()); - Assertions.assertEquals(1693357038, model.weeklySchedule().minute()); - Assertions.assertEquals(3114947430528398041L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1061692620, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("uyfxrxxleptramxj", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(576385447, model.monthlySchedule().hour()); - Assertions.assertEquals(800812531, model.monthlySchedule().minute()); - Assertions.assertEquals(9127393651345868324L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals(885439585, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(270423154, model.hourlySchedule().minute()); + Assertions.assertEquals(5614257163136424427L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1081755723, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(564076169, model.dailySchedule().hour()); + Assertions.assertEquals(1794228240, model.dailySchedule().minute()); + Assertions.assertEquals(5489756358952396230L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(253317009, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("eqidbqfatpx", model.weeklySchedule().day()); + Assertions.assertEquals(48002498, model.weeklySchedule().hour()); + Assertions.assertEquals(1459715111, model.weeklySchedule().minute()); + Assertions.assertEquals(8864644598647393386L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(2040504053, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("uvarmywdmjsjq", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1756269391, model.monthlySchedule().hour()); + Assertions.assertEquals(1027618115, model.monthlySchedule().minute()); + Assertions.assertEquals(6679760626312548131L, model.monthlySchedule().usedBytes()); Assertions.assertEquals(false, model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SnapshotPolicyProperties model = new SnapshotPolicyProperties() - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(747190122).withMinute(383996827) - .withUsedBytes(8358866216552319675L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(2045472309).withHour(1322383691) - .withMinute(1729344688).withUsedBytes(4145471517526414946L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1389326915).withDay("iilivpdtiirqtd") - .withHour(887642500).withMinute(1693357038).withUsedBytes(3114947430528398041L)) - .withMonthlySchedule( - new MonthlySchedule().withSnapshotsToKeep(1061692620).withDaysOfMonth("uyfxrxxleptramxj") - .withHour(576385447).withMinute(800812531).withUsedBytes(9127393651345868324L)) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(885439585).withMinute(270423154) + .withUsedBytes(5614257163136424427L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1081755723).withHour(564076169) + .withMinute(1794228240).withUsedBytes(5489756358952396230L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(253317009).withDay("eqidbqfatpx") + .withHour(48002498).withMinute(1459715111).withUsedBytes(8864644598647393386L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(2040504053).withDaysOfMonth("uvarmywdmjsjq") + .withHour(1756269391).withMinute(1027618115).withUsedBytes(6679760626312548131L)) .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(747190122, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(383996827, model.hourlySchedule().minute()); - Assertions.assertEquals(8358866216552319675L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(2045472309, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1322383691, model.dailySchedule().hour()); - Assertions.assertEquals(1729344688, model.dailySchedule().minute()); - Assertions.assertEquals(4145471517526414946L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1389326915, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("iilivpdtiirqtd", model.weeklySchedule().day()); - Assertions.assertEquals(887642500, model.weeklySchedule().hour()); - Assertions.assertEquals(1693357038, model.weeklySchedule().minute()); - Assertions.assertEquals(3114947430528398041L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1061692620, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("uyfxrxxleptramxj", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(576385447, model.monthlySchedule().hour()); - Assertions.assertEquals(800812531, model.monthlySchedule().minute()); - Assertions.assertEquals(9127393651345868324L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals(885439585, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(270423154, model.hourlySchedule().minute()); + Assertions.assertEquals(5614257163136424427L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1081755723, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(564076169, model.dailySchedule().hour()); + Assertions.assertEquals(1794228240, model.dailySchedule().minute()); + Assertions.assertEquals(5489756358952396230L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(253317009, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("eqidbqfatpx", model.weeklySchedule().day()); + Assertions.assertEquals(48002498, model.weeklySchedule().hour()); + Assertions.assertEquals(1459715111, model.weeklySchedule().minute()); + Assertions.assertEquals(8864644598647393386L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(2040504053, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("uvarmywdmjsjq", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1756269391, model.monthlySchedule().hour()); + Assertions.assertEquals(1027618115, model.monthlySchedule().minute()); + Assertions.assertEquals(6679760626312548131L, model.monthlySchedule().usedBytes()); Assertions.assertEquals(false, model.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java index d479a9927931..244ad0813739 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java @@ -10,8 +10,9 @@ public final class SnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SnapshotProperties model = BinaryData.fromString( - "{\"snapshotId\":\"kwqqtchealmf\",\"created\":\"2021-05-23T20:32:01Z\",\"provisioningState\":\"aygdvwvgpioh\"}") + SnapshotProperties model = BinaryData + .fromString( + "{\"snapshotId\":\"pnppfuf\",\"created\":\"2021-04-27T03:55:43Z\",\"provisioningState\":\"mh\"}") .toObject(SnapshotProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java index 06f580b79f68..6d0bf6955135 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java @@ -13,18 +13,18 @@ public final class SnapshotRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotRestoreFiles model - = BinaryData.fromString("{\"filePaths\":[\"xrtfudxep\"],\"destinationPath\":\"yqagvrvm\"}") + = BinaryData.fromString("{\"filePaths\":[\"xyjrxsagafcnih\",\"wqapnedgfbcvk\"],\"destinationPath\":\"q\"}") .toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("xrtfudxep", model.filePaths().get(0)); - Assertions.assertEquals("yqagvrvm", model.destinationPath()); + Assertions.assertEquals("xyjrxsagafcnih", model.filePaths().get(0)); + Assertions.assertEquals("q", model.destinationPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotRestoreFiles model - = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("xrtfudxep")).withDestinationPath("yqagvrvm"); + SnapshotRestoreFiles model = new SnapshotRestoreFiles() + .withFilePaths(Arrays.asList("xyjrxsagafcnih", "wqapnedgfbcvk")).withDestinationPath("q"); model = BinaryData.fromObject(model).toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("xrtfudxep", model.filePaths().get(0)); - Assertions.assertEquals("yqagvrvm", model.destinationPath()); + Assertions.assertEquals("xyjrxsagafcnih", model.filePaths().get(0)); + Assertions.assertEquals("q", model.destinationPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java index 54659b7c635a..739a84390406 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java @@ -45,7 +45,7 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.snapshots().delete("nzrdpsovwxz", "ptgoeiybbabp", "hv", "slkvntjl", "igjkskyrio", + manager.snapshots().delete("kzyb", "jjidjk", "yxkyxvx", "vblbjednljlageua", "lxunsmjbnkppxy", com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java index 66a2debc7097..9c363940afb2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"location\":\"ap\",\"properties\":{\"snapshotId\":\"ferr\",\"created\":\"2021-05-25T15:13:52Z\",\"provisioningState\":\"jkmfxapjwo\"},\"id\":\"qnobp\",\"name\":\"dcdab\",\"type\":\"qwpwyawbzasqbuc\"}"; + = "{\"location\":\"ti\",\"properties\":{\"snapshotId\":\"pwpgclrci\",\"created\":\"2021-07-05T16:33:25Z\",\"provisioningState\":\"xfrk\"},\"id\":\"xpmyyefrpmpdnq\",\"name\":\"skawaoqvmmb\",\"type\":\"pqfrtqlkz\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -48,9 +48,9 @@ public void testGetWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - Snapshot response = manager.snapshots() - .getWithResponse("a", "zv", "chndbnwie", "olewjwi", "ubwefqs", com.azure.core.util.Context.NONE).getValue(); + Snapshot response = manager.snapshots().getWithResponse("ttymsjny", "qdnfwqzdz", "tilaxh", "fhqlyvi", + "ouwivkxoyzunbixx", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("ap", response.location()); + Assertions.assertEquals("ti", response.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java index fc3cde019387..55f152756754 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java @@ -32,7 +32,7 @@ public void testList() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"location\":\"utmzlbiojlvfhrbb\",\"properties\":{\"snapshotId\":\"qvcww\",\"created\":\"2021-11-09T01:20:46Z\",\"provisioningState\":\"mochpprprsnmok\"},\"id\":\"zejnhl\",\"name\":\"kpbz\",\"type\":\"cpilj\"}]}"; + = "{\"value\":[{\"location\":\"zhhzjhfjmhvvmu\",\"properties\":{\"snapshotId\":\"mun\",\"created\":\"2021-11-13T08:37:26Z\",\"provisioningState\":\"vmhfbuz\"},\"id\":\"ihsasb\",\"name\":\"udypohyuems\",\"type\":\"ynsqyrpfoobr\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,9 +49,9 @@ public void testList() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response - = manager.snapshots().list("pnodawopqhe", "jptmcgsbost", "eln", "la", com.azure.core.util.Context.NONE); + PagedIterable response = manager.snapshots().list("rdve", "nwsdtutnwlduyc", "uzhyrmewipmvekdx", + "kuqgsjjxundxgket", com.azure.core.util.Context.NONE); - Assertions.assertEquals("utmzlbiojlvfhrbb", response.iterator().next().location()); + Assertions.assertEquals("zhhzjhfjmhvvmu", response.iterator().next().location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java index c53526e8dd34..6d7cde6d8b14 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java @@ -14,16 +14,16 @@ public final class SnapshotsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotsList model = BinaryData.fromString( - "{\"value\":[{\"location\":\"ph\",\"properties\":{\"snapshotId\":\"xodlqiyntorzih\",\"created\":\"2021-04-08T02:51:20Z\",\"provisioningState\":\"jswsrmslyz\"},\"id\":\"zbchckqqzqioxiy\",\"name\":\"uiizynke\",\"type\":\"yatrwy\"},{\"location\":\"q\",\"properties\":{\"snapshotId\":\"zyh\",\"created\":\"2021-05-20T17:58:30Z\",\"provisioningState\":\"mypyynpcdpu\"},\"id\":\"zgmwznmabikns\",\"name\":\"rgjhxb\",\"type\":\"dtlwwrlkd\"},{\"location\":\"tncvokot\",\"properties\":{\"snapshotId\":\"d\",\"created\":\"2021-07-23T09:43:53Z\",\"provisioningState\":\"y\"},\"id\":\"ogjltdtbnnhad\",\"name\":\"ocrkvcikh\",\"type\":\"vpa\"}]}") + "{\"value\":[{\"location\":\"zmuvpbttdumorppx\",\"properties\":{\"snapshotId\":\"nzbtbhj\",\"created\":\"2021-10-23T02:17:02Z\",\"provisioningState\":\"fgohdneuelfphs\"},\"id\":\"htozfikdow\",\"name\":\"quuvxzxcl\",\"type\":\"ithhqzon\"}]}") .toObject(SnapshotsList.class); - Assertions.assertEquals("ph", model.value().get(0).location()); + Assertions.assertEquals("zmuvpbttdumorppx", model.value().get(0).location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotsList model = new SnapshotsList().withValue(Arrays.asList(new SnapshotInner().withLocation("ph"), - new SnapshotInner().withLocation("q"), new SnapshotInner().withLocation("tncvokot"))); + SnapshotsList model + = new SnapshotsList().withValue(Arrays.asList(new SnapshotInner().withLocation("zmuvpbttdumorppx"))); model = BinaryData.fromObject(model).toObject(SnapshotsList.class); - Assertions.assertEquals("ph", model.value().get(0).location()); + Assertions.assertEquals("zmuvpbttdumorppx", model.value().get(0).location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java index 86f51040ca01..8629fecd17ed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java @@ -47,9 +47,8 @@ public void testRestoreFiles() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.snapshots().restoreFiles( - "vzidsxwaab", "mifrygznmma", "ri", "kzobgopxlhsln", "lxieixynllxecwcr", new SnapshotRestoreFiles() - .withFilePaths(Arrays.asList("phslhcawjutifdw", "mvi", "orq")).withDestinationPath("ttzhra"), + manager.snapshots().restoreFiles("enlsvxeizzgwkln", "rmffeyc", "ckt", "iymerteeammxqi", "kk", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("ddrtkgdojb", "xv")).withDestinationPath("refdee"), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java index b92dba17b7c0..5dea340d3adc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java @@ -31,7 +31,7 @@ public void testUpdate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"location\":\"azlnqnmcjngzqdqx\",\"properties\":{\"snapshotId\":\"wgnyfusfzsvtui\",\"created\":\"2021-03-01T07:50:01Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"fh\",\"name\":\"l\",\"type\":\"qryxyn\"}"; + = "{\"location\":\"xakjsqzhzb\",\"properties\":{\"snapshotId\":\"gims\",\"created\":\"2021-03-21T09:55:03Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"kgfmocwahpq\",\"name\":\"atjeaahh\",\"type\":\"jhhn\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -48,9 +48,9 @@ public void testUpdate() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - Snapshot response = manager.snapshots().update("jg", "yexaoguy", "i", "ids", "ault", "dataijjumfq", - com.azure.core.util.Context.NONE); + Snapshot response = manager.snapshots().update("egnitg", "kxlzyqdrfeg", "ealzxwhcansymoyq", "lwigdivbkbx", + "omfaj", "datawasqvdaeyyg", com.azure.core.util.Context.NONE); - Assertions.assertEquals("azlnqnmcjngzqdqx", response.location()); + Assertions.assertEquals("xakjsqzhzb", response.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java index eb82b7315141..2f82969f935c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java @@ -12,20 +12,20 @@ public final class SubvolumeInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"rk\",\"size\":6236103366056271991,\"parentPath\":\"jhhgdnhxmsi\",\"provisioningState\":\"omi\"},\"id\":\"xggdufi\",\"name\":\"ndieuzaofj\",\"type\":\"hvcyyysfg\"}") + "{\"properties\":{\"path\":\"owvrvmtgjqppyos\",\"size\":1997162688114762581,\"parentPath\":\"myhgfipnsxkmc\",\"provisioningState\":\"ekrrjr\"},\"id\":\"fxtsgum\",\"name\":\"jglikkxwslolb\",\"type\":\"pvuzlmv\"}") .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("rk", model.path()); - Assertions.assertEquals(6236103366056271991L, model.size()); - Assertions.assertEquals("jhhgdnhxmsi", model.parentPath()); + Assertions.assertEquals("owvrvmtgjqppyos", model.path()); + Assertions.assertEquals(1997162688114762581L, model.size()); + Assertions.assertEquals("myhgfipnsxkmc", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("rk").withSize(6236103366056271991L).withParentPath("jhhgdnhxmsi"); + SubvolumeInfoInner model = new SubvolumeInfoInner().withPath("owvrvmtgjqppyos").withSize(1997162688114762581L) + .withParentPath("myhgfipnsxkmc"); model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("rk", model.path()); - Assertions.assertEquals(6236103366056271991L, model.size()); - Assertions.assertEquals("jhhgdnhxmsi", model.parentPath()); + Assertions.assertEquals("owvrvmtgjqppyos", model.path()); + Assertions.assertEquals(1997162688114762581L, model.size()); + Assertions.assertEquals("myhgfipnsxkmc", model.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java index 919903e9bd92..6ff393baa6a5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java @@ -13,38 +13,38 @@ public final class SubvolumeModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelInner model = BinaryData.fromString( - "{\"id\":\"byowbblgyavutp\",\"name\":\"joxoism\",\"type\":\"sbpimlq\",\"properties\":{\"path\":\"xkcgxxlxsffgcvi\",\"parentPath\":\"zdwlvwlyoupfgfb\",\"size\":7653162173647164897,\"bytesUsed\":4324822470137605092,\"permissions\":\"kfm\",\"creationTimeStamp\":\"2021-07-25T09:50:13Z\",\"accessedTimeStamp\":\"2021-10-13T02:52:40Z\",\"modifiedTimeStamp\":\"2021-07-19T15:33:36Z\",\"changedTimeStamp\":\"2021-01-19T00:17:43Z\",\"provisioningState\":\"sttktlahbqa\"}}") + "{\"id\":\"wuenvr\",\"name\":\"yo\",\"type\":\"ibreb\",\"properties\":{\"path\":\"ysjkixqtnqttez\",\"parentPath\":\"fffiak\",\"size\":7989893119356760730,\"bytesUsed\":167842444741645493,\"permissions\":\"d\",\"creationTimeStamp\":\"2021-09-01T21:15:43Z\",\"accessedTimeStamp\":\"2021-03-09T02:32:12Z\",\"modifiedTimeStamp\":\"2021-08-03T11:39:14Z\",\"changedTimeStamp\":\"2021-01-23T06:09:40Z\",\"provisioningState\":\"zphv\"}}") .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.path()); - Assertions.assertEquals("zdwlvwlyoupfgfb", model.parentPath()); - Assertions.assertEquals(7653162173647164897L, model.size()); - Assertions.assertEquals(4324822470137605092L, model.bytesUsed()); - Assertions.assertEquals("kfm", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T09:50:13Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T02:52:40Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-19T15:33:36Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T00:17:43Z"), model.changedTimestamp()); - Assertions.assertEquals("sttktlahbqa", model.provisioningState()); + Assertions.assertEquals("ysjkixqtnqttez", model.path()); + Assertions.assertEquals("fffiak", model.parentPath()); + Assertions.assertEquals(7989893119356760730L, model.size()); + Assertions.assertEquals(167842444741645493L, model.bytesUsed()); + Assertions.assertEquals("d", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T21:15:43Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T02:32:12Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T11:39:14Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T06:09:40Z"), model.changedTimestamp()); + Assertions.assertEquals("zphv", model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeModelInner model = new SubvolumeModelInner().withPath("xkcgxxlxsffgcvi") - .withParentPath("zdwlvwlyoupfgfb").withSize(7653162173647164897L).withBytesUsed(4324822470137605092L) - .withPermissions("kfm").withCreationTimestamp(OffsetDateTime.parse("2021-07-25T09:50:13Z")) - .withAccessedTimestamp(OffsetDateTime.parse("2021-10-13T02:52:40Z")) - .withModifiedTimestamp(OffsetDateTime.parse("2021-07-19T15:33:36Z")) - .withChangedTimestamp(OffsetDateTime.parse("2021-01-19T00:17:43Z")).withProvisioningState("sttktlahbqa"); + SubvolumeModelInner model = new SubvolumeModelInner().withPath("ysjkixqtnqttez").withParentPath("fffiak") + .withSize(7989893119356760730L).withBytesUsed(167842444741645493L).withPermissions("d") + .withCreationTimestamp(OffsetDateTime.parse("2021-09-01T21:15:43Z")) + .withAccessedTimestamp(OffsetDateTime.parse("2021-03-09T02:32:12Z")) + .withModifiedTimestamp(OffsetDateTime.parse("2021-08-03T11:39:14Z")) + .withChangedTimestamp(OffsetDateTime.parse("2021-01-23T06:09:40Z")).withProvisioningState("zphv"); model = BinaryData.fromObject(model).toObject(SubvolumeModelInner.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.path()); - Assertions.assertEquals("zdwlvwlyoupfgfb", model.parentPath()); - Assertions.assertEquals(7653162173647164897L, model.size()); - Assertions.assertEquals(4324822470137605092L, model.bytesUsed()); - Assertions.assertEquals("kfm", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T09:50:13Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T02:52:40Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-19T15:33:36Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T00:17:43Z"), model.changedTimestamp()); - Assertions.assertEquals("sttktlahbqa", model.provisioningState()); + Assertions.assertEquals("ysjkixqtnqttez", model.path()); + Assertions.assertEquals("fffiak", model.parentPath()); + Assertions.assertEquals(7989893119356760730L, model.size()); + Assertions.assertEquals(167842444741645493L, model.bytesUsed()); + Assertions.assertEquals("d", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T21:15:43Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T02:32:12Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T11:39:14Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T06:09:40Z"), model.changedTimestamp()); + Assertions.assertEquals("zphv", model.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java index bcc8c732e774..414ccd547d01 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java @@ -13,38 +13,38 @@ public final class SubvolumeModelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelProperties model = BinaryData.fromString( - "{\"path\":\"xtgzukxitmmqtgqq\",\"parentPath\":\"hrnxrxc\",\"size\":8912049813335593568,\"bytesUsed\":1928679362858803992,\"permissions\":\"k\",\"creationTimeStamp\":\"2021-02-23T17:29:03Z\",\"accessedTimeStamp\":\"2021-09-10T00:13:37Z\",\"modifiedTimeStamp\":\"2021-11-24T02:59:44Z\",\"changedTimeStamp\":\"2021-09-15T15:31:22Z\",\"provisioningState\":\"l\"}") + "{\"path\":\"uyqncygupkvipmd\",\"parentPath\":\"wx\",\"size\":9152224123184023671,\"bytesUsed\":7138744715268482510,\"permissions\":\"stotxh\",\"creationTimeStamp\":\"2021-02-09T01:55:57Z\",\"accessedTimeStamp\":\"2021-12-08T17:06:05Z\",\"modifiedTimeStamp\":\"2021-04-25T15:36:32Z\",\"changedTimeStamp\":\"2021-06-17T22:54:10Z\",\"provisioningState\":\"c\"}") .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("xtgzukxitmmqtgqq", model.path()); - Assertions.assertEquals("hrnxrxc", model.parentPath()); - Assertions.assertEquals(8912049813335593568L, model.size()); - Assertions.assertEquals(1928679362858803992L, model.bytesUsed()); - Assertions.assertEquals("k", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T17:29:03Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T00:13:37Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T02:59:44Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T15:31:22Z"), model.changedTimestamp()); - Assertions.assertEquals("l", model.provisioningState()); + Assertions.assertEquals("uyqncygupkvipmd", model.path()); + Assertions.assertEquals("wx", model.parentPath()); + Assertions.assertEquals(9152224123184023671L, model.size()); + Assertions.assertEquals(7138744715268482510L, model.bytesUsed()); + Assertions.assertEquals("stotxh", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T01:55:57Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:06:05Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T15:36:32Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:54:10Z"), model.changedTimestamp()); + Assertions.assertEquals("c", model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeModelProperties model = new SubvolumeModelProperties().withPath("xtgzukxitmmqtgqq") - .withParentPath("hrnxrxc").withSize(8912049813335593568L).withBytesUsed(1928679362858803992L) - .withPermissions("k").withCreationTimestamp(OffsetDateTime.parse("2021-02-23T17:29:03Z")) - .withAccessedTimestamp(OffsetDateTime.parse("2021-09-10T00:13:37Z")) - .withModifiedTimestamp(OffsetDateTime.parse("2021-11-24T02:59:44Z")) - .withChangedTimestamp(OffsetDateTime.parse("2021-09-15T15:31:22Z")).withProvisioningState("l"); + SubvolumeModelProperties model = new SubvolumeModelProperties().withPath("uyqncygupkvipmd").withParentPath("wx") + .withSize(9152224123184023671L).withBytesUsed(7138744715268482510L).withPermissions("stotxh") + .withCreationTimestamp(OffsetDateTime.parse("2021-02-09T01:55:57Z")) + .withAccessedTimestamp(OffsetDateTime.parse("2021-12-08T17:06:05Z")) + .withModifiedTimestamp(OffsetDateTime.parse("2021-04-25T15:36:32Z")) + .withChangedTimestamp(OffsetDateTime.parse("2021-06-17T22:54:10Z")).withProvisioningState("c"); model = BinaryData.fromObject(model).toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("xtgzukxitmmqtgqq", model.path()); - Assertions.assertEquals("hrnxrxc", model.parentPath()); - Assertions.assertEquals(8912049813335593568L, model.size()); - Assertions.assertEquals(1928679362858803992L, model.bytesUsed()); - Assertions.assertEquals("k", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T17:29:03Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T00:13:37Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T02:59:44Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-15T15:31:22Z"), model.changedTimestamp()); - Assertions.assertEquals("l", model.provisioningState()); + Assertions.assertEquals("uyqncygupkvipmd", model.path()); + Assertions.assertEquals("wx", model.parentPath()); + Assertions.assertEquals(9152224123184023671L, model.size()); + Assertions.assertEquals(7138744715268482510L, model.bytesUsed()); + Assertions.assertEquals("stotxh", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T01:55:57Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T17:06:05Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T15:36:32Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T22:54:10Z"), model.changedTimestamp()); + Assertions.assertEquals("c", model.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java index e9b06d56b747..c3dad53f127a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java @@ -11,19 +11,17 @@ public final class SubvolumePatchParamsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubvolumePatchParams model - = BinaryData.fromString("{\"size\":8527359607634175876,\"path\":\"fnynszqujizdvoqy\"}") - .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(8527359607634175876L, model.size()); - Assertions.assertEquals("fnynszqujizdvoqy", model.path()); + SubvolumePatchParams model = BinaryData.fromString("{\"size\":5455709346617083840,\"path\":\"j\"}") + .toObject(SubvolumePatchParams.class); + Assertions.assertEquals(5455709346617083840L, model.size()); + Assertions.assertEquals("j", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchParams model - = new SubvolumePatchParams().withSize(8527359607634175876L).withPath("fnynszqujizdvoqy"); + SubvolumePatchParams model = new SubvolumePatchParams().withSize(5455709346617083840L).withPath("j"); model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(8527359607634175876L, model.size()); - Assertions.assertEquals("fnynszqujizdvoqy", model.path()); + Assertions.assertEquals(5455709346617083840L, model.size()); + Assertions.assertEquals("j", model.path()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java index 0c840028f649..c25d87d18596 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java @@ -12,17 +12,18 @@ public final class SubvolumePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":3659481881596773393,\"path\":\"ccwr\"}}") + = BinaryData.fromString("{\"properties\":{\"size\":4992993506097111219,\"path\":\"augzxnfaazpxdtn\"}}") .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(3659481881596773393L, model.size()); - Assertions.assertEquals("ccwr", model.path()); + Assertions.assertEquals(4992993506097111219L, model.size()); + Assertions.assertEquals("augzxnfaazpxdtn", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchRequest model = new SubvolumePatchRequest().withSize(3659481881596773393L).withPath("ccwr"); + SubvolumePatchRequest model + = new SubvolumePatchRequest().withSize(4992993506097111219L).withPath("augzxnfaazpxdtn"); model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(3659481881596773393L, model.size()); - Assertions.assertEquals("ccwr", model.path()); + Assertions.assertEquals(4992993506097111219L, model.size()); + Assertions.assertEquals("augzxnfaazpxdtn", model.path()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java index e46448978167..7dd148b0fa0f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java @@ -12,20 +12,20 @@ public final class SubvolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"tcubiipuipwoqonm\",\"size\":941604235474814179,\"parentPath\":\"nizshqvcim\",\"provisioningState\":\"vfgmblrrilby\"}") + "{\"path\":\"lfktgplcrpwjxe\",\"size\":1213023006676271308,\"parentPath\":\"brnjwmw\",\"provisioningState\":\"nbsazejjoqkag\"}") .toObject(SubvolumeProperties.class); - Assertions.assertEquals("tcubiipuipwoqonm", model.path()); - Assertions.assertEquals(941604235474814179L, model.size()); - Assertions.assertEquals("nizshqvcim", model.parentPath()); + Assertions.assertEquals("lfktgplcrpwjxe", model.path()); + Assertions.assertEquals(1213023006676271308L, model.size()); + Assertions.assertEquals("brnjwmw", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("tcubiipuipwoqonm").withSize(941604235474814179L) - .withParentPath("nizshqvcim"); + SubvolumeProperties model = new SubvolumeProperties().withPath("lfktgplcrpwjxe").withSize(1213023006676271308L) + .withParentPath("brnjwmw"); model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("tcubiipuipwoqonm", model.path()); - Assertions.assertEquals(941604235474814179L, model.size()); - Assertions.assertEquals("nizshqvcim", model.parentPath()); + Assertions.assertEquals("lfktgplcrpwjxe", model.path()); + Assertions.assertEquals(1213023006676271308L, model.size()); + Assertions.assertEquals("brnjwmw", model.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java index 362cecae378f..ed9d984c7689 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java @@ -31,7 +31,7 @@ public void testCreate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"properties\":{\"path\":\"gpiudeug\",\"size\":8412472612834852479,\"parentPath\":\"c\",\"provisioningState\":\"Succeeded\"},\"id\":\"fykhvuhxepmru\",\"name\":\"znabaobns\",\"type\":\"ujdjltymkmvg\"}"; + = "{\"properties\":{\"path\":\"oweyirdhlis\",\"size\":2577921237781944905,\"parentPath\":\"qqmpizruwnpqx\",\"provisioningState\":\"Succeeded\"},\"id\":\"iixtmkzj\",\"name\":\"kv\",\"type\":\"irhgfgrwsdp\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -48,12 +48,12 @@ public void testCreate() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - SubvolumeInfo response - = manager.subvolumes().define("sggux").withExistingVolume("naoyank", "oe", "swankltytmh", "roznnhdrlktgj") - .withPath("lwywae").withSize(4845732356948511994L).withParentPath("bukklels").create(); + SubvolumeInfo response = manager.subvolumes().define("nlb") + .withExistingVolume("ebwlnbmhyreeudzq", "vbpdqmjxlyyzglgo", "wtlmjjyuo", "qtobaxkjeyt").withPath("wrus") + .withSize(7003868836255706377L).withParentPath("syrq").create(); - Assertions.assertEquals("gpiudeug", response.path()); - Assertions.assertEquals(8412472612834852479L, response.size()); - Assertions.assertEquals("c", response.parentPath()); + Assertions.assertEquals("oweyirdhlis", response.path()); + Assertions.assertEquals(2577921237781944905L, response.size()); + Assertions.assertEquals("qqmpizruwnpqx", response.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java index db940505bce9..8d108bcbd53b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java @@ -45,8 +45,7 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.subvolumes().delete("uqtljqobbpih", "hcecybmrqbr", "bbmpxdlvykfre", "crse", "wjksghudgzhxo", - com.azure.core.util.Context.NONE); + manager.subvolumes().delete("g", "pnpbswveflocc", "rmozihmipgawt", "xp", "y", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java index 67b348f5d074..da1121c71cf7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java @@ -31,7 +31,7 @@ public void testGetMetadata() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"id\":\"ddei\",\"name\":\"wzovgk\",\"type\":\"muikjcjcaztbws\",\"properties\":{\"path\":\"owxwcomli\",\"parentPath\":\"twvc\",\"size\":9048131341769912568,\"bytesUsed\":3791668665585819281,\"permissions\":\"ejyfdvlvhbwrnfx\",\"creationTimeStamp\":\"2021-04-12T09:19:16Z\",\"accessedTimeStamp\":\"2021-01-12T00:32:09Z\",\"modifiedTimeStamp\":\"2021-07-21T21:17:06Z\",\"changedTimeStamp\":\"2021-04-10T14:59:15Z\",\"provisioningState\":\"Succeeded\"}}"; + = "{\"id\":\"pfnznthjtwkj\",\"name\":\"srxuzvoam\",\"type\":\"cqiosmgbza\",\"properties\":{\"path\":\"qdlyrtl\",\"parentPath\":\"ap\",\"size\":1522364843172111954,\"bytesUsed\":773093768865892885,\"permissions\":\"hjm\",\"creationTimeStamp\":\"2021-01-20T21:27:07Z\",\"accessedTimeStamp\":\"2021-04-06T21:21:13Z\",\"modifiedTimeStamp\":\"2021-07-25T22:28:32Z\",\"changedTimeStamp\":\"2021-06-18T22:17:48Z\",\"provisioningState\":\"Succeeded\"}}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -48,18 +48,18 @@ public void testGetMetadata() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - SubvolumeModel response = manager.subvolumes().getMetadata("jggsvo", "jkxibda", "hrkmdyomkxfbvfbh", "y", "rhpw", - com.azure.core.util.Context.NONE); + SubvolumeModel response = manager.subvolumes().getMetadata("cxcjxgry", "fmpcycilrmca", "kggnoxu", "t", + "ksxwpnd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("owxwcomli", response.path()); - Assertions.assertEquals("twvc", response.parentPath()); - Assertions.assertEquals(9048131341769912568L, response.size()); - Assertions.assertEquals(3791668665585819281L, response.bytesUsed()); - Assertions.assertEquals("ejyfdvlvhbwrnfx", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T09:19:16Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T00:32:09Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T21:17:06Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T14:59:15Z"), response.changedTimestamp()); + Assertions.assertEquals("qdlyrtl", response.path()); + Assertions.assertEquals("ap", response.parentPath()); + Assertions.assertEquals(1522364843172111954L, response.size()); + Assertions.assertEquals(773093768865892885L, response.bytesUsed()); + Assertions.assertEquals("hjm", response.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T21:27:07Z"), response.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T21:21:13Z"), response.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T22:28:32Z"), response.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T22:17:48Z"), response.changedTimestamp()); Assertions.assertEquals("Succeeded", response.provisioningState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java index 12e15a541fb8..a5b07b5cd35e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java @@ -31,7 +31,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"properties\":{\"path\":\"jyslurl\",\"size\":1165766341545693911,\"parentPath\":\"vpedwqslsrh\",\"provisioningState\":\"qvwwsko\"},\"id\":\"cbrwi\",\"name\":\"uvqejosovyrrle\",\"type\":\"esi\"}"; + = "{\"properties\":{\"path\":\"i\",\"size\":8841673596868858874,\"parentPath\":\"wmxqhndvnoamlds\",\"provisioningState\":\"aohdjh\"},\"id\":\"lzok\",\"name\":\"coxpelnjeta\",\"type\":\"ltsxoatf\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,11 +49,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); SubvolumeInfo response = manager.subvolumes() - .getWithResponse("igsxcdgljplk", "ua", "htomflrytswfp", "mdgycxn", "skw", com.azure.core.util.Context.NONE) + .getWithResponse("qbsms", "ziqgfuh", "kzruswh", "hczznvf", "ycjsx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jyslurl", response.path()); - Assertions.assertEquals(1165766341545693911L, response.size()); - Assertions.assertEquals("vpedwqslsrh", response.parentPath()); + Assertions.assertEquals("i", response.path()); + Assertions.assertEquals(8841673596868858874L, response.size()); + Assertions.assertEquals("wmxqhndvnoamlds", response.parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java index 6c7afe8465d1..8bd2fd76fd71 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java @@ -32,7 +32,7 @@ public void testListByVolume() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"tlgy\",\"size\":8015109045379432698,\"parentPath\":\"lnnpx\",\"provisioningState\":\"afiqgeaarbgjekg\"},\"id\":\"lbyulidwcwvmze\",\"name\":\"jonfhjirwgdnqzbr\",\"type\":\"kspzhzmtksjcit\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"xgvelfclduccbird\",\"size\":3261437061903336605,\"parentPath\":\"o\",\"provisioningState\":\"egstmninwjizci\"},\"id\":\"ghgshejjtbxqmu\",\"name\":\"uxlxqzvners\",\"type\":\"ycucrwnamikzeb\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,11 +49,11 @@ public void testListByVolume() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.subvolumes().listByVolume("jchcsrlzknmzla", "rupdwvnphcnzq", - "pjhmqrhvthl", "iwdcxsmlzzhzd", com.azure.core.util.Context.NONE); + PagedIterable response = manager.subvolumes().listByVolume("rtixokff", "yinljqe", "qwhix", + "onsts", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tlgy", response.iterator().next().path()); - Assertions.assertEquals(8015109045379432698L, response.iterator().next().size()); - Assertions.assertEquals("lnnpx", response.iterator().next().parentPath()); + Assertions.assertEquals("xgvelfclduccbird", response.iterator().next().path()); + Assertions.assertEquals(3261437061903336605L, response.iterator().next().size()); + Assertions.assertEquals("o", response.iterator().next().parentPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java index 149b0e240a56..e9813e7b8c00 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java @@ -14,26 +14,23 @@ public final class SubvolumesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"path\":\"tac\",\"size\":1896818914623797810,\"parentPath\":\"ewzcjznmwcp\",\"provisioningState\":\"uaadraufactkahzo\"},\"id\":\"jjziuxxpsh\",\"name\":\"eekulfgslqubkwd\",\"type\":\"enr\"},{\"properties\":{\"path\":\"tujbazpju\",\"size\":2825730842736557509,\"parentPath\":\"yfln\",\"provisioningState\":\"wmd\"},\"id\":\"wpklvxw\",\"name\":\"ygdxpgpqchis\",\"type\":\"epn\"},{\"properties\":{\"path\":\"crxgibb\",\"size\":3991598245357381450,\"parentPath\":\"nfo\",\"provisioningState\":\"uors\"},\"id\":\"okwbqplh\",\"name\":\"vnuuepzl\",\"type\":\"phwzsoldweyuqdu\"}],\"nextLink\":\"mnnrwr\"}") + "{\"value\":[{\"properties\":{\"path\":\"nhlmctlpdng\",\"size\":5842965141303303723,\"parentPath\":\"mhrixkwmyijejve\",\"provisioningState\":\"hbpnaixexccbd\"},\"id\":\"ax\",\"name\":\"cexdrrvqa\",\"type\":\"qkghtpwijnhy\"}],\"nextLink\":\"vfycxzb\"}") .toObject(SubvolumesList.class); - Assertions.assertEquals("tac", model.value().get(0).path()); - Assertions.assertEquals(1896818914623797810L, model.value().get(0).size()); - Assertions.assertEquals("ewzcjznmwcp", model.value().get(0).parentPath()); - Assertions.assertEquals("mnnrwr", model.nextLink()); + Assertions.assertEquals("nhlmctlpdng", model.value().get(0).path()); + Assertions.assertEquals(5842965141303303723L, model.value().get(0).size()); + Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).parentPath()); + Assertions.assertEquals("vfycxzb", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumesList model = new SubvolumesList() - .withValue(Arrays.asList( - new SubvolumeInfoInner().withPath("tac").withSize(1896818914623797810L).withParentPath("ewzcjznmwcp"), - new SubvolumeInfoInner().withPath("tujbazpju").withSize(2825730842736557509L).withParentPath("yfln"), - new SubvolumeInfoInner().withPath("crxgibb").withSize(3991598245357381450L).withParentPath("nfo"))) - .withNextLink("mnnrwr"); + SubvolumesList model + = new SubvolumesList().withValue(Arrays.asList(new SubvolumeInfoInner().withPath("nhlmctlpdng") + .withSize(5842965141303303723L).withParentPath("mhrixkwmyijejve"))).withNextLink("vfycxzb"); model = BinaryData.fromObject(model).toObject(SubvolumesList.class); - Assertions.assertEquals("tac", model.value().get(0).path()); - Assertions.assertEquals(1896818914623797810L, model.value().get(0).size()); - Assertions.assertEquals("ewzcjznmwcp", model.value().get(0).parentPath()); - Assertions.assertEquals("mnnrwr", model.nextLink()); + Assertions.assertEquals("nhlmctlpdng", model.value().get(0).path()); + Assertions.assertEquals(5842965141303303723L, model.value().get(0).size()); + Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).parentPath()); + Assertions.assertEquals("vfycxzb", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java index ddab94d50551..90894dc5b320 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java @@ -13,23 +13,23 @@ public final class UpdateNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"ctyqik\",\"subnetId\":\"bbovplwzbhvgyugu\",\"networkSiblingSetStateId\":\"svmkfssxquk\",\"networkFeatures\":\"Basic\"}") + "{\"networkSiblingSetId\":\"uconuqszfkbey\",\"subnetId\":\"ewrmjmwvvjektc\",\"networkSiblingSetStateId\":\"senhwlrs\",\"networkFeatures\":\"Basic_Standard\"}") .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("ctyqik", model.networkSiblingSetId()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.subnetId()); - Assertions.assertEquals("svmkfssxquk", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, model.networkFeatures()); + Assertions.assertEquals("uconuqszfkbey", model.networkSiblingSetId()); + Assertions.assertEquals("ewrmjmwvvjektc", model.subnetId()); + Assertions.assertEquals("senhwlrs", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model - = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("ctyqik").withSubnetId("bbovplwzbhvgyugu") - .withNetworkSiblingSetStateId("svmkfssxquk").withNetworkFeatures(NetworkFeatures.BASIC); + UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest() + .withNetworkSiblingSetId("uconuqszfkbey").withSubnetId("ewrmjmwvvjektc") + .withNetworkSiblingSetStateId("senhwlrs").withNetworkFeatures(NetworkFeatures.BASIC_STANDARD); model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("ctyqik", model.networkSiblingSetId()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.subnetId()); - Assertions.assertEquals("svmkfssxquk", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, model.networkFeatures()); + Assertions.assertEquals("uconuqszfkbey", model.networkSiblingSetId()); + Assertions.assertEquals("ewrmjmwvvjektc", model.subnetId()); + Assertions.assertEquals("senhwlrs", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java index 3711611aa458..c0b93beb57d1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java @@ -11,7 +11,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"d1734cd8-b673-4e87-b4ee-6f00cca9fcf0\",\"clientId\":\"5845f0d8-3244-4e1d-9dab-23b1e56ee2c8\"}") + "{\"principalId\":\"e8e27ede-b960-492b-9ad3-2a1eb06a6518\",\"clientId\":\"b50f57c7-03f1-482c-b559-6715bceae11e\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java deleted file mode 100644 index 119a4d41de27..000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumeBackupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeBackupProperties model = BinaryData.fromString( - "{\"backupPolicyId\":\"zbn\",\"policyEnforced\":false,\"backupEnabled\":true,\"backupVaultId\":\"stdbhhxsrzdzu\"}") - .toObject(VolumeBackupProperties.class); - Assertions.assertEquals("zbn", model.backupPolicyId()); - Assertions.assertEquals(false, model.policyEnforced()); - Assertions.assertEquals(true, model.backupEnabled()); - Assertions.assertEquals("stdbhhxsrzdzu", model.backupVaultId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeBackupProperties model = new VolumeBackupProperties().withBackupPolicyId("zbn").withPolicyEnforced(false) - .withBackupEnabled(true).withBackupVaultId("stdbhhxsrzdzu"); - model = BinaryData.fromObject(model).toObject(VolumeBackupProperties.class); - Assertions.assertEquals("zbn", model.backupPolicyId()); - Assertions.assertEquals(false, model.policyEnforced()); - Assertions.assertEquals(true, model.backupEnabled()); - Assertions.assertEquals("stdbhhxsrzdzu", model.backupVaultId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java index 5f71912d8862..f4a64874a688 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java @@ -11,21 +11,21 @@ public final class VolumeBackupsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VolumeBackups model = BinaryData - .fromString("{\"volumeName\":\"ttaugzxnfaazp\",\"backupsCount\":2134025822,\"policyEnabled\":true}") - .toObject(VolumeBackups.class); - Assertions.assertEquals("ttaugzxnfaazp", model.volumeName()); - Assertions.assertEquals(2134025822, model.backupsCount()); + VolumeBackups model + = BinaryData.fromString("{\"volumeName\":\"wae\",\"backupsCount\":809360205,\"policyEnabled\":true}") + .toObject(VolumeBackups.class); + Assertions.assertEquals("wae", model.volumeName()); + Assertions.assertEquals(809360205, model.backupsCount()); Assertions.assertEquals(true, model.policyEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumeBackups model - = new VolumeBackups().withVolumeName("ttaugzxnfaazp").withBackupsCount(2134025822).withPolicyEnabled(true); + = new VolumeBackups().withVolumeName("wae").withBackupsCount(809360205).withPolicyEnabled(true); model = BinaryData.fromObject(model).toObject(VolumeBackups.class); - Assertions.assertEquals("ttaugzxnfaazp", model.volumeName()); - Assertions.assertEquals(2134025822, model.backupsCount()); + Assertions.assertEquals("wae", model.volumeName()); + Assertions.assertEquals(809360205, model.backupsCount()); Assertions.assertEquals(true, model.policyEnabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java index 69f234197f32..d2c9a01dd756 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java @@ -45,7 +45,8 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumeGroups().delete("rag", "gdphtvdula", "vl", com.azure.core.util.Context.NONE); + manager.volumeGroups().delete("ptfujgicgaaoept", "aqutdewemxswvruu", "zzjgehkfki", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java index 975fb129f690..20f3e77ccc3e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; import org.junit.jupiter.api.Assertions; @@ -13,27 +12,16 @@ public final class VolumePatchPropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VolumePatchPropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"rkwofyyvoqa\",\"policyEnforced\":true,\"backupEnabled\":true,\"backupVaultId\":\"btgiwbwoenwas\"},\"snapshot\":{\"snapshotPolicyId\":\"dtkcnqxwbpokulp\"}}") + VolumePatchPropertiesDataProtection model = BinaryData.fromString("{\"snapshot\":{\"snapshotPolicyId\":\"d\"}}") .toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("rkwofyyvoqa", model.backup().backupPolicyId()); - Assertions.assertEquals(true, model.backup().policyEnforced()); - Assertions.assertEquals(true, model.backup().backupEnabled()); - Assertions.assertEquals("btgiwbwoenwas", model.backup().backupVaultId()); - Assertions.assertEquals("dtkcnqxwbpokulp", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals("d", model.snapshot().snapshotPolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesDataProtection model = new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("rkwofyyvoqa").withPolicyEnforced(true) - .withBackupEnabled(true).withBackupVaultId("btgiwbwoenwas")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("dtkcnqxwbpokulp")); + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("d")); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("rkwofyyvoqa", model.backup().backupPolicyId()); - Assertions.assertEquals(true, model.backup().policyEnforced()); - Assertions.assertEquals(true, model.backup().backupEnabled()); - Assertions.assertEquals("btgiwbwoenwas", model.backup().backupVaultId()); - Assertions.assertEquals("dtkcnqxwbpokulp", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals("d", model.snapshot().snapshotPolicyId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java index 2373ec7129ab..7aec6206598e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java @@ -15,58 +15,58 @@ public final class VolumePatchPropertiesExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":369562825,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"uxvypomgkopkwh\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":996289807,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"elxprglyatddck\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":41792863,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"bmrqyibahwfl\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]}") + "{\"rules\":[{\"ruleIndex\":1757000388,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"naenqpehindo\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1448466618,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"lkthu\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1315398087,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"fmmdnbbg\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]}") .toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(369562825, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(1757000388, model.rules().get(0).ruleIndex()); Assertions.assertEquals(true, model.rules().get(0).unixReadOnly()); Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).cifs()); - Assertions.assertEquals(false, model.rules().get(0).nfsv3()); - Assertions.assertEquals(false, model.rules().get(0).nfsv41()); - Assertions.assertEquals("uxvypomgkopkwh", model.rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).cifs()); + Assertions.assertEquals(true, model.rules().get(0).nfsv3()); + Assertions.assertEquals(true, model.rules().get(0).nfsv41()); + Assertions.assertEquals("naenqpehindo", model.rules().get(0).allowedClients()); + Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesExportPolicy model = new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(369562825).withUnixReadOnly(true).withUnixReadWrite(true) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(false).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false) - .withCifs(false).withNfsv3(false).withNfsv41(false).withAllowedClients("uxvypomgkopkwh") - .withHasRootAccess(false).withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(996289807).withUnixReadOnly(false).withUnixReadWrite(false) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false) + new ExportPolicyRule().withRuleIndex(1757000388).withUnixReadOnly(true).withUnixReadWrite(true) + .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) - .withCifs(false).withNfsv3(true).withNfsv41(true).withAllowedClients("elxprglyatddck") - .withHasRootAccess(true).withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(41792863).withUnixReadOnly(false).withUnixReadWrite(true) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(false).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true).withCifs(true) - .withNfsv3(false).withNfsv41(false).withAllowedClients("bmrqyibahwfl").withHasRootAccess(true) + .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("naenqpehindo") + .withHasRootAccess(true).withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1448466618).withUnixReadOnly(false).withUnixReadWrite(true) + .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) + .withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("lkthu").withHasRootAccess(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1315398087).withUnixReadOnly(false).withUnixReadWrite(false) + .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) + .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("fmmdnbbg").withHasRootAccess(true) .withChownMode(ChownMode.UNRESTRICTED))); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(369562825, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(1757000388, model.rules().get(0).ruleIndex()); Assertions.assertEquals(true, model.rules().get(0).unixReadOnly()); Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).cifs()); - Assertions.assertEquals(false, model.rules().get(0).nfsv3()); - Assertions.assertEquals(false, model.rules().get(0).nfsv41()); - Assertions.assertEquals("uxvypomgkopkwh", model.rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).cifs()); + Assertions.assertEquals(true, model.rules().get(0).nfsv3()); + Assertions.assertEquals(true, model.rules().get(0).nfsv41()); + Assertions.assertEquals("naenqpehindo", model.rules().get(0).allowedClients()); + Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java index f98bdb857480..0f977f7ba02d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; @@ -23,96 +22,86 @@ public final class VolumePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchProperties model = BinaryData.fromString( - "{\"serviceLevel\":\"Standard\",\"usageThreshold\":5262686588919430594,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1635087277,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"dldwmgxc\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":24.985813,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"oegrpkhjwn\",\"policyEnforced\":false,\"backupEnabled\":true,\"backupVaultId\":\"i\"},\"snapshot\":{\"snapshotPolicyId\":\"ggkzzlvmbmpa\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":2096694396602012626,\"defaultGroupQuotaInKiBs\":3624195401715068445,\"unixPermissions\":\"wsbpfvm\",\"coolAccess\":false,\"coolnessPeriod\":1337725410,\"coolAccessRetrievalPolicy\":\"OnRead\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + "{\"serviceLevel\":\"Ultra\",\"usageThreshold\":6774114395187736753,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":309197108,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"sqfsubcgjbirxb\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":16.671253,\"dataProtection\":{\"snapshot\":{\"snapshotPolicyId\":\"twss\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":6673655197593346070,\"defaultGroupQuotaInKiBs\":6942246112545525154,\"unixPermissions\":\"xilzznf\",\"coolAccess\":true,\"coolnessPeriod\":1331345486,\"coolAccessRetrievalPolicy\":\"OnRead\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Enabled\"}") .toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); - Assertions.assertEquals(5262686588919430594L, model.usageThreshold()); - Assertions.assertEquals(1635087277, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(6774114395187736753L, model.usageThreshold()); + Assertions.assertEquals(309197108, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("dldwmgxc", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).hasRootAccess()); + Assertions.assertEquals("sqfsubcgjbirxb", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(24.985813F, model.throughputMibps()); - Assertions.assertEquals("oegrpkhjwn", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(false, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals(true, model.dataProtection().backup().backupEnabled()); - Assertions.assertEquals("i", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("ggkzzlvmbmpa", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(16.671253F, model.throughputMibps()); + Assertions.assertEquals("twss", model.dataProtection().snapshot().snapshotPolicyId()); Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2096694396602012626L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(3624195401715068445L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("wsbpfvm", model.unixPermissions()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(1337725410, model.coolnessPeriod()); + Assertions.assertEquals(6673655197593346070L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(6942246112545525154L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("xilzznf", model.unixPermissions()); + Assertions.assertEquals(true, model.coolAccess()); + Assertions.assertEquals(1331345486, model.coolnessPeriod()); Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); + Assertions.assertEquals(true, model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD) - .withUsageThreshold(5262686588919430594L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy() - .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(1635087277).withUnixReadOnly(false) - .withUnixReadWrite(false).withKerberos5ReadOnly(true).withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false).withKerberos5IReadWrite(true).withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(true).withCifs(false).withNfsv3(true).withNfsv41(true) - .withAllowedClients("dldwmgxc").withHasRootAccess(true).withChownMode(ChownMode.RESTRICTED)))) - .withThroughputMibps(24.985813F) + VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.ULTRA) + .withUsageThreshold(6774114395187736753L) + .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays + .asList(new ExportPolicyRule().withRuleIndex(309197108).withUnixReadOnly(true).withUnixReadWrite(false) + .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) + .withCifs(false).withNfsv3(false).withNfsv41(true).withAllowedClients("sqfsubcgjbirxb") + .withHasRootAccess(false).withChownMode(ChownMode.RESTRICTED)))) + .withThroughputMibps(16.671253F) .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("oegrpkhjwn").withPolicyEnforced(false) - .withBackupEnabled(true).withBackupVaultId("i")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("ggkzzlvmbmpa"))) - .withIsDefaultQuotaEnabled(true).withDefaultUserQuotaInKiBs(2096694396602012626L) - .withDefaultGroupQuotaInKiBs(3624195401715068445L).withUnixPermissions("wsbpfvm").withCoolAccess(false) - .withCoolnessPeriod(1337725410).withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) - .withSnapshotDirectoryVisible(false).withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("twss"))) + .withIsDefaultQuotaEnabled(true).withDefaultUserQuotaInKiBs(6673655197593346070L) + .withDefaultGroupQuotaInKiBs(6942246112545525154L).withUnixPermissions("xilzznf").withCoolAccess(true) + .withCoolnessPeriod(1331345486).withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) + .withSnapshotDirectoryVisible(true).withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED); model = BinaryData.fromObject(model).toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); - Assertions.assertEquals(5262686588919430594L, model.usageThreshold()); - Assertions.assertEquals(1635087277, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(6774114395187736753L, model.usageThreshold()); + Assertions.assertEquals(309197108, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("dldwmgxc", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).hasRootAccess()); + Assertions.assertEquals("sqfsubcgjbirxb", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(24.985813F, model.throughputMibps()); - Assertions.assertEquals("oegrpkhjwn", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(false, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals(true, model.dataProtection().backup().backupEnabled()); - Assertions.assertEquals("i", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("ggkzzlvmbmpa", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(16.671253F, model.throughputMibps()); + Assertions.assertEquals("twss", model.dataProtection().snapshot().snapshotPolicyId()); Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2096694396602012626L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(3624195401715068445L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("wsbpfvm", model.unixPermissions()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(1337725410, model.coolnessPeriod()); + Assertions.assertEquals(6673655197593346070L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(6942246112545525154L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("xilzznf", model.unixPermissions()); + Assertions.assertEquals(true, model.coolAccess()); + Assertions.assertEquals(1331345486, model.coolnessPeriod()); Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); + Assertions.assertEquals(true, model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java index dc8fe9d23e15..ff08c9ea417b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePatch; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; @@ -25,110 +24,106 @@ public final class VolumePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatch model = BinaryData.fromString( - "{\"properties\":{\"serviceLevel\":\"Premium\",\"usageThreshold\":1361117454482820932,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1245356368,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"dlkzgxhuri\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1647151619,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"evseotgqrlltmuwl\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1035303462,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"pxebmnzbt\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":61.801933,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"hdneuelfph\",\"policyEnforced\":true,\"backupEnabled\":false,\"backupVaultId\":\"zfikd\"},\"snapshot\":{\"snapshotPolicyId\":\"quuvxzxcl\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":6834800268886491051,\"defaultGroupQuotaInKiBs\":758398116524411728,\"unixPermissions\":\"sg\",\"coolAccess\":true,\"coolnessPeriod\":1373872192,\"coolAccessRetrievalPolicy\":\"OnRead\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Enabled\",\"smbNonBrowsable\":\"Disabled\"},\"location\":\"aljutiiswac\",\"tags\":{\"pnppfuf\":\"dkzzewkfvhqcrail\"},\"id\":\"rwdmhdlxyjrxsa\",\"name\":\"afcnih\",\"type\":\"wqapnedgfbcvk\"}") + "{\"properties\":{\"serviceLevel\":\"Ultra\",\"usageThreshold\":2245300278286998069,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1252528512,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"hcaalnjix\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":939698337,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"xhnrztfolhb\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1904300707,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"vpgylgqgitxmed\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":73392328,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"eoellwptfdygp\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":82.87768,\"dataProtection\":{\"snapshot\":{\"snapshotPolicyId\":\"fqrhhuaopppc\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":2031358735864920909,\"defaultGroupQuotaInKiBs\":1205860539886844150,\"unixPermissions\":\"zxctobgb\",\"coolAccess\":false,\"coolnessPeriod\":1356840761,\"coolAccessRetrievalPolicy\":\"Default\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"},\"location\":\"cfbu\",\"tags\":{\"xxjyngudivkrtsw\":\"fqjhhkxbpvjymj\",\"vjfdx\":\"xqzvszjfa\",\"qtdo\":\"ivetvtcq\"},\"id\":\"mcbxvwvxysl\",\"name\":\"bhsfxob\",\"type\":\"ytkblmpew\"}") .toObject(VolumePatch.class); - Assertions.assertEquals("aljutiiswac", model.location()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.tags().get("pnppfuf")); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1361117454482820932L, model.usageThreshold()); - Assertions.assertEquals(1245356368, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); + Assertions.assertEquals("cfbu", model.location()); + Assertions.assertEquals("fqjhhkxbpvjymj", model.tags().get("xxjyngudivkrtsw")); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(2245300278286998069L, model.usageThreshold()); + Assertions.assertEquals(1252528512, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("dlkzgxhuri", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(61.801933F, model.throughputMibps()); - Assertions.assertEquals("hdneuelfph", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(true, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals(false, model.dataProtection().backup().backupEnabled()); - Assertions.assertEquals("zfikd", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("quuvxzxcl", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv41()); + Assertions.assertEquals("hcaalnjix", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); + Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); + Assertions.assertEquals(82.87768F, model.throughputMibps()); + Assertions.assertEquals("fqrhhuaopppc", model.dataProtection().snapshot().snapshotPolicyId()); Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(6834800268886491051L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(758398116524411728L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("sg", model.unixPermissions()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(1373872192, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(2031358735864920909L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1205860539886844150L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("zxctobgb", model.unixPermissions()); + Assertions.assertEquals(false, model.coolAccess()); + Assertions.assertEquals(1356840761, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(true, model.snapshotDirectoryVisible()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePatch model = new VolumePatch().withLocation("aljutiiswac").withTags(mapOf("pnppfuf", "dkzzewkfvhqcrail")) - .withServiceLevel(ServiceLevel.PREMIUM).withUsageThreshold(1361117454482820932L) + VolumePatch model = new VolumePatch().withLocation("cfbu") + .withTags(mapOf("xxjyngudivkrtsw", "fqjhhkxbpvjymj", "vjfdx", "xqzvszjfa", "qtdo", "ivetvtcq")) + .withServiceLevel(ServiceLevel.ULTRA).withUsageThreshold(2245300278286998069L) .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1245356368).withUnixReadOnly(false).withUnixReadWrite(false) + new ExportPolicyRule().withRuleIndex(1252528512).withUnixReadOnly(true).withUnixReadWrite(false) + .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(false).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true) + .withCifs(true).withNfsv3(false).withNfsv41(false).withAllowedClients("hcaalnjix") + .withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED), + new ExportPolicyRule().withRuleIndex(939698337).withUnixReadOnly(true).withUnixReadWrite(true) .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) - .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("dlkzgxhuri") - .withHasRootAccess(true).withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1647151619).withUnixReadOnly(true).withUnixReadWrite(true) - .withKerberos5ReadOnly(true).withKerberos5ReadWrite(false).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false) - .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("evseotgqrlltmuwl") + .withKerberos5IReadWrite(true).withKerberos5PReadOnly(true).withKerberos5PReadWrite(false) + .withCifs(true).withNfsv3(true).withNfsv41(true).withAllowedClients("xhnrztfolhb") .withHasRootAccess(true).withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1035303462).withUnixReadOnly(true).withUnixReadWrite(false) + new ExportPolicyRule().withRuleIndex(1904300707).withUnixReadOnly(false).withUnixReadWrite(false) .withKerberos5ReadOnly(true).withKerberos5ReadWrite(true).withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) - .withCifs(false).withNfsv3(true).withNfsv41(false).withAllowedClients("pxebmnzbt") - .withHasRootAccess(true).withChownMode(ChownMode.RESTRICTED)))) - .withThroughputMibps(61.801933F) + .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) + .withCifs(false).withNfsv3(false).withNfsv41(false).withAllowedClients("vpgylgqgitxmed") + .withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED), + new ExportPolicyRule().withRuleIndex(73392328).withUnixReadOnly(true).withUnixReadWrite(false) + .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(true) + .withCifs(true).withNfsv3(true).withNfsv41(false).withAllowedClients("eoellwptfdygp") + .withHasRootAccess(false).withChownMode(ChownMode.RESTRICTED)))) + .withThroughputMibps(82.87768F) .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("hdneuelfph").withPolicyEnforced(true) - .withBackupEnabled(false).withBackupVaultId("zfikd")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("quuvxzxcl"))) - .withIsDefaultQuotaEnabled(true).withDefaultUserQuotaInKiBs(6834800268886491051L) - .withDefaultGroupQuotaInKiBs(758398116524411728L).withUnixPermissions("sg").withCoolAccess(true) - .withCoolnessPeriod(1373872192).withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) - .withSnapshotDirectoryVisible(false).withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("fqrhhuaopppc"))) + .withIsDefaultQuotaEnabled(true).withDefaultUserQuotaInKiBs(2031358735864920909L) + .withDefaultGroupQuotaInKiBs(1205860539886844150L).withUnixPermissions("zxctobgb").withCoolAccess(false) + .withCoolnessPeriod(1356840761).withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) + .withSnapshotDirectoryVisible(true).withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); model = BinaryData.fromObject(model).toObject(VolumePatch.class); - Assertions.assertEquals("aljutiiswac", model.location()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.tags().get("pnppfuf")); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1361117454482820932L, model.usageThreshold()); - Assertions.assertEquals(1245356368, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); + Assertions.assertEquals("cfbu", model.location()); + Assertions.assertEquals("fqjhhkxbpvjymj", model.tags().get("xxjyngudivkrtsw")); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(2245300278286998069L, model.usageThreshold()); + Assertions.assertEquals(1252528512, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertEquals(true, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("dlkzgxhuri", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(61.801933F, model.throughputMibps()); - Assertions.assertEquals("hdneuelfph", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(true, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals(false, model.dataProtection().backup().backupEnabled()); - Assertions.assertEquals("zfikd", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("quuvxzxcl", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv41()); + Assertions.assertEquals("hcaalnjix", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); + Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); + Assertions.assertEquals(82.87768F, model.throughputMibps()); + Assertions.assertEquals("fqrhhuaopppc", model.dataProtection().snapshot().snapshotPolicyId()); Assertions.assertEquals(true, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(6834800268886491051L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(758398116524411728L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("sg", model.unixPermissions()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(1373872192, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(2031358735864920909L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1205860539886844150L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("zxctobgb", model.unixPermissions()); + Assertions.assertEquals(false, model.coolAccess()); + Assertions.assertEquals(1356840761, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(true, model.snapshotDirectoryVisible()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java index 1aff05f33e2f..350be53a19c1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java @@ -6,10 +6,8 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.RemotePath; import com.azure.resourcemanager.netapp.models.ReplicationObject; import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumeRelocationProperties; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; @@ -19,49 +17,30 @@ public final class VolumePropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"duhavhqlkt\",\"policyEnforced\":true,\"backupEnabled\":false,\"backupVaultId\":\"lbg\"},\"replication\":{\"replicationId\":\"uie\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"y\",\"remotePath\":{\"externalHostName\":\"aolps\",\"serverName\":\"lqlfm\",\"volumeName\":\"dnbbglzps\"},\"remoteVolumeRegion\":\"ydmcwyhzdxssa\"},\"snapshot\":{\"snapshotPolicyId\":\"mnvdfzn\"},\"volumeRelocation\":{\"relocationRequested\":false,\"readyToBeFinalized\":false}}") + "{\"replication\":{\"replicationId\":\"vgqzcjrvxd\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"lxkvu\",\"remoteVolumeRegion\":\"hzovawjvzunlut\"},\"snapshot\":{\"snapshotPolicyId\":\"prnxipeil\"},\"volumeRelocation\":{\"relocationRequested\":true,\"readyToBeFinalized\":false}}") .toObject(VolumePropertiesDataProtection.class); - Assertions.assertEquals("duhavhqlkt", model.backup().backupPolicyId()); - Assertions.assertEquals(true, model.backup().policyEnforced()); - Assertions.assertEquals(false, model.backup().backupEnabled()); - Assertions.assertEquals("lbg", model.backup().backupVaultId()); Assertions.assertEquals(EndpointType.DST, model.replication().endpointType()); Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replication().replicationSchedule()); - Assertions.assertEquals("y", model.replication().remoteVolumeResourceId()); - Assertions.assertEquals("aolps", model.replication().remotePath().externalHostname()); - Assertions.assertEquals("lqlfm", model.replication().remotePath().serverName()); - Assertions.assertEquals("dnbbglzps", model.replication().remotePath().volumeName()); - Assertions.assertEquals("ydmcwyhzdxssa", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("mnvdfzn", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(false, model.volumeRelocation().relocationRequested()); + Assertions.assertEquals("lxkvu", model.replication().remoteVolumeResourceId()); + Assertions.assertEquals("hzovawjvzunlut", model.replication().remoteVolumeRegion()); + Assertions.assertEquals("prnxipeil", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(true, model.volumeRelocation().relocationRequested()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePropertiesDataProtection model - = new VolumePropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("duhavhqlkt").withPolicyEnforced(true) - .withBackupEnabled(false).withBackupVaultId("lbg")) - .withReplication(new ReplicationObject().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY).withRemoteVolumeResourceId("y") - .withRemotePath(new RemotePath().withExternalHostname("aolps").withServerName("lqlfm") - .withVolumeName("dnbbglzps")) - .withRemoteVolumeRegion("ydmcwyhzdxssa")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("mnvdfzn")) - .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(false)); + VolumePropertiesDataProtection model = new VolumePropertiesDataProtection() + .withReplication(new ReplicationObject().withEndpointType(EndpointType.DST) + .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY).withRemoteVolumeResourceId("lxkvu") + .withRemoteVolumeRegion("hzovawjvzunlut")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("prnxipeil")) + .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(true)); model = BinaryData.fromObject(model).toObject(VolumePropertiesDataProtection.class); - Assertions.assertEquals("duhavhqlkt", model.backup().backupPolicyId()); - Assertions.assertEquals(true, model.backup().policyEnforced()); - Assertions.assertEquals(false, model.backup().backupEnabled()); - Assertions.assertEquals("lbg", model.backup().backupVaultId()); Assertions.assertEquals(EndpointType.DST, model.replication().endpointType()); Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replication().replicationSchedule()); - Assertions.assertEquals("y", model.replication().remoteVolumeResourceId()); - Assertions.assertEquals("aolps", model.replication().remotePath().externalHostname()); - Assertions.assertEquals("lqlfm", model.replication().remotePath().serverName()); - Assertions.assertEquals("dnbbglzps", model.replication().remotePath().volumeName()); - Assertions.assertEquals("ydmcwyhzdxssa", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("mnvdfzn", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(false, model.volumeRelocation().relocationRequested()); + Assertions.assertEquals("lxkvu", model.replication().remoteVolumeResourceId()); + Assertions.assertEquals("hzovawjvzunlut", model.replication().remoteVolumeRegion()); + Assertions.assertEquals("prnxipeil", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(true, model.volumeRelocation().relocationRequested()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java index 3aef08b73eec..0fabbbe24966 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java @@ -15,48 +15,53 @@ public final class VolumePropertiesExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":561759175,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"jzbexilzznfq\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]}") + "{\"rules\":[{\"ruleIndex\":1149825898,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"jriplrbpbewtghf\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1553365340,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"loayqcgw\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"}]}") .toObject(VolumePropertiesExportPolicy.class); - Assertions.assertEquals(561759175, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(1149825898, model.rules().get(0).ruleIndex()); Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); Assertions.assertEquals(true, model.rules().get(0).cifs()); Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(false, model.rules().get(0).nfsv41()); - Assertions.assertEquals("jzbexilzznfq", model.rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(true, model.rules().get(0).nfsv41()); + Assertions.assertEquals("jriplrbpbewtghf", model.rules().get(0).allowedClients()); + Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePropertiesExportPolicy model = new VolumePropertiesExportPolicy() - .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(561759175).withUnixReadOnly(false) - .withUnixReadWrite(true).withKerberos5ReadOnly(false).withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false).withKerberos5IReadWrite(true).withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(false).withCifs(true).withNfsv3(true).withNfsv41(false) - .withAllowedClients("jzbexilzznfq").withHasRootAccess(false).withChownMode(ChownMode.RESTRICTED))); + VolumePropertiesExportPolicy model = new VolumePropertiesExportPolicy().withRules(Arrays.asList( + new ExportPolicyRule().withRuleIndex(1149825898).withUnixReadOnly(false).withUnixReadWrite(true) + .withKerberos5ReadOnly(false).withKerberos5ReadWrite(true).withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(true).withKerberos5PReadOnly(true).withKerberos5PReadWrite(true).withCifs(true) + .withNfsv3(true).withNfsv41(true).withAllowedClients("jriplrbpbewtghf").withHasRootAccess(true) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1553365340).withUnixReadOnly(true).withUnixReadWrite(false) + .withKerberos5ReadOnly(true).withKerberos5ReadWrite(false).withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(true).withKerberos5PReadOnly(false).withKerberos5PReadWrite(false) + .withCifs(true).withNfsv3(false).withNfsv41(true).withAllowedClients("loayqcgw") + .withHasRootAccess(false).withChownMode(ChownMode.UNRESTRICTED))); model = BinaryData.fromObject(model).toObject(VolumePropertiesExportPolicy.class); - Assertions.assertEquals(561759175, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(1149825898, model.rules().get(0).ruleIndex()); Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); Assertions.assertEquals(true, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadWrite()); Assertions.assertEquals(true, model.rules().get(0).cifs()); Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(false, model.rules().get(0).nfsv41()); - Assertions.assertEquals("jzbexilzznfq", model.rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(true, model.rules().get(0).nfsv41()); + Assertions.assertEquals("jriplrbpbewtghf", model.rules().get(0).allowedClients()); + Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java index f988270c02f6..8197628d5438 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java @@ -15,26 +15,26 @@ public final class VolumeQuotaRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":1929545324703716474,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"srtkfa\"},\"location\":\"opqgikyzirtxdyux\",\"tags\":{\"wgioilqukry\":\"ntps\",\"gufhyaomtbg\":\"xtqmieoxor\",\"fo\":\"havgrvk\",\"mv\":\"jzhpjbibgjmfx\"},\"id\":\"cluyovwxnbkf\",\"name\":\"zzxscyhwzdgiruj\",\"type\":\"zbomvzzbtdcqvpni\"}") + "{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":6449918274697799558,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"xqi\"},\"location\":\"qunyowxwlmdjr\",\"tags\":{\"vfvpdbodaciz\":\"g\",\"lhkrribdeibqipqk\":\"j\",\"rwkq\":\"hvxndzwmkrefajpj\"},\"id\":\"yhgbijtjivfx\",\"name\":\"sjabibs\",\"type\":\"stawfsdjpvkv\"}") .toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("opqgikyzirtxdyux", model.location()); - Assertions.assertEquals("ntps", model.tags().get("wgioilqukry")); - Assertions.assertEquals(1929545324703716474L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("srtkfa", model.quotaTarget()); + Assertions.assertEquals("qunyowxwlmdjr", model.location()); + Assertions.assertEquals("g", model.tags().get("vfvpdbodaciz")); + Assertions.assertEquals(6449918274697799558L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); + Assertions.assertEquals("xqi", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("opqgikyzirtxdyux") - .withTags(mapOf("wgioilqukry", "ntps", "gufhyaomtbg", "xtqmieoxor", "fo", "havgrvk", "mv", "jzhpjbibgjmfx")) - .withQuotaSizeInKiBs(1929545324703716474L).withQuotaType(Type.DEFAULT_USER_QUOTA).withQuotaTarget("srtkfa"); + VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("qunyowxwlmdjr") + .withTags(mapOf("vfvpdbodaciz", "g", "lhkrribdeibqipqk", "j", "rwkq", "hvxndzwmkrefajpj")) + .withQuotaSizeInKiBs(6449918274697799558L).withQuotaType(Type.INDIVIDUAL_USER_QUOTA).withQuotaTarget("xqi"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("opqgikyzirtxdyux", model.location()); - Assertions.assertEquals("ntps", model.tags().get("wgioilqukry")); - Assertions.assertEquals(1929545324703716474L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("srtkfa", model.quotaTarget()); + Assertions.assertEquals("qunyowxwlmdjr", model.location()); + Assertions.assertEquals("g", model.tags().get("vfvpdbodaciz")); + Assertions.assertEquals(6449918274697799558L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); + Assertions.assertEquals("xqi", model.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java index 637483c5f895..699f471d9011 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java @@ -15,24 +15,26 @@ public final class VolumeQuotaRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulePatch model = BinaryData.fromString( - "{\"tags\":{\"rfh\":\"sgaojfmwncot\",\"xoftpipiwyczu\":\"rctym\"},\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":5299678736839094769,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"hyus\"}}") + "{\"tags\":{\"zhjjklffhmouwq\":\"jabudurgkakmo\",\"eeyebi\":\"gzrf\",\"wrv\":\"ikayuhqlbjbsybb\",\"slthaq\":\"ldgmfpgvmpip\"},\"properties\":{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":152886456423473805,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"dsrezpdrhneuyow\"}}") .toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("sgaojfmwncot", model.tags().get("rfh")); - Assertions.assertEquals(5299678736839094769L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("hyus", model.quotaTarget()); + Assertions.assertEquals("jabudurgkakmo", model.tags().get("zhjjklffhmouwq")); + Assertions.assertEquals(152886456423473805L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("dsrezpdrhneuyow", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumeQuotaRulePatch model = new VolumeQuotaRulePatch() - .withTags(mapOf("rfh", "sgaojfmwncot", "xoftpipiwyczu", "rctym")).withQuotaSizeInKiBs(5299678736839094769L) - .withQuotaType(Type.INDIVIDUAL_USER_QUOTA).withQuotaTarget("hyus"); + .withTags(mapOf("zhjjklffhmouwq", "jabudurgkakmo", "eeyebi", "gzrf", "wrv", "ikayuhqlbjbsybb", "slthaq", + "ldgmfpgvmpip")) + .withQuotaSizeInKiBs(152886456423473805L).withQuotaType(Type.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("dsrezpdrhneuyow"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("sgaojfmwncot", model.tags().get("rfh")); - Assertions.assertEquals(5299678736839094769L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("hyus", model.quotaTarget()); + Assertions.assertEquals("jabudurgkakmo", model.tags().get("zhjjklffhmouwq")); + Assertions.assertEquals(152886456423473805L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("dsrezpdrhneuyow", model.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java index 92b87ceb96ba..18802062903e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java @@ -34,7 +34,7 @@ public void testCreate() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":8901688908822636445,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"tnpqmemczjk\"},\"location\":\"ykyujxsg\",\"tags\":{\"yejylmbkzudnigrf\":\"rr\",\"wlpxuzzjg\":\"hotj\",\"qotoihiqakydiwfb\":\"refqy\",\"spodaqax\":\"kwpzdqtvh\"},\"id\":\"ipietgbe\",\"name\":\"jfulbmoic\",\"type\":\"dlpnfpubn\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":1851749746038265021,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"hfqpofv\"},\"location\":\"cblembnkbwv\",\"tags\":{\"qihebw\":\"kdi\"},\"id\":\"swbzuwfmdurage\",\"name\":\"izvcjfe\",\"type\":\"isdju\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,16 +51,18 @@ public void testCreate() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - VolumeQuotaRule response = manager.volumeQuotaRules().define("cbvopwndyqleallk").withRegion("yzfhotlhi") - .withExistingVolume("ycjimryvwgcwwpbm", "gwe", "ydsx", "efoh").withTags(mapOf("vuicp", "ychunsjlpjrtwszh")) - .withQuotaSizeInKiBs(571481130330646230L).withQuotaType(Type.DEFAULT_GROUP_QUOTA) - .withQuotaTarget("xpvbrdfjm").create(); + VolumeQuotaRule response = manager.volumeQuotaRules().define("kqscazuawxtzx").withRegion("sflvgsgzwywakoih") + .withExistingVolume("cpopmxel", "wcltyjede", "xm", "f") + .withTags(mapOf("zotqyryuzcb", "mjblmljhlny", "peujlzqn", "qqvxmvwfgtayxons", "nzoibgsxgnx", "cvsql", + "mpqoxw", "yqo")) + .withQuotaSizeInKiBs(5532317119730945052L).withQuotaType(Type.INDIVIDUAL_GROUP_QUOTA) + .withQuotaTarget("vxcushsphaivmx").create(); - Assertions.assertEquals("ykyujxsg", response.location()); - Assertions.assertEquals("rr", response.tags().get("yejylmbkzudnigrf")); - Assertions.assertEquals(8901688908822636445L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("tnpqmemczjk", response.quotaTarget()); + Assertions.assertEquals("cblembnkbwv", response.location()); + Assertions.assertEquals("kdi", response.tags().get("qihebw")); + Assertions.assertEquals(1851749746038265021L, response.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.quotaType()); + Assertions.assertEquals("hfqpofv", response.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java index af9a09e04f38..b2a093f970f7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java @@ -45,7 +45,7 @@ public void testDelete() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumeQuotaRules().delete("owlkjxnqpv", "gf", "tmhqykiz", "d", "saoafcluqvox", + manager.volumeQuotaRules().delete("awjutifd", "fmvigorqjbttzh", "aglkafhon", "juj", "ickpz", com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java index 8c32944df20e..0dd2a5918fd0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java @@ -32,7 +32,7 @@ public void testGetWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"properties\":{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":6402661217613808008,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"oqboshbragapyyr\"},\"location\":\"svbpavbopfppdbwn\",\"tags\":{\"asjcaacfdmmcpu\":\"ahxku\",\"zeh\":\"mehqepvufh\",\"clgsc\":\"whoqhnlbqnbldxe\",\"rsrrmoucsofldp\":\"orim\"},\"id\":\"viyfcaabeolhbhlv\",\"name\":\"mxuq\",\"type\":\"bsxtkcudfbsfarfs\"}"; + = "{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":3265340554220962405,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"ajqglcf\"},\"location\":\"l\",\"tags\":{\"zrdpsovwxznptgoe\":\"yxynq\",\"vntjlrigjk\":\"ybbabpfhvfsl\",\"xwaabzmifrygznmm\":\"kyrioovzid\"},\"id\":\"xrizkzobgop\",\"name\":\"lhslnelxieixyn\",\"type\":\"lxecwcrojphslh\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -49,13 +49,13 @@ public void testGetWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - VolumeQuotaRule response = manager.volumeQuotaRules().getWithResponse("zb", "ybww", "bdvibidmhmwffpl", "muvapc", - "ccrrvweyoxoyyu", com.azure.core.util.Context.NONE).getValue(); + VolumeQuotaRule response = manager.volumeQuotaRules().getWithResponse("ids", "ault", "ijjumfq", + "azlnqnmcjngzqdqx", "bjwgnyfus", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("svbpavbopfppdbwn", response.location()); - Assertions.assertEquals("ahxku", response.tags().get("asjcaacfdmmcpu")); - Assertions.assertEquals(6402661217613808008L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("oqboshbragapyyr", response.quotaTarget()); + Assertions.assertEquals("l", response.location()); + Assertions.assertEquals("yxynq", response.tags().get("zrdpsovwxznptgoe")); + Assertions.assertEquals(3265340554220962405L, response.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.quotaType()); + Assertions.assertEquals("ajqglcf", response.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java index 8668bc2662c4..3f73d4c3866a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java @@ -33,7 +33,7 @@ public void testListByVolume() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":6035951377180684883,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"oxczytp\"},\"location\":\"nwvroevytlyokrr\",\"tags\":{\"rxklobdxnazpmk\":\"uxvnsasbcrymodi\",\"vfxzopjh\":\"lmv\",\"d\":\"zxlioh\"},\"id\":\"dtfgxqbawpcbb\",\"name\":\"zqcyknap\",\"type\":\"ofyuicd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":8351814854754932643,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"bwefqsfapaqtfer\"},\"location\":\"wexjkmfxapjwogq\",\"tags\":{\"qwpwyawbzasqbuc\":\"bpudcdab\"},\"id\":\"jg\",\"name\":\"yexaoguy\",\"type\":\"i\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,13 +50,13 @@ public void testListByVolume() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.volumeQuotaRules().listByVolume("ninvudbchaqdt", "qecrqctmxx", - "tddmf", "huytxzvtzn", com.azure.core.util.Context.NONE); + PagedIterable response = manager.volumeQuotaRules().listByVolume("cpilj", "a", "zv", + "chndbnwie", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nwvroevytlyokrr", response.iterator().next().location()); - Assertions.assertEquals("uxvnsasbcrymodi", response.iterator().next().tags().get("rxklobdxnazpmk")); - Assertions.assertEquals(6035951377180684883L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("oxczytp", response.iterator().next().quotaTarget()); + Assertions.assertEquals("wexjkmfxapjwogq", response.iterator().next().location()); + Assertions.assertEquals("bpudcdab", response.iterator().next().tags().get("qwpwyawbzasqbuc")); + Assertions.assertEquals(8351814854754932643L, response.iterator().next().quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.iterator().next().quotaType()); + Assertions.assertEquals("bwefqsfapaqtfer", response.iterator().next().quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java index 82f378c7a4ed..b343860aea05 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java @@ -17,31 +17,29 @@ public final class VolumeQuotaRulesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":5649279960979439308,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"bihwqknfdnt\"},\"location\":\"chrdgoihxumwcto\",\"tags\":{\"udfdlwgg\":\"jl\"},\"id\":\"tsbwtovvtgse\",\"name\":\"nqfiufxqknpi\",\"type\":\"gnepttwqmsni\"},{\"properties\":{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":8728192731821949448,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"lpijnkrxfrd\"},\"location\":\"c\",\"tags\":{\"hftwesgog\":\"izzronasxiftozqy\",\"sxkkg\":\"zhonnxkrlgnyhmo\",\"rghxjb\":\"h\"},\"id\":\"hqxvcxgfrpdsofbs\",\"name\":\"rnsvbuswd\",\"type\":\"z\"}]}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":4528392326800353907,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"wem\"},\"location\":\"rncsdtclu\",\"tags\":{\"lfeadcygq\":\"pbsfgytgu\",\"elolppvksrpqvuj\":\"kyhejhzisxgf\",\"wib\":\"raehtwdwrft\",\"cstwity\":\"rcdlbhshfwpr\"},\"id\":\"hevxcced\",\"name\":\"pnmdyodnwzxltjcv\",\"type\":\"hlt\"}]}") .toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("chrdgoihxumwcto", model.value().get(0).location()); - Assertions.assertEquals("jl", model.value().get(0).tags().get("udfdlwgg")); - Assertions.assertEquals(5649279960979439308L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("bihwqknfdnt", model.value().get(0).quotaTarget()); + Assertions.assertEquals("rncsdtclu", model.value().get(0).location()); + Assertions.assertEquals("pbsfgytgu", model.value().get(0).tags().get("lfeadcygq")); + Assertions.assertEquals(4528392326800353907L, model.value().get(0).quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("wem", model.value().get(0).quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulesList model = new VolumeQuotaRulesList().withValue(Arrays.asList( - new VolumeQuotaRuleInner().withLocation("chrdgoihxumwcto").withTags(mapOf("udfdlwgg", "jl")) - .withQuotaSizeInKiBs(5649279960979439308L).withQuotaType(Type.DEFAULT_GROUP_QUOTA) - .withQuotaTarget("bihwqknfdnt"), - new VolumeQuotaRuleInner().withLocation("c") - .withTags(mapOf("hftwesgog", "izzronasxiftozqy", "sxkkg", "zhonnxkrlgnyhmo", "rghxjb", "h")) - .withQuotaSizeInKiBs(8728192731821949448L).withQuotaType(Type.INDIVIDUAL_USER_QUOTA) - .withQuotaTarget("lpijnkrxfrd"))); + VolumeQuotaRulesList model + = new VolumeQuotaRulesList().withValue(Arrays.asList(new VolumeQuotaRuleInner().withLocation("rncsdtclu") + .withTags(mapOf("lfeadcygq", "pbsfgytgu", "elolppvksrpqvuj", "kyhejhzisxgf", "wib", "raehtwdwrft", + "cstwity", "rcdlbhshfwpr")) + .withQuotaSizeInKiBs(4528392326800353907L).withQuotaType(Type.INDIVIDUAL_GROUP_QUOTA) + .withQuotaTarget("wem"))); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("chrdgoihxumwcto", model.value().get(0).location()); - Assertions.assertEquals("jl", model.value().get(0).tags().get("udfdlwgg")); - Assertions.assertEquals(5649279960979439308L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("bihwqknfdnt", model.value().get(0).quotaTarget()); + Assertions.assertEquals("rncsdtclu", model.value().get(0).location()); + Assertions.assertEquals("pbsfgytgu", model.value().get(0).tags().get("lfeadcygq")); + Assertions.assertEquals(4528392326800353907L, model.value().get(0).quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("wem", model.value().get(0).quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java index 440789922f84..4085a07e1e74 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java @@ -13,20 +13,20 @@ public final class VolumeQuotaRulesPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":4156012930167419412,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"shfssnrbgyef\"}") + "{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":7435265632351903503,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"kd\"}") .toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(4156012930167419412L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("shfssnrbgyef", model.quotaTarget()); + Assertions.assertEquals(7435265632351903503L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("kd", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(4156012930167419412L) - .withQuotaType(Type.DEFAULT_USER_QUOTA).withQuotaTarget("shfssnrbgyef"); + VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(7435265632351903503L) + .withQuotaType(Type.DEFAULT_GROUP_QUOTA).withQuotaTarget("kd"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(4156012930167419412L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("shfssnrbgyef", model.quotaTarget()); + Assertions.assertEquals(7435265632351903503L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("kd", model.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java index 7ebdaf532ab9..0640f8fafd17 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java @@ -12,15 +12,15 @@ public final class VolumeRelocationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeRelocationProperties model - = BinaryData.fromString("{\"relocationRequested\":false,\"readyToBeFinalized\":false}") + = BinaryData.fromString("{\"relocationRequested\":true,\"readyToBeFinalized\":false}") .toObject(VolumeRelocationProperties.class); - Assertions.assertEquals(false, model.relocationRequested()); + Assertions.assertEquals(true, model.relocationRequested()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeRelocationProperties model = new VolumeRelocationProperties().withRelocationRequested(false); + VolumeRelocationProperties model = new VolumeRelocationProperties().withRelocationRequested(true); model = BinaryData.fromObject(model).toObject(VolumeRelocationProperties.class); - Assertions.assertEquals(false, model.relocationRequested()); + Assertions.assertEquals(true, model.relocationRequested()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java index cef11d42f9f3..5cf8be1577f4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java @@ -11,14 +11,14 @@ public final class VolumeRevertTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"jwaa\"}").toObject(VolumeRevert.class); - Assertions.assertEquals("jwaa", model.snapshotId()); + VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"wyhzdx\"}").toObject(VolumeRevert.class); + Assertions.assertEquals("wyhzdx", model.snapshotId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeRevert model = new VolumeRevert().withSnapshotId("jwaa"); + VolumeRevert model = new VolumeRevert().withSnapshotId("wyhzdx"); model = BinaryData.fromObject(model).toObject(VolumeRevert.class); - Assertions.assertEquals("jwaa", model.snapshotId()); + Assertions.assertEquals("wyhzdx", model.snapshotId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java index 811316d08ab9..1a44683415cc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java @@ -12,14 +12,14 @@ public final class VolumeSnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeSnapshotProperties model - = BinaryData.fromString("{\"snapshotPolicyId\":\"konzmnsik\"}").toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("konzmnsik", model.snapshotPolicyId()); + = BinaryData.fromString("{\"snapshotPolicyId\":\"p\"}").toObject(VolumeSnapshotProperties.class); + Assertions.assertEquals("p", model.snapshotPolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("konzmnsik"); + VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("p"); model = BinaryData.fromObject(model).toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("konzmnsik", model.snapshotPolicyId()); + Assertions.assertEquals("p", model.snapshotPolicyId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java index 0b9a7419d693..241e2629f008 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java @@ -46,8 +46,8 @@ public void testAuthorizeReplication() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().authorizeReplication("aoqltfaey", "inmfgvxirp", "hriypoqeyhlqhy", "prlpy", - new AuthorizeRequest().withRemoteVolumeResourceId("uciqdsme"), com.azure.core.util.Context.NONE); + manager.volumes().authorizeReplication("lqxihhrmooiz", "seypxiutcxapz", "y", "petogebjox", + new AuthorizeRequest().withRemoteVolumeResourceId("hvnh"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java index d9185fba738f..3d4e77089b28 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java @@ -46,8 +46,8 @@ public void testBreakFileLocks() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().breakFileLocks("wjlvizbfhfov", "acqpbtuodxesza", "belawumuaslzkwr", "woycqucwyha", - new BreakFileLocksRequest().withClientIp("omd").withConfirmRunningDisruptiveOperation(true), + manager.volumes().breakFileLocks("aspavehhr", "kbunzoz", "dhcxgkmoy", "cdyuibhmfdnbzyd", + new BreakFileLocksRequest().withClientIp("vfcjnaeoisrvhmg").withConfirmRunningDisruptiveOperation(true), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java index 306244e6f5d3..8c6225ada785 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java @@ -46,8 +46,8 @@ public void testBreakReplication() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().breakReplication("qspkcdqzhlctd", "unqndyfpchrqb", "jjrcgegydc", "boxjumvq", - new BreakReplicationRequest().withForceBreakReplication(true), com.azure.core.util.Context.NONE); + manager.volumes().breakReplication("iuagydwqfbylyrfg", "agt", "ojocqwogf", "zjvusfzldmo", + new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java index 88161039960a..1391fbc7d717 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java @@ -45,7 +45,7 @@ public void testDeleteReplication() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().deleteReplication("acvbmqz", "qqxlajr", "wxacevehj", "uyxoaf", + manager.volumes().deleteReplication("kvyklxubyjaffmm", "bl", "qcuubgqibrta", "metttwgd", com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java index eeed8366877e..083f9aab228f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java @@ -45,7 +45,8 @@ public void testFinalizeRelocation() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().finalizeRelocation("mkyi", "cysihs", "qcwdhoh", "dtmcd", com.azure.core.util.Context.NONE); + manager.volumes().finalizeRelocation("jhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java index 3ff0d95017c9..15cce6e31a62 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java @@ -31,8 +31,7 @@ public void testListGetGroupIdListForLdapUser() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr - = "{\"groupIdsForLdapUser\":[\"jibnxmysu\",\"swqrntvlwijp\",\"ttexoqqpwcyyufmh\",\"uncuw\"]}"; + String responseStr = "{\"groupIdsForLdapUser\":[\"eknlra\",\"iaa\"]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,9 +49,9 @@ public void testListGetGroupIdListForLdapUser() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); GetGroupIdListForLdapUserResponse response - = manager.volumes().listGetGroupIdListForLdapUser("wuhpsvfuur", "tlwexxwlalniexz", "rzpgep", "tybbwwpgda", - new GetGroupIdListForLdapUserRequest().withUsername("chzyvlixqnrk"), com.azure.core.util.Context.NONE); + = manager.volumes().listGetGroupIdListForLdapUser("fukiscvwmzhw", "lefaxvxilcbtgn", "nzeyqxtjj", "zqlqhyc", + new GetGroupIdListForLdapUserRequest().withUsername("vodggxdbee"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("jibnxmysu", response.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("eknlra", response.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java index e0b4d73c0e6f..951af7d00131 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java @@ -34,7 +34,7 @@ public void testListReplications() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"mfp\",\"remoteVolumeRegion\":\"ojeevy\"}]}"; + = "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"yowc\",\"remoteVolumeRegion\":\"qovekqvgqou\"}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -51,12 +51,12 @@ public void testListReplications() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.volumes().listReplications("pctf", "mdxotngfdgu", "eyzihgrky", - "i", com.azure.core.util.Context.NONE); + PagedIterable response = manager.volumes().listReplications("plcwkhi", "ihlhzdsqtzb", + "rgnowcjhfgm", "ecactx", com.azure.core.util.Context.NONE); Assertions.assertEquals(EndpointType.SRC, response.iterator().next().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("mfp", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("ojeevy", response.iterator().next().remoteVolumeRegion()); + Assertions.assertEquals(ReplicationSchedule.DAILY, response.iterator().next().replicationSchedule()); + Assertions.assertEquals("yowc", response.iterator().next().remoteVolumeResourceId()); + Assertions.assertEquals("qovekqvgqou", response.iterator().next().remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java index 96dec8b43d6e..3f323463a812 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java @@ -46,8 +46,8 @@ public void testPoolChange() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().poolChange("mavmq", "oudorhcgyyp", "otwypundmb", "hu", - new PoolChangeRequest().withNewPoolResourceId("cmjkavlgorbmftpm"), com.azure.core.util.Context.NONE); + manager.volumes().poolChange("lftidgfcwqmpim", "qxzhem", "yhohujswtwkozzwc", "lkb", + new PoolChangeRequest().withNewPoolResourceId("wpfaj"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java index b2ebb6268fa3..d3a017e92be0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java @@ -45,7 +45,7 @@ public void testReInitializeReplication() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().reInitializeReplication("iitdfuxt", "asiibmiybnnust", "nlj", "nmgixh", + manager.volumes().reInitializeReplication("abrqnkkzj", "jb", "rgaehvvibrxjj", "toqbeitpkxztmoob", com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java index 6441e7bbe7ba..70655ef4c536 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java @@ -33,7 +33,7 @@ public void testReplicationStatusWithResponse() throws Exception { ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"fqwmkyoquf\",\"errorMessage\":\"ruzslzoj\"}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"jqctojcmisofie\",\"errorMessage\":\"efojyqdhcupl\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); @@ -50,13 +50,13 @@ public void testReplicationStatusWithResponse() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - ReplicationStatus response = manager.volumes().replicationStatusWithResponse("ihrraiouaub", "jtlo", "xfuojrn", - "iflrzpasccbiu", com.azure.core.util.Context.NONE).getValue(); + ReplicationStatus response = manager.volumes() + .replicationStatusWithResponse("ylfsbtk", "dp", "s", "wn", com.azure.core.util.Context.NONE).getValue(); Assertions.assertEquals(true, response.healthy()); - Assertions.assertEquals(RelationshipStatus.IDLE, response.relationshipStatus()); + Assertions.assertEquals(RelationshipStatus.TRANSFERRING, response.relationshipStatus()); Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); - Assertions.assertEquals("fqwmkyoquf", response.totalProgress()); - Assertions.assertEquals("ruzslzoj", response.errorMessage()); + Assertions.assertEquals("jqctojcmisofie", response.totalProgress()); + Assertions.assertEquals("efojyqdhcupl", response.errorMessage()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java index b5746902dfc9..1babd90ebb03 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java @@ -45,7 +45,7 @@ public void testResyncReplication() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().resyncReplication("yhsgz", "czbgomfgbeg", "qgleohibetnluank", "rfxeeebtij", + manager.volumes().resyncReplication("ifzmpjwyivqi", "f", "cvhrfsp", "uagrttikteusqc", com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java index 287d91240d33..0eff423a5377 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java @@ -46,8 +46,8 @@ public void testRevert() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().revert("n", "ypuuwwltvuqjctze", "keifzzhmkdasv", "lyhb", - new VolumeRevert().withSnapshotId("udchxgsrboldforo"), com.azure.core.util.Context.NONE); + manager.volumes().revert("hlfkqojpy", "vgtrdcnifmzzs", "ymbrnysuxmpraf", "g", + new VolumeRevert().withSnapshotId("hocxvdfffwafqrou"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java index d2e7d938409c..b93bce96466e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java @@ -45,7 +45,7 @@ public void testRevertRelocation() throws Exception { tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.volumes().revertRelocation("sufco", "dxbzlmcmuap", "vhdbevwqqxey", "ko", + manager.volumes().revertRelocation("h", "cporxvxcjz", "qizxfpxtgqscjavf", "juhdqazkmtgguwpi", com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java index f6ecfa603a74..7e644d5a7161 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java @@ -12,24 +12,24 @@ public final class WeeklyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WeeklySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":214137082,\"day\":\"msbvdkcrodtjinf\",\"hour\":1492452539,\"minute\":274733430,\"usedBytes\":3850222588525127321}") + "{\"snapshotsToKeep\":672785070,\"day\":\"gjhkycubeddg\",\"hour\":947899145,\"minute\":583924547,\"usedBytes\":3778047541183075264}") .toObject(WeeklySchedule.class); - Assertions.assertEquals(214137082, model.snapshotsToKeep()); - Assertions.assertEquals("msbvdkcrodtjinf", model.day()); - Assertions.assertEquals(1492452539, model.hour()); - Assertions.assertEquals(274733430, model.minute()); - Assertions.assertEquals(3850222588525127321L, model.usedBytes()); + Assertions.assertEquals(672785070, model.snapshotsToKeep()); + Assertions.assertEquals("gjhkycubeddg", model.day()); + Assertions.assertEquals(947899145, model.hour()); + Assertions.assertEquals(583924547, model.minute()); + Assertions.assertEquals(3778047541183075264L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(214137082).withDay("msbvdkcrodtjinf") - .withHour(1492452539).withMinute(274733430).withUsedBytes(3850222588525127321L); + WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(672785070).withDay("gjhkycubeddg") + .withHour(947899145).withMinute(583924547).withUsedBytes(3778047541183075264L); model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(214137082, model.snapshotsToKeep()); - Assertions.assertEquals("msbvdkcrodtjinf", model.day()); - Assertions.assertEquals(1492452539, model.hour()); - Assertions.assertEquals(274733430, model.minute()); - Assertions.assertEquals(3850222588525127321L, model.usedBytes()); + Assertions.assertEquals(672785070, model.snapshotsToKeep()); + Assertions.assertEquals("gjhkycubeddg", model.day()); + Assertions.assertEquals(947899145, model.hour()); + Assertions.assertEquals(583924547, model.minute()); + Assertions.assertEquals(3778047541183075264L, model.usedBytes()); } }