diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index 01732d83423b..bc9c142698fd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,14 +1,357 @@ # Release History -## 2.5.0-beta.1 (Unreleased) +## 2.5.0-beta.1 (2026-07-27) -### 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 api-version 2026-05-15-preview. 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.NetAppAccountPatch` was modified -### Other Changes +* `disableShowmount()` was removed +* `name()` was removed +* `multiAdStatus()` was removed +* `id()` was removed +* `type()` was removed +* `location()` was removed +* `provisioningState()` was removed +* `withLocation(java.lang.String)` was removed + +### Features Added + +* `models.ElasticBackupProperties` was added + +* `models.ElasticBackupPolicyProperties` was added + +* `models.ElasticBackupPolicyUpdateProperties` was added + +* `models.ElasticSnapshot` was added + +* `models.ElasticCapacityPools` was added + +* `models.ElasticKeyVaultProperties` was added + +* `models.LdapConfiguration` was added + +* `models.ElasticVolumeUpdateProperties` was added + +* `models.ElasticBackup$Definition` was added + +* `models.ElasticSnapshotPolicyHourlySchedule` was added + +* `models.ElasticMountTargetProperties` was added + +* `models.EntraIdAkvConfigPatch` was added + +* `models.ElasticVolumeUpdate` was added + +* `models.ElasticVolume$UpdateStages` was added + +* `models.ElasticVolumeDataProtectionProperties` was added + +* `models.ElasticSnapshotPolicyProperties` was added + +* `models.ElasticVolumeSnapshotProperties` was added + +* `models.ElasticPoolEncryptionKeySource` was added + +* `models.ElasticServiceLevel` was added + +* `models.ElasticBackupPolicy` was added + +* `models.ElasticResourceAvailabilityStatus` was added + +* `models.ElasticCapacityPoolUpdateProperties` was added + +* `models.ElasticNfsv3Access` was added + +* `models.CheckElasticVolumeFilePathAvailabilityRequest` was added + +* `models.ElasticSmbEncryption` was added + +* `models.ElasticVolumeProperties` was added + +* `models.ElasticAccount$DefinitionStages` was added + +* `models.ElasticEncryption` was added + +* `models.ElasticBackupPolicy$Definition` was added + +* `models.ElasticVolumeRevert` was added + +* `models.ElasticBackupVaultUpdate` was added + +* `models.ActiveDirectoryConfig$Definition` was added + +* `models.SnapshotUsage` was added + +* `models.ElasticSnapshotPolicyUpdateProperties` was added + +* `models.ActiveDirectoryConfig` was added + +* `models.VolumeSize` was added + +* `models.ElasticBackupPolicies` was added + +* `models.ElasticExportPolicyRule` was added + +* `models.BindPasswordAkvConfigPatch` was added + +* `models.ActiveDirectoryConfig$DefinitionStages` was added + +* `models.ElasticAccountUpdate` was added + +* `models.ElasticCapacityPoolUpdate` was added + +* `models.ElasticSnapshot$UpdateStages` was added + +* `models.ActiveDirectoryConfigUpdateProperties` was added + +* `models.ElasticAccountProperties` was added + +* `models.ElasticSnapshotPolicyUpdate` was added + +* `models.ElasticSnapshots` was added + +* `models.ElasticKeyVaultStatus` was added + +* `models.ElasticEncryptionIdentity` was added + +* `models.ElasticSnapshotProperties` was added + +* `models.ActiveDirectoryConfigs` was added + +* `models.BindPasswordAkvConfig` was added + +* `models.ElasticBackup$UpdateStages` was added + +* `models.ActiveDirectoryConfig$Update` was added + +* `models.SecretPasswordIdentity` was added + +* `models.ElasticAccount$UpdateStages` was added + +* `models.LdapConfigurationPatch` was added + +* `models.ElasticBackupPolicy$Update` was added + +* `models.ElasticBackupVaults` was added + +* `models.ElasticCapacityPool` was added + +* `models.ElasticExportPolicy` was added + +* `models.ElasticSnapshotPolicyWeeklySchedule` was added + +* `models.ElasticVolume$Definition` was added + +* `models.ElasticRootAccess` was added + +* `models.ElasticBackupVault$Update` was added + +* `models.ElasticBackups` was added + +* `models.ElasticSnapshotPolicy` was added + +* `models.CheckElasticResourceAvailabilityStatus` was added + +* `models.SecretPassword` was added + +* `models.ElasticBackup$Update` was added + +* `models.ElasticCapacityPool$Update` was added + +* `models.ElasticSnapshotPolicyDailySchedule` was added + +* `models.ElasticCapacityPool$UpdateStages` was added + +* `models.EntraIdAkvConfig` was added + +* `models.BindAuthenticationLevel` was added + +* `models.ElasticAccount$Update` was added + +* `models.ElasticSnapshotPolicy$Definition` was added + +* `models.ElasticSnapshot$Definition` was added + +* `models.ElasticBackupVaultProperties` was added + +* `models.ElasticBackupPolicy$DefinitionStages` was added + +* `models.ElasticNfsv4Access` was added + +* `models.ActiveDirectoryConfigProperties` was added + +* `models.ElasticVolumeRestorationState` was added + +* `models.ElasticVolumePolicyEnforcement` was added + +* `models.SecretPasswordKeyVaultProperties` was added + +* `models.ElasticAccount$Definition` was added + +* `models.ElasticVolumes` was added + +* `models.EntraIdConfig` was added + +* `models.ElasticBackupVault$Definition` was added + +* `models.ElasticSnapshotPolicy$Update` was added + +* `models.ElasticBackup$DefinitionStages` was added + +* `models.ElasticSnapshotPolicies` was added + +* `models.ElasticAccount` was added + +* `models.EntraIdConfigPatch` was added + +* `models.CheckElasticResourceAvailabilityReason` was added + +* `models.ElasticCapacityPoolProperties` was added + +* `models.ActiveDirectoryConfigUpdate` was added + +* `models.ElasticVolume$DefinitionStages` was added + +* `models.ElasticAccountUpdateProperties` was added + +* `models.ElasticCapacityPool$DefinitionStages` was added + +* `models.ElasticSmbProperties` was added + +* `models.LargeVolumeType` was added + +* `models.PolicyStatus` was added + +* `models.ElasticVolumeBackupProperties` was added + +* `models.ElasticBackup` was added + +* `models.ChangeZoneRequest` was added + +* `models.ElasticBackupVault$DefinitionStages` was added + +* `models.ElasticSnapshot$Update` was added + +* `models.CheckElasticResourceAvailabilityResponse` was added + +* `models.ElasticBackupVault` was added + +* `models.ElasticUnixAccessRule` was added + +* `models.ActiveDirectoryConfig$UpdateStages` was added + +* `models.ElasticVolume` was added + +* `models.ElasticVolume$Update` was added + +* `models.ElasticBackupPolicyState` was added + +* `models.ElasticSnapshotPolicyMonthlySchedule` was added + +* `models.ElasticVolumeDataProtectionPatchProperties` was added + +* `models.ElasticAccounts` was added + +* `models.ElasticSmbPatchProperties` was added + +* `models.ElasticSnapshot$DefinitionStages` was added + +* `models.ElasticBackupVault$UpdateStages` was added + +* `models.ElasticBackupPolicyUpdate` was added + +* `models.SnapshotDirectoryVisibility` was added + +* `models.ElasticBackupPolicy$UpdateStages` was added + +* `models.ElasticEncryptionConfiguration` was added + +* `models.DayOfWeek` was added + +* `models.ElasticCapacityPool$Definition` was added + +* `models.ElasticSnapshotPolicy$DefinitionStages` was added + +* `models.ElasticBackupType` was added + +* `models.ElasticProtocolType` was added + +* `models.ElasticSnapshotPolicy$UpdateStages` was added + +#### `models.NetAppAccount$Definition` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added +* `withEntraIdConfig(models.EntraIdConfig)` was added + +#### `models.Volume$Definition` was modified + +* `withLanguage(models.VolumeLanguage)` was added +* `withLdapServerType(models.LdapServerType)` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added + +#### `models.NetAppAccountPatch` was modified + +* `ldapConfiguration()` was added +* `withEntraIdConfig(models.EntraIdConfigPatch)` was added +* `entraIdConfig()` was added +* `withLdapConfiguration(models.LdapConfigurationPatch)` was added + +#### `models.NetAppAccount$Update` was modified + +* `withLdapConfiguration(models.LdapConfigurationPatch)` was added +* `withEntraIdConfig(models.EntraIdConfigPatch)` was added + +#### `models.VolumeGroupVolumeProperties` was modified + +* `largeVolumeType()` was added +* `withLdapServerType(models.LdapServerType)` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `language()` was added +* `withLanguage(models.VolumeLanguage)` was added +* `ldapServerType()` was added + +#### `models.Volume` was modified + +* `ldapServerType()` was added +* `largeVolumeType()` was added +* `language()` was added + +#### `NetAppFilesManager` was modified + +* `elasticVolumes()` was added +* `elasticCapacityPools()` was added +* `elasticBackupPolicies()` was added +* `elasticBackupVaults()` was added +* `elasticAccounts()` was added +* `elasticSnapshots()` was added +* `elasticBackups()` was added +* `elasticSnapshotPolicies()` was added +* `activeDirectoryConfigs()` was added + +#### `models.Accounts` was modified + +* `refreshLdapBindPassword(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `refreshLdapBindPassword(java.lang.String,java.lang.String)` was added + +#### `models.NetAppAccount` was modified + +* `refreshLdapBindPassword()` was added +* `refreshLdapBindPassword(com.azure.core.util.Context)` was added +* `ldapConfiguration()` was added +* `entraIdConfig()` was added + +#### `models.CredentialsAkvDetails` was modified + +* `withUserAssignedIdentity(java.lang.String)` was added +* `userAssignedIdentity()` was added + +#### `models.CertificateAkvDetails` was modified + +* `withUserAssignedIdentity(java.lang.String)` was added +* `userAssignedIdentity()` was added ## 2.4.0 (2026-07-21) diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index c9d32ff894cb..4d82cef72523 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 api-version 2026-05-01. 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 api-version 2026-05-15-preview. 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 - 2.4.0 + 2.5.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index 581a3215b940..0a49aa885c25 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -10,10 +10,20 @@ - [GetChangeKeyVaultInformation](#accounts_getchangekeyvaultinformation) - [List](#accounts_list) - [ListByResourceGroup](#accounts_listbyresourcegroup) +- [RefreshLdapBindPassword](#accounts_refreshldapbindpassword) - [RenewCredentials](#accounts_renewcredentials) - [TransitionToCmk](#accounts_transitiontocmk) - [Update](#accounts_update) +## ActiveDirectoryConfigs + +- [CreateOrUpdate](#activedirectoryconfigs_createorupdate) +- [Delete](#activedirectoryconfigs_delete) +- [GetByResourceGroup](#activedirectoryconfigs_getbyresourcegroup) +- [List](#activedirectoryconfigs_list) +- [ListByResourceGroup](#activedirectoryconfigs_listbyresourcegroup) +- [Update](#activedirectoryconfigs_update) + ## BackupPolicies - [Create](#backuppolicies_create) @@ -74,6 +84,74 @@ - [ResetSmbPassword](#caches_resetsmbpassword) - [Update](#caches_update) +## ElasticAccounts + +- [CreateOrUpdate](#elasticaccounts_createorupdate) +- [Delete](#elasticaccounts_delete) +- [GetByResourceGroup](#elasticaccounts_getbyresourcegroup) +- [List](#elasticaccounts_list) +- [ListByResourceGroup](#elasticaccounts_listbyresourcegroup) +- [Update](#elasticaccounts_update) + +## ElasticBackupPolicies + +- [CreateOrUpdate](#elasticbackuppolicies_createorupdate) +- [Delete](#elasticbackuppolicies_delete) +- [Get](#elasticbackuppolicies_get) +- [ListByElasticAccount](#elasticbackuppolicies_listbyelasticaccount) +- [Update](#elasticbackuppolicies_update) + +## ElasticBackupVaults + +- [CreateOrUpdate](#elasticbackupvaults_createorupdate) +- [Delete](#elasticbackupvaults_delete) +- [Get](#elasticbackupvaults_get) +- [ListByElasticAccount](#elasticbackupvaults_listbyelasticaccount) +- [Update](#elasticbackupvaults_update) + +## ElasticBackups + +- [CreateOrUpdate](#elasticbackups_createorupdate) +- [Delete](#elasticbackups_delete) +- [Get](#elasticbackups_get) +- [ListByVault](#elasticbackups_listbyvault) +- [Update](#elasticbackups_update) + +## ElasticCapacityPools + +- [ChangeZone](#elasticcapacitypools_changezone) +- [CheckVolumeFilePathAvailability](#elasticcapacitypools_checkvolumefilepathavailability) +- [CreateOrUpdate](#elasticcapacitypools_createorupdate) +- [Delete](#elasticcapacitypools_delete) +- [Get](#elasticcapacitypools_get) +- [ListByElasticAccount](#elasticcapacitypools_listbyelasticaccount) +- [Update](#elasticcapacitypools_update) + +## ElasticSnapshotPolicies + +- [CreateOrUpdate](#elasticsnapshotpolicies_createorupdate) +- [Delete](#elasticsnapshotpolicies_delete) +- [Get](#elasticsnapshotpolicies_get) +- [ListByElasticAccount](#elasticsnapshotpolicies_listbyelasticaccount) +- [ListElasticVolumes](#elasticsnapshotpolicies_listelasticvolumes) +- [Update](#elasticsnapshotpolicies_update) + +## ElasticSnapshots + +- [CreateOrUpdate](#elasticsnapshots_createorupdate) +- [Delete](#elasticsnapshots_delete) +- [Get](#elasticsnapshots_get) +- [ListByElasticVolume](#elasticsnapshots_listbyelasticvolume) + +## ElasticVolumes + +- [CreateOrUpdate](#elasticvolumes_createorupdate) +- [Delete](#elasticvolumes_delete) +- [Get](#elasticvolumes_get) +- [ListByElasticPool](#elasticvolumes_listbyelasticpool) +- [Revert](#elasticvolumes_revert) +- [Update](#elasticvolumes_update) + ## NetAppResource - [CheckFilePathAvailability](#netappresource_checkfilepathavailability) @@ -204,7 +282,7 @@ import java.util.Arrays; */ public final class AccountsChangeKeyVaultSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2026-05-15-preview/Accounts_ChangeKeyVault.json */ /** * Sample code: Accounts_ChangeKeyVault. @@ -229,6 +307,9 @@ public final class AccountsChangeKeyVaultSamples { ```java import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.BindAuthenticationLevel; +import com.azure.resourcemanager.netapp.models.BindPasswordAkvConfig; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import java.util.Arrays; /** @@ -236,7 +317,7 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -248,7 +329,7 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-05-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2026-05-15-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -273,6 +354,37 @@ public final class AccountsCreateOrUpdateSamples { .withLdapOverTls(false))) .create(); } + + /* + * x-ms-original-file: 2026-05-15-preview/Accounts_CreateOrUpdateLdapConfig.json + */ + /** + * Sample code: Accounts_CreateOrUpdateLdapConfig. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void accountsCreateOrUpdateLdapConfig(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withLdapConfiguration(new LdapConfiguration().withDomain("example.com") + .withLdapServers(Arrays.asList("192.0.2.1", "192.0.2.2")) + .withLdapOverTLS(false) + .withServerCACertificate("") + .withCertificateCNHost("ldap.krypton.com") + .withLdapPort(636) + .withUserDN("OU=subdirectory,OU=directory,DC=example,DC=com") + .withGroupDN("OU=subdirectory,OU=directory,DC=example,DC=com") + .withNetGroupDN("OU=subdirectory,OU=directory,DC=example,DC=com") + .withBindAuthenticationLevel(BindAuthenticationLevel.SIMPLE) + .withBindDN("cn=user,dc=domain,dc=com") + .withBindPasswordAkvConfig(new BindPasswordAkvConfig().withAzureKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"))) + .create(); + } } ``` @@ -284,7 +396,7 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_Delete.json + * x-ms-original-file: 2026-05-15-preview/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -305,7 +417,7 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_Get.json + * x-ms-original-file: 2026-05-15-preview/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -326,7 +438,7 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsGetChangeKeyVaultInformationSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2026-05-15-preview/Accounts_GetChangeKeyVaultInformation.json */ /** * Sample code: Accounts_GetChangeKeyVaultInformation. @@ -348,7 +460,7 @@ public final class AccountsGetChangeKeyVaultInformationSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2026-05-15-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. @@ -369,7 +481,7 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_List.json + * x-ms-original-file: 2026-05-15-preview/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -382,6 +494,28 @@ public final class AccountsListByResourceGroupSamples { } ``` +### Accounts_RefreshLdapBindPassword + +```java +/** + * Samples for Accounts RefreshLdapBindPassword. + */ +public final class AccountsRefreshLdapBindPasswordSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Accounts_RefreshLdapBindPassword.json + */ + /** + * Sample code: NetAppAccounts_RefreshLdapBindPassword. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + netAppAccountsRefreshLdapBindPassword(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts().refreshLdapBindPassword("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + ### Accounts_RenewCredentials ```java @@ -390,7 +524,7 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2026-05-15-preview/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -413,7 +547,7 @@ import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; */ public final class AccountsTransitionToCmkSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2026-05-15-preview/Accounts_TransitionEncryptionKey.json */ /** * Sample code: Accounts_MigrateEncryptionKey. @@ -443,7 +577,7 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_Update.json + * x-ms-original-file: 2026-05-15-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -471,6 +605,191 @@ public final class AccountsUpdateSamples { } ``` +### ActiveDirectoryConfigs_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.netapp.models.SecretPassword; +import com.azure.resourcemanager.netapp.models.SecretPasswordIdentity; +import com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties; +import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ActiveDirectoryConfigs CreateOrUpdate. + */ +public final class ActiveDirectoryConfigsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_CreateOrUpdate.json + */ + /** + * Sample code: ActiveDirectoryConfigs_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .define("adconfig1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "activeDirectoryConfig1")) + .withProperties(new ActiveDirectoryConfigProperties().withUserName("admin1") + .withDns(Arrays.asList("10.10.10.4", "10.10.10.5")) + .withSmbServerName("smbServer") + .withOrganizationalUnit("OU=Computers,DC=corp,DC=contoso,DC=com") + .withSite("Default-First-Site-Name") + .withBackupOperators(Arrays.asList("backupOp1")) + .withAdministrators(Arrays.asList("admin1")) + .withSecurityOperators(Arrays.asList("secOp1")) + .withDomain("example.net") + .withSecretPassword(new SecretPassword() + .withKeyVaultProperties( + new SecretPasswordKeyVaultProperties().withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder")) + .withIdentity(new SecretPasswordIdentity().withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1")))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1", + new UserAssignedIdentity()))) + .create(); + } + + // 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; + } +} +``` + +### ActiveDirectoryConfigs_Delete + +```java +/** + * Samples for ActiveDirectoryConfigs Delete. + */ +public final class ActiveDirectoryConfigsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_Delete.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().delete("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_GetByResourceGroup + +```java +/** + * Samples for ActiveDirectoryConfigs GetByResourceGroup. + */ +public final class ActiveDirectoryConfigsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_Get.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_List + +```java +/** + * Samples for ActiveDirectoryConfigs List. + */ +public final class ActiveDirectoryConfigsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_ListBySubscription.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_ListByResourceGroup + +```java +/** + * Samples for ActiveDirectoryConfigs ListByResourceGroup. + */ +public final class ActiveDirectoryConfigsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_ListByResourceGroup.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} +``` + +### ActiveDirectoryConfigs_Update + +```java +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties; + +/** + * Samples for ActiveDirectoryConfigs Update. + */ +public final class ActiveDirectoryConfigsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_Update.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ActiveDirectoryConfig resource = manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ActiveDirectoryConfigUpdateProperties().withSmbServerName("smbServer2")) + .apply(); + } +} +``` + ### BackupPolicies_Create ```java @@ -479,7 +798,7 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Create.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -508,7 +827,7 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Delete.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. @@ -530,7 +849,7 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Get.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_Get.json */ /** * Sample code: BackupPolicies_Get. @@ -552,7 +871,7 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_List.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. @@ -575,7 +894,7 @@ import com.azure.resourcemanager.netapp.models.BackupPolicy; */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Update.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -604,7 +923,7 @@ public final class BackupPoliciesUpdateSamples { */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Create.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Create.json */ /** * Sample code: BackupVault_CreateOrUpdate. @@ -629,7 +948,7 @@ public final class BackupVaultsCreateOrUpdateSamples { */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Delete.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Delete.json */ /** * Sample code: BackupVaults_Delete. @@ -650,7 +969,7 @@ public final class BackupVaultsDeleteSamples { */ public final class BackupVaultsGetSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Get.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Get.json */ /** * Sample code: BackupVaults_Get. @@ -671,7 +990,7 @@ public final class BackupVaultsGetSamples { */ public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_List.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_List.json */ /** * Sample code: BackupVaults_List. @@ -696,7 +1015,7 @@ import java.util.Map; */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Update.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Update.json */ /** * Sample code: BackupVaults_Update. @@ -732,7 +1051,7 @@ public final class BackupVaultsUpdateSamples { */ public final class BackupsCreateSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Create.json */ /** * Sample code: BackupsUnderBackupVault_Create. @@ -759,7 +1078,7 @@ public final class BackupsCreateSamples { */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Delete.json */ /** * Sample code: BackupsUnderBackupVault_Delete. @@ -781,7 +1100,7 @@ public final class BackupsDeleteSamples { */ public final class BackupsGetSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Get.json */ /** * Sample code: BackupsUnderBackupVault_Get. @@ -803,7 +1122,7 @@ public final class BackupsGetSamples { */ public final class BackupsGetLatestStatusSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2026-05-15-preview/Volumes_LatestBackupStatus.json */ /** * Sample code: Volumes_BackupStatus. @@ -825,7 +1144,7 @@ public final class BackupsGetLatestStatusSamples { */ public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2026-05-15-preview/Volumes_LatestRestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. @@ -848,14 +1167,14 @@ public final class BackupsGetVolumeLatestRestoreStatusSamples { */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_List.json + * x-ms-original-file: 2026-05-15-preview/Backups_ListByVault.json */ /** - * Sample code: Backups_List. + * Sample code: Backups_ListByVault. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void backupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); } } @@ -871,7 +1190,7 @@ import com.azure.resourcemanager.netapp.models.Backup; */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Update.json */ /** * Sample code: BackupsUnderBackupVault_Update. @@ -897,7 +1216,7 @@ import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; */ public final class BackupsUnderAccountMigrateBackupsSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderAccount_Migrate.json */ /** * Sample code: BackupsUnderAccount_Migrate. @@ -924,7 +1243,7 @@ import java.util.Arrays; */ public final class BackupsUnderBackupVaultRestoreFilesSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_SingleFileRestore.json */ /** * Sample code: Backups_SingleFileRestore. @@ -952,7 +1271,7 @@ import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; */ public final class BackupsUnderVolumeMigrateBackupsSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderVolume_Migrate.json */ /** * Sample code: BackupsUnderVolume_Migrate. @@ -985,7 +1304,7 @@ import com.azure.resourcemanager.netapp.models.OnCertificateConflictAction; */ public final class BucketsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Buckets_CreateOrUpdate.json */ /** * Sample code: Buckets_CreateOrUpdate. @@ -1006,7 +1325,7 @@ public final class BucketsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-05-01/Buckets_CreateOrUpdateWithAkv.json + * x-ms-original-file: 2026-05-15-preview/Buckets_CreateOrUpdateWithAkv.json */ /** * Sample code: Buckets_CreateOrUpdateWithAkv. @@ -1022,13 +1341,16 @@ public final class BucketsCreateOrUpdateSamples { .withServer(new BucketServerProperties().withFqdn("fullyqualified.domainname.com") .withOnCertificateConflictAction(OnCertificateConflictAction.FAIL)) .withPermissions(BucketPermissions.READ_ONLY) - .withAkvDetails(new AzureKeyVaultDetails() - .withCertificateAkvDetails( - new CertificateAkvDetails().withCertificateKeyVaultUri("fakeTokenPlaceholder") - .withCertificateName("my-certificate")) - .withCredentialsAkvDetails( - new CredentialsAkvDetails().withCredentialsKeyVaultUri("fakeTokenPlaceholder") - .withSecretName("fakeTokenPlaceholder"))) + .withAkvDetails(new AzureKeyVaultDetails().withCertificateAkvDetails(new CertificateAkvDetails() + .withCertificateKeyVaultUri("fakeTokenPlaceholder") + .withCertificateName("my-certificate") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")) + .withCredentialsAkvDetails(new CredentialsAkvDetails() + .withCredentialsKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) .create(); } } @@ -1042,7 +1364,7 @@ public final class BucketsCreateOrUpdateSamples { */ public final class BucketsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_Delete.json + * x-ms-original-file: 2026-05-15-preview/Buckets_Delete.json */ /** * Sample code: Buckets_Delete. @@ -1065,7 +1387,7 @@ import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; */ public final class BucketsGenerateAkvCredentialsSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_GenerateAkvCredentials.json + * x-ms-original-file: 2026-05-15-preview/Buckets_GenerateAkvCredentials.json */ /** * Sample code: Buckets_GenerateAkvCredentials. @@ -1090,7 +1412,7 @@ import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; */ public final class BucketsGenerateCredentialsSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_GenerateCredentials.json + * x-ms-original-file: 2026-05-15-preview/Buckets_GenerateCredentials.json */ /** * Sample code: Buckets_GenerateCredentials. @@ -1113,7 +1435,7 @@ public final class BucketsGenerateCredentialsSamples { */ public final class BucketsGetSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_Get.json + * x-ms-original-file: 2026-05-15-preview/Buckets_Get.json */ /** * Sample code: Buckets_Get. @@ -1135,7 +1457,7 @@ public final class BucketsGetSamples { */ public final class BucketsListSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_List.json + * x-ms-original-file: 2026-05-15-preview/Buckets_List.json */ /** * Sample code: Buckets_List. @@ -1156,7 +1478,7 @@ public final class BucketsListSamples { */ public final class BucketsRefreshCertificateSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_RefreshCertificate.json + * x-ms-original-file: 2026-05-15-preview/Buckets_RefreshCertificate.json */ /** * Sample code: Buckets_RefreshCertificate. @@ -1186,7 +1508,7 @@ import com.azure.resourcemanager.netapp.models.OnCertificateConflictAction; */ public final class BucketsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_Update.json + * x-ms-original-file: 2026-05-15-preview/Buckets_Update.json */ /** * Sample code: Buckets_Update. @@ -1206,7 +1528,7 @@ public final class BucketsUpdateSamples { } /* - * x-ms-original-file: 2026-05-01/Buckets_UpdateWithAkv.json + * x-ms-original-file: 2026-05-15-preview/Buckets_UpdateWithAkv.json */ /** * Sample code: Buckets_UpdateWithAkv. @@ -1221,13 +1543,16 @@ public final class BucketsUpdateSamples { .withServer(new BucketServerPatchProperties().withFqdn("fullyqualified.domainname.com") .withOnCertificateConflictAction(OnCertificateConflictAction.FAIL)) .withPermissions(BucketPatchPermissions.READ_ONLY) - .withAkvDetails(new AzureKeyVaultDetails() - .withCertificateAkvDetails( - new CertificateAkvDetails().withCertificateKeyVaultUri("fakeTokenPlaceholder") - .withCertificateName("my-certificate")) - .withCredentialsAkvDetails( - new CredentialsAkvDetails().withCredentialsKeyVaultUri("fakeTokenPlaceholder") - .withSecretName("fakeTokenPlaceholder"))) + .withAkvDetails(new AzureKeyVaultDetails().withCertificateAkvDetails(new CertificateAkvDetails() + .withCertificateKeyVaultUri("fakeTokenPlaceholder") + .withCertificateName("my-certificate") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")) + .withCredentialsAkvDetails(new CredentialsAkvDetails() + .withCredentialsKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) .apply(); } } @@ -1248,7 +1573,7 @@ import java.util.Arrays; */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Caches_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Caches_CreateOrUpdate.json */ /** * Sample code: Caches_CreateOrUpdate. @@ -1286,7 +1611,7 @@ public final class CachesCreateOrUpdateSamples { */ public final class CachesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Caches_Delete.json + * x-ms-original-file: 2026-05-15-preview/Caches_Delete.json */ /** * Sample code: Caches_Delete. @@ -1307,7 +1632,7 @@ public final class CachesDeleteSamples { */ public final class CachesGetSamples { /* - * x-ms-original-file: 2026-05-01/Caches_Get.json + * x-ms-original-file: 2026-05-15-preview/Caches_Get.json */ /** * Sample code: Caches_Get. @@ -1328,7 +1653,7 @@ public final class CachesGetSamples { */ public final class CachesListSamples { /* - * x-ms-original-file: 2026-05-01/Caches_List.json + * x-ms-original-file: 2026-05-15-preview/Caches_List.json */ /** * Sample code: Caches_List. @@ -1349,7 +1674,7 @@ public final class CachesListSamples { */ public final class CachesListPeeringPassphrasesSamples { /* - * x-ms-original-file: 2026-05-01/Caches_ListPeeringPassphrases.json + * x-ms-original-file: 2026-05-15-preview/Caches_ListPeeringPassphrases.json */ /** * Sample code: Caches_ListPeeringPassphrases. @@ -1374,7 +1699,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class CachesPoolChangeSamples { /* - * x-ms-original-file: 2026-05-01/Caches_PoolChange.json + * x-ms-original-file: 2026-05-15-preview/Caches_PoolChange.json */ /** * Sample code: Caches_PoolChange. @@ -1398,7 +1723,7 @@ public final class CachesPoolChangeSamples { */ public final class CachesResetSmbPasswordSamples { /* - * x-ms-original-file: 2026-05-01/Caches_ResetSmbPassword.json + * x-ms-original-file: 2026-05-15-preview/Caches_ResetSmbPassword.json */ /** * Sample code: Caches_ResetSmbPassword. @@ -1423,7 +1748,7 @@ import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; */ public final class CachesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Caches_Update.json + * x-ms-original-file: 2026-05-15-preview/Caches_Update.json */ /** * Sample code: Caches_Update. @@ -1439,1053 +1764,2616 @@ public final class CachesUpdateSamples { } ``` -### NetAppResource_CheckFilePathAvailability +### ElasticAccounts_CreateOrUpdate ```java -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import java.util.HashMap; +import java.util.Map; /** - * Samples for NetAppResource CheckFilePathAvailability. + * Samples for ElasticAccounts CreateOrUpdate. */ -public final class NetAppResourceCheckFilePathAvailabilitySamples { +public final class ElasticAccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/CheckFilePathAvailability.json + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_CreateOrUpdate.json */ /** - * Sample code: CheckFilePathAvailability. + * Sample code: ElasticAccounts_CreateOrUpdate. * * @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); + public static void elasticAccountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "account1")) + .withProperties(new ElasticAccountProperties()) + .create(); + } + + // 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; } } ``` -### NetAppResource_CheckNameAvailability +### ElasticAccounts_Delete ```java -import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; - /** - * Samples for NetAppResource CheckNameAvailability. + * Samples for ElasticAccounts Delete. */ -public final class NetAppResourceCheckNameAvailabilitySamples { +public final class ElasticAccountsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/CheckNameAvailability.json + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_Delete.json */ /** - * Sample code: CheckNameAvailability. + * Sample code: ElasticAccounts_Delete. * * @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); + public static void elasticAccountsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().delete("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### NetAppResource_CheckQuotaAvailability +### ElasticAccounts_GetByResourceGroup ```java -import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; - /** - * Samples for NetAppResource CheckQuotaAvailability. + * Samples for ElasticAccounts GetByResourceGroup. */ -public final class NetAppResourceCheckQuotaAvailabilitySamples { +public final class ElasticAccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01/CheckQuotaAvailability.json + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_Get.json */ /** - * Sample code: CheckQuotaAvailability. + * Sample code: ElasticAccounts_Get. * * @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); + public static void elasticAccountsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### NetAppResource_QueryNetworkSiblingSet +### ElasticAccounts_List ```java -import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; - /** - * Samples for NetAppResource QueryNetworkSiblingSet. + * Samples for ElasticAccounts List. */ -public final class NetAppResourceQueryNetworkSiblingSetSamples { +public final class ElasticAccountsListSamples { /* - * x-ms-original-file: 2026-05-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_ListBySubscription.json */ /** - * Sample code: NetworkSiblingSet_Query. + * Sample code: ElasticAccounts_ListBySubscription. * * @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); + public static void elasticAccountsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().list(com.azure.core.util.Context.NONE); } } ``` -### NetAppResource_QueryRegionInfo +### ElasticAccounts_ListByResourceGroup ```java /** - * Samples for NetAppResource QueryRegionInfo. + * Samples for ElasticAccounts ListByResourceGroup. */ -public final class NetAppResourceQueryRegionInfoSamples { +public final class ElasticAccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01/RegionInfo.json + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_ListByResourceGroup.json */ /** - * Sample code: RegionInfo_Query. + * Sample code: ElasticAccounts_ListByResourceGroup. * * @param manager Entry point to NetAppFilesManager. */ - public static void regionInfoQuery(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResources().queryRegionInfoWithResponse("eastus", com.azure.core.util.Context.NONE); + public static void elasticAccountsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); } } ``` -### NetAppResource_UpdateNetworkSiblingSet +### ElasticAccounts_Update ```java -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import java.util.HashMap; +import java.util.Map; /** - * Samples for NetAppResource UpdateNetworkSiblingSet. + * Samples for ElasticAccounts Update. */ -public final class NetAppResourceUpdateNetworkSiblingSetSamples { +public final class ElasticAccountsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_Update.json */ /** - * Sample code: NetworkFeatures_Update. + * Sample code: ElasticAccounts_Update. * * @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); + public static void elasticAccountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticAccount resource = manager.elasticAccounts() + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); } -} -``` - -### NetAppResourceQuotaLimits_Get -```java -/** - * Samples for NetAppResourceQuotaLimits Get. - */ -public final class NetAppResourceQuotaLimitsGetSamples { + // 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; + } +} +``` + +### ElasticBackupPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; + +/** + * Samples for ElasticBackupPolicies CreateOrUpdate. + */ +public final class ElasticBackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_CreateOrUpdate.json */ /** - * Sample code: QuotaLimits. + * Sample code: ElasticBackupPolicies_CreateOrUpdate. * * @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); + public static void + elasticBackupPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); } } ``` -### NetAppResourceQuotaLimits_List +### ElasticBackupPolicies_Delete ```java /** - * Samples for NetAppResourceQuotaLimits List. + * Samples for ElasticBackupPolicies Delete. */ -public final class NetAppResourceQuotaLimitsListSamples { +public final class ElasticBackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_Delete.json */ /** - * Sample code: QuotaLimits. + * Sample code: ElasticBackupPolicies_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimits().list("eastus", com.azure.core.util.Context.NONE); + public static void elasticBackupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); } } ``` -### NetAppResourceQuotaLimitsAccount_Get +### ElasticBackupPolicies_Get ```java /** - * Samples for NetAppResourceQuotaLimitsAccount Get. + * Samples for ElasticBackupPolicies Get. */ -public final class NetAppResourceQuotaLimitsAccountGetSamples { +public final class ElasticBackupPoliciesGetSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_Get.json */ /** - * Sample code: QuotaLimits. + * Sample code: ElasticBackupPolicies_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimitsAccounts() - .getWithResponse("myRG", "myAccount", "poolsPerAccount", com.azure.core.util.Context.NONE); + public static void elasticBackupPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); } } ``` -### NetAppResourceQuotaLimitsAccount_List +### ElasticBackupPolicies_ListByElasticAccount ```java /** - * Samples for NetAppResourceQuotaLimitsAccount List. + * Samples for ElasticBackupPolicies ListByElasticAccount. */ -public final class NetAppResourceQuotaLimitsAccountListSamples { +public final class ElasticBackupPoliciesListByElasticAccountSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_List.json */ /** - * Sample code: QuotaLimits. + * Sample code: ElasticBackupPolicies_ListByElasticAccount. * * @param manager Entry point to NetAppFilesManager. */ - public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceQuotaLimitsAccounts().list("myRG", "myAccount", com.azure.core.util.Context.NONE); + public static void + elasticBackupPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### NetAppResourceRegionInfos_Get +### ElasticBackupPolicies_Update ```java +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; + /** - * Samples for NetAppResourceRegionInfos Get. + * Samples for ElasticBackupPolicies Update. */ -public final class NetAppResourceRegionInfosGetSamples { +public final class ElasticBackupPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/RegionInfos_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_Update.json */ /** - * Sample code: RegionInfos_Get. + * Sample code: ElasticBackupPolicies_Update. * * @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); + public static void elasticBackupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupPolicy resource = manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .apply(); } } ``` -### NetAppResourceRegionInfos_List +### ElasticBackupVaults_CreateOrUpdate ```java /** - * Samples for NetAppResourceRegionInfos List. + * Samples for ElasticBackupVaults CreateOrUpdate. */ -public final class NetAppResourceRegionInfosListSamples { +public final class ElasticBackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/RegionInfos_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Create.json */ /** - * Sample code: RegionInfos_List. + * Sample code: ElasticBackupVaults_CreateOrUpdate. * * @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); + public static void elasticBackupVaultsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .create(); } } ``` -### NetAppResourceUsages_Get +### ElasticBackupVaults_Delete ```java /** - * Samples for NetAppResourceUsages Get. + * Samples for ElasticBackupVaults Delete. */ -public final class NetAppResourceUsagesGetSamples { +public final class ElasticBackupVaultsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Usages_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Delete.json */ /** - * Sample code: Usages_Get. + * Sample code: ElasticBackupVaults_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void usagesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceUsages() - .getWithResponse("eastus", "totalTibsPerSubscription", com.azure.core.util.Context.NONE); + public static void elasticBackupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); } } ``` -### NetAppResourceUsages_List +### ElasticBackupVaults_Get ```java /** - * Samples for NetAppResourceUsages List. + * Samples for ElasticBackupVaults Get. */ -public final class NetAppResourceUsagesListSamples { +public final class ElasticBackupVaultsGetSamples { /* - * x-ms-original-file: 2026-05-01/Usages_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Get.json */ /** - * Sample code: Usages_List. + * Sample code: ElasticBackupVaults_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void usagesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.netAppResourceUsages().list("eastus", com.azure.core.util.Context.NONE); + public static void elasticBackupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### ElasticBackupVaults_ListByElasticAccount ```java /** - * Samples for Operations List. + * Samples for ElasticBackupVaults ListByElasticAccount. */ -public final class OperationsListSamples { +public final class ElasticBackupVaultsListByElasticAccountSamples { /* - * x-ms-original-file: 2026-05-01/OperationList.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_ListByElasticAccount.json */ /** - * Sample code: OperationList. + * Sample code: ElasticBackupVaults_ListByElasticAccount. * * @param manager Entry point to NetAppFilesManager. */ - public static void operationList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void + elasticBackupVaultsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### Pools_CreateOrUpdate +### ElasticBackupVaults_Update ```java -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.util.HashMap; +import java.util.Map; /** - * Samples for Pools CreateOrUpdate. + * Samples for ElasticBackupVaults Update. */ -public final class PoolsCreateOrUpdateSamples { +public final class ElasticBackupVaultsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Update.json */ /** - * Sample code: Pools_CreateOrUpdate. + * Sample code: ElasticBackupVaults_Update. * * @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(); + public static void elasticBackupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupVault resource = manager.elasticBackupVaults() + .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; } +} +``` +### ElasticBackups_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; + +/** + * Samples for ElasticBackups CreateOrUpdate. + */ +public final class ElasticBackupsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_CreateOrUpdate.json */ /** - * Sample code: Pools_CreateOrUpdate_CustomThroughput. + * Sample code: ElasticBackups_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void - poolsCreateOrUpdateCustomThroughput(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools() - .define("customPool1") - .withRegion("eastus") - .withExistingNetAppAccount("myRG", "account1") - .withSize(4398046511104L) - .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(128) - .withQosType(QosType.MANUAL) + public static void elasticBackupsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .define("backup1") + .withExistingElasticBackupVault("myRG", "account1", "backupVault1") + .withProperties(new ElasticBackupProperties().withLabel("myLabel") + .withElasticVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1")) .create(); } } ``` -### Pools_Delete +### ElasticBackups_Delete ```java /** - * Samples for Pools Delete. + * Samples for ElasticBackups Delete. */ -public final class PoolsDeleteSamples { +public final class ElasticBackupsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Delete.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_Delete.json */ /** - * Sample code: Pools_Delete. + * Sample code: ElasticBackups_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void poolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + public static void elasticBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); } } ``` -### Pools_Get +### ElasticBackups_Get ```java /** - * Samples for Pools Get. + * Samples for ElasticBackups Get. */ -public final class PoolsGetSamples { +public final class ElasticBackupsGetSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_Get.json */ /** - * Sample code: Pools_Get_CustomThroughput. + * Sample code: ElasticBackups_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void poolsGetCustomThroughput(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().getWithResponse("myRG", "account1", "customPool1", com.azure.core.util.Context.NONE); + public static void elasticBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); } +} +``` + +### ElasticBackups_ListByVault +```java +/** + * Samples for ElasticBackups ListByVault. + */ +public final class ElasticBackupsListByVaultSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_ListByVault.json */ /** - * Sample code: Pools_Get. + * Sample code: ElasticBackups_ListByVault. * * @param manager Entry point to NetAppFilesManager. */ - public static void poolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + public static void elasticBackupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups().listByVault("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); } } ``` -### Pools_List +### ElasticBackups_Update ```java +import com.azure.resourcemanager.netapp.models.ElasticBackup; + /** - * Samples for Pools List. + * Samples for ElasticBackups Update. */ -public final class PoolsListSamples { +public final class ElasticBackupsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Pools_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_Update.json */ /** - * Sample code: Pools_List. + * Sample code: ElasticBackups_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void poolsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.pools().list("myRG", "account1", com.azure.core.util.Context.NONE); + public static void elasticBackupsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackup resource = manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); } } ``` -### Pools_Update +### ElasticCapacityPools_ChangeZone ```java -import com.azure.resourcemanager.netapp.models.CapacityPool; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; /** - * Samples for Pools Update. + * Samples for ElasticCapacityPools ChangeZone. */ -public final class PoolsUpdateSamples { +public final class ElasticCapacityPoolsChangeZoneSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Update.json + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_ChangeZone.json */ /** - * Sample code: Pools_Update. + * Sample code: ElasticCapacityPools_ChangeZone. * * @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(); - resource.update().apply(); + public static void elasticCapacityPoolsChangeZone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .changeZone("myRG", "account1", "pool1", new ChangeZoneRequest().withNewZone("3"), + com.azure.core.util.Context.NONE); } +} +``` + +### ElasticCapacityPools_CheckVolumeFilePathAvailability + +```java +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +/** + * Samples for ElasticCapacityPools CheckVolumeFilePathAvailability. + */ +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples { /* - * x-ms-original-file: 2026-05-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_CheckVolumeFilePathAvailability.json */ /** - * Sample code: Pools_Update_CustomThroughput. + * Sample code: ElasticCapacityPools_CheckVolumeFilePathAvailability. * * @param manager Entry point to NetAppFilesManager. */ - public static void poolsUpdateCustomThroughput(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - CapacityPool resource = manager.pools() - .getWithResponse("myRG", "account1", "customPool1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); + public static void elasticCapacityPoolsCheckVolumeFilePathAvailability( + com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse("myRG", "account1", "pool1", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("my-exact-filepath"), + com.azure.core.util.Context.NONE); } } ``` -### RansomwareReports_ClearSuspects +### ElasticCapacityPools_CreateOrUpdate ```java -import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; -import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration; +import com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource; +import com.azure.resourcemanager.netapp.models.ElasticServiceLevel; import java.util.Arrays; /** - * Samples for RansomwareReports ClearSuspects. + * Samples for ElasticCapacityPools CreateOrUpdate. */ -public final class RansomwareReportsClearSuspectsSamples { +public final class ElasticCapacityPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/RansomwareReports_ClearSuspects.json + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_CreateOrUpdateCMK.json */ /** - * Sample code: RansomwareReports_ClearSuspects. + * Sample code: ElasticCapacityPools_CreateOrUpdateCMK. * * @param manager Entry point to NetAppFilesManager. */ - public static void ransomwareReportsClearSuspects(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.ransomwareReports() - .clearSuspects("myRG", "account1", "pool1", "volume1", "ransomwareReport1", - new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.POTENTIAL_THREAT) - .withExtensions(Arrays.asList(".threat")), - com.azure.core.util.Context.NONE); + public static void + elasticCapacityPoolsCreateOrUpdateCMK(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withEncryption(new ElasticEncryptionConfiguration() + .withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource.NET_APP) + .withKeyVaultPrivateEndpointResourceId("fakeTokenPlaceholder")) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_CreateOrUpdate.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); } } ``` -### RansomwareReports_Get +### ElasticCapacityPools_Delete ```java /** - * Samples for RansomwareReports Get. + * Samples for ElasticCapacityPools Delete. */ -public final class RansomwareReportsGetSamples { +public final class ElasticCapacityPoolsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/RansomwareReports_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_Delete.json */ /** - * Sample code: RansomwareReports_Get. + * Sample code: ElasticCapacityPools_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void ransomwareReportsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.ransomwareReports() - .getWithResponse("myRG", "account1", "pool1", "volume1", "ransomwareReport1", - com.azure.core.util.Context.NONE); + public static void elasticCapacityPoolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); } } ``` -### RansomwareReports_List +### ElasticCapacityPools_Get ```java /** - * Samples for RansomwareReports List. + * Samples for ElasticCapacityPools Get. */ -public final class RansomwareReportsListSamples { +public final class ElasticCapacityPoolsGetSamples { /* - * x-ms-original-file: 2026-05-01/RansomwareReports_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_Get.json */ /** - * Sample code: RansomwareReports_List. + * Sample code: ElasticCapacityPools_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void ransomwareReportsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.ransomwareReports().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + public static void elasticCapacityPoolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); } } ``` -### SnapshotPolicies_Create +### ElasticCapacityPools_ListByElasticAccount ```java -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; - /** - * Samples for SnapshotPolicies Create. + * Samples for ElasticCapacityPools ListByElasticAccount. */ -public final class SnapshotPoliciesCreateSamples { +public final class ElasticCapacityPoolsListByElasticAccountSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_ListByElasticAccount.json */ /** - * Sample code: SnapshotPolicies_Create. + * Sample code: ElasticCapacityPools_ListByElasticAccount. * * @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) + public static void + elasticCapacityPoolsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticCapacityPools_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; + +/** + * Samples for ElasticCapacityPools Update. + */ +public final class ElasticCapacityPoolsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_Update.json + */ + /** + * Sample code: ElasticCapacityPools_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticCapacityPool resource = manager.elasticCapacityPools() + .getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticCapacityPoolUpdateProperties().withSize(4398046511104L) + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .apply(); + } +} +``` + +### ElasticSnapshotPolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; + +/** + * Samples for ElasticSnapshotPolicies CreateOrUpdate. + */ +public final class ElasticSnapshotPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshotPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) .create(); } } ``` -### SnapshotPolicies_Delete +### ElasticSnapshotPolicies_Delete ```java /** - * Samples for SnapshotPolicies Delete. + * Samples for ElasticSnapshotPolicies Delete. */ -public final class SnapshotPoliciesDeleteSamples { +public final class ElasticSnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_Delete.json */ /** - * Sample code: SnapshotPolicies_Delete. + * Sample code: ElasticSnapshotPolicies_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies() + public static void elasticSnapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### SnapshotPolicies_Get +### ElasticSnapshotPolicies_Get ```java /** - * Samples for SnapshotPolicies Get. + * Samples for ElasticSnapshotPolicies Get. */ -public final class SnapshotPoliciesGetSamples { +public final class ElasticSnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_Get.json */ /** - * Sample code: SnapshotPolicies_Get. + * Sample code: ElasticSnapshotPolicies_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies() + public static void elasticSnapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### SnapshotPolicies_List +### ElasticSnapshotPolicies_ListByElasticAccount ```java /** - * Samples for SnapshotPolicies List. + * Samples for ElasticSnapshotPolicies ListByElasticAccount. */ -public final class SnapshotPoliciesListSamples { +public final class ElasticSnapshotPoliciesListByElasticAccountSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_ListByElasticAccount.json */ /** - * Sample code: SnapshotPolicies_List. + * Sample code: ElasticSnapshotPolicies_ListByElasticAccount. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotPoliciesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshotPolicies().list("myRG", "account1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### SnapshotPolicies_ListVolumes +### ElasticSnapshotPolicies_ListElasticVolumes ```java /** - * Samples for SnapshotPolicies ListVolumes. + * Samples for ElasticSnapshotPolicies ListElasticVolumes. */ -public final class SnapshotPoliciesListVolumesSamples { +public final class ElasticSnapshotPoliciesListElasticVolumesSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_ListElasticVolumes.json */ /** - * Sample code: SnapshotPolicies_ListVolumes. + * Sample code: ElasticSnapshotPolicies_ListElasticVolumes. * * @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); + public static void + elasticSnapshotPoliciesListElasticVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .listElasticVolumes("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### SnapshotPolicies_Update +### ElasticSnapshotPolicies_Update ```java -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; /** - * Samples for SnapshotPolicies Update. + * Samples for ElasticSnapshotPolicies Update. */ -public final class SnapshotPoliciesUpdateSamples { +public final class ElasticSnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_Update.json */ /** - * Sample code: SnapshotPolicies_Update. + * Sample code: ElasticSnapshotPolicies_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - SnapshotPolicy resource = manager.snapshotPolicies() + public static void elasticSnapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticSnapshotPolicy resource = manager.elasticSnapshotPolicies() .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) + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) .apply(); } } ``` -### Snapshots_Create +### ElasticSnapshots_CreateOrUpdate ```java /** - * Samples for Snapshots Create. + * Samples for ElasticSnapshots CreateOrUpdate. */ -public final class SnapshotsCreateSamples { +public final class ElasticSnapshotsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_Create.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_CreateOrUpdate.json */ /** - * Sample code: Snapshots_Create. + * Sample code: ElasticSnapshots_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotsCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots() + public static void elasticSnapshotsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() .define("snapshot1") - .withRegion("eastus") - .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withExistingElasticVolume("myRG", "account1", "pool1", "volume1") .create(); } } ``` -### Snapshots_Delete +### ElasticSnapshots_Delete ```java /** - * Samples for Snapshots Delete. + * Samples for ElasticSnapshots Delete. */ -public final class SnapshotsDeleteSamples { +public final class ElasticSnapshotsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_Delete.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_Delete.json */ /** - * Sample code: Snapshots_Delete. + * Sample code: ElasticSnapshots_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots() + public static void elasticSnapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` -### Snapshots_Get +### ElasticSnapshots_Get ```java /** - * Samples for Snapshots Get. + * Samples for ElasticSnapshots Get. */ -public final class SnapshotsGetSamples { +public final class ElasticSnapshotsGetSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_Get.json */ /** - * Sample code: Snapshots_Get. + * Sample code: ElasticSnapshots_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots() + public static void elasticSnapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` -### Snapshots_List +### ElasticSnapshots_ListByElasticVolume ```java /** - * Samples for Snapshots List. + * Samples for ElasticSnapshots ListByElasticVolume. */ -public final class SnapshotsListSamples { +public final class ElasticSnapshotsListByElasticVolumeSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_ListByElasticVolume.json */ /** - * Sample code: Snapshots_List. + * Sample code: ElasticSnapshots_ListByElasticVolume. * * @param manager Entry point to NetAppFilesManager. */ - public static void snapshotsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.snapshots().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotsListByElasticVolume(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .listByElasticVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Snapshots_RestoreFiles +### ElasticVolumes_CreateOrUpdate ```java -import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; import java.util.Arrays; /** - * Samples for Snapshots RestoreFiles. + * Samples for ElasticVolumes CreateOrUpdate. */ -public final class SnapshotsRestoreFilesSamples { +public final class ElasticVolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_CreateOrUpdate.json */ /** - * Sample code: Snapshots_SingleFileRestore. + * Sample code: ElasticVolumes_CreateOrUpdate. * * @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); + public static void elasticVolumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .define("volume1") + .withRegion("eastus") + .withExistingElasticCapacityPool("myRG", "account1", "pool1") + .withProperties(new ElasticVolumeProperties().withFilePath("my-unique-file-path") + .withSize(107374182400L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1")))) + .create(); } } ``` -### Subvolumes_Create +### ElasticVolumes_Delete ```java /** - * Samples for Subvolumes Create. + * Samples for ElasticVolumes Delete. */ -public final class SubvolumesCreateSamples { +public final class ElasticVolumesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Create.json + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Delete.json */ /** - * Sample code: Subvolumes_Create. + * Sample code: ElasticVolumes_Delete. * * @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(); + public static void elasticVolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().delete("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Subvolumes_Delete +### ElasticVolumes_Get ```java /** - * Samples for Subvolumes Delete. + * Samples for ElasticVolumes Get. */ -public final class SubvolumesDeleteSamples { +public final class ElasticVolumesGetSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Delete.json + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Get.json */ /** - * Sample code: Subvolumes_Delete. + * Sample code: ElasticVolumes_Get. * * @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); + public static void elasticVolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Subvolumes_Get +### ElasticVolumes_ListByElasticPool ```java /** - * Samples for Subvolumes Get. + * Samples for ElasticVolumes ListByElasticPool. */ -public final class SubvolumesGetSamples { +public final class ElasticVolumesListByElasticPoolSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Get.json + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_ListByElasticPool.json */ /** - * Sample code: Subvolumes_Get. + * Sample code: ElasticVolumes_ListByElasticPool. * * @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); + public static void elasticVolumesListByElasticPool(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().listByElasticPool("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); } } ``` -### Subvolumes_GetMetadata +### ElasticVolumes_Revert ```java +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; + /** - * Samples for Subvolumes GetMetadata. + * Samples for ElasticVolumes Revert. */ -public final class SubvolumesGetMetadataSamples { +public final class ElasticVolumesRevertSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Metadata.json + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Revert.json */ /** - * Sample code: Subvolumes_Metadata. + * Sample code: ElasticVolumes_Revert. * * @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); + public static void elasticVolumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .revert("myRG", "account1", "pool1", "volume1", new ElasticVolumeRevert().withSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"), + com.azure.core.util.Context.NONE); } } ``` -### Subvolumes_ListByVolume +### ElasticVolumes_Update ```java +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Arrays; + /** - * Samples for Subvolumes ListByVolume. + * Samples for ElasticVolumes Update. */ -public final class SubvolumesListByVolumeSamples { +public final class ElasticVolumesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_List.json + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Update.json */ /** - * Sample code: Subvolumes_List. + * Sample code: ElasticVolumes_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void subvolumesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.subvolumes().listByVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + public static void elasticVolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticVolume resource = manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticVolumeUpdateProperties() + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")))) + .apply(); } } ``` -### Subvolumes_Update +### NetAppResource_CheckFilePathAvailability ```java -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; +import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; /** - * Samples for Subvolumes Update. + * Samples for NetAppResource CheckFilePathAvailability. */ -public final class SubvolumesUpdateSamples { +public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Update.json + * x-ms-original-file: 2026-05-15-preview/CheckFilePathAvailability.json */ /** - * Sample code: Subvolumes_Update. + * Sample code: CheckFilePathAvailability. * * @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(); - resource.update().withPath("/subvolumePath").apply(); + public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResources() + .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() + .withName("my-exact-filepath") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + com.azure.core.util.Context.NONE); } } ``` -### VolumeGroups_Create +### NetAppResource_CheckNameAvailability ```java -import com.azure.resourcemanager.netapp.models.ApplicationType; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -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 com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; +import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; /** - * Samples for VolumeGroups Create. + * Samples for NetAppResource CheckNameAvailability. */ -public final class VolumeGroupsCreateSamples { +public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2026-05-15-preview/CheckNameAvailability.json */ /** - * Sample code: VolumeGroups_Create_SapHana. + * Sample code: CheckNameAvailability. * * @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") + 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); + } +} +``` + +### NetAppResource_CheckQuotaAvailability + +```java +import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; +import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; + +/** + * Samples for NetAppResource CheckQuotaAvailability. + */ +public final class NetAppResourceCheckQuotaAvailabilitySamples { + /* + * x-ms-original-file: 2026-05-15-preview/CheckQuotaAvailability.json + */ + /** + * Sample code: CheckQuotaAvailability. + * + * @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); + } +} +``` + +### NetAppResource_QueryNetworkSiblingSet + +```java +import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; + +/** + * Samples for NetAppResource QueryNetworkSiblingSet. + */ +public final class NetAppResourceQueryNetworkSiblingSetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/NetworkSiblingSet_Query.json + */ + /** + * Sample code: NetworkSiblingSet_Query. + * + * @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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResource_QueryRegionInfo + +```java +/** + * Samples for NetAppResource QueryRegionInfo. + */ +public final class NetAppResourceQueryRegionInfoSamples { + /* + * x-ms-original-file: 2026-05-15-preview/RegionInfo.json + */ + /** + * Sample code: RegionInfo_Query. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void regionInfoQuery(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResources().queryRegionInfoWithResponse("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResource_UpdateNetworkSiblingSet + +```java +import com.azure.resourcemanager.netapp.models.NetworkFeatures; +import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; + +/** + * Samples for NetAppResource UpdateNetworkSiblingSet. + */ +public final class NetAppResourceUpdateNetworkSiblingSetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/NetworkSiblingSet_Update.json + */ + /** + * Sample code: NetworkFeatures_Update. + * + * @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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + .withNetworkSiblingSetStateId("12345_44420.8001578125") + .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResourceQuotaLimits_Get + +```java +/** + * Samples for NetAppResourceQuotaLimits Get. + */ +public final class NetAppResourceQuotaLimitsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimits_Get.json + */ + /** + * Sample code: QuotaLimits. + * + * @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); + } +} +``` + +### NetAppResourceQuotaLimits_List + +```java +/** + * Samples for NetAppResourceQuotaLimits List. + */ +public final class NetAppResourceQuotaLimitsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimits_List.json + */ + /** + * Sample code: QuotaLimits. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceQuotaLimits().list("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResourceQuotaLimitsAccount_Get + +```java +/** + * Samples for NetAppResourceQuotaLimitsAccount Get. + */ +public final class NetAppResourceQuotaLimitsAccountGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimitsAccount_Get.json + */ + /** + * Sample code: QuotaLimits. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceQuotaLimitsAccounts() + .getWithResponse("myRG", "myAccount", "poolsPerAccount", com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResourceQuotaLimitsAccount_List + +```java +/** + * Samples for NetAppResourceQuotaLimitsAccount List. + */ +public final class NetAppResourceQuotaLimitsAccountListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimitsAccount_List.json + */ + /** + * Sample code: QuotaLimits. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void quotaLimits(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceQuotaLimitsAccounts().list("myRG", "myAccount", com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResourceRegionInfos_Get + +```java +/** + * Samples for NetAppResourceRegionInfos Get. + */ +public final class NetAppResourceRegionInfosGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/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: 2026-05-15-preview/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); + } +} +``` + +### NetAppResourceUsages_Get + +```java +/** + * Samples for NetAppResourceUsages Get. + */ +public final class NetAppResourceUsagesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Usages_Get.json + */ + /** + * Sample code: Usages_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void usagesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceUsages() + .getWithResponse("eastus", "totalTibsPerSubscription", com.azure.core.util.Context.NONE); + } +} +``` + +### NetAppResourceUsages_List + +```java +/** + * Samples for NetAppResourceUsages List. + */ +public final class NetAppResourceUsagesListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Usages_List.json + */ + /** + * Sample code: Usages_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void usagesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.netAppResourceUsages().list("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/OperationList.json + */ + /** + * Sample code: OperationList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void operationList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.QosType; +import com.azure.resourcemanager.netapp.models.ServiceLevel; + +/** + * Samples for Pools CreateOrUpdate. + */ +public final class PoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Pools_CreateOrUpdate.json + */ + /** + * Sample code: Pools_CreateOrUpdate. + * + * @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(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Pools_CreateOrUpdate_CustomThroughput.json + */ + /** + * Sample code: Pools_CreateOrUpdate_CustomThroughput. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + poolsCreateOrUpdateCustomThroughput(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.pools() + .define("customPool1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .withSize(4398046511104L) + .withServiceLevel(ServiceLevel.FLEXIBLE) + .withCustomThroughputMibps(128) + .withQosType(QosType.MANUAL) + .create(); + } +} +``` + +### Pools_Delete + +```java +/** + * Samples for Pools Delete. + */ +public final class PoolsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Pools_Delete.json + */ + /** + * Sample code: Pools_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void poolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.pools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Get + +```java +/** + * Samples for Pools Get. + */ +public final class PoolsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Pools_Get_CustomThroughput.json + */ + /** + * Sample code: Pools_Get_CustomThroughput. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void poolsGetCustomThroughput(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.pools().getWithResponse("myRG", "account1", "customPool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Pools_Get.json + */ + /** + * Sample code: Pools_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void poolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.pools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_List + +```java +/** + * Samples for Pools List. + */ +public final class PoolsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Pools_List.json + */ + /** + * Sample code: Pools_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void poolsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.pools().list("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_Update + +```java +import com.azure.resourcemanager.netapp.models.CapacityPool; + +/** + * Samples for Pools Update. + */ +public final class PoolsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Pools_Update.json + */ + /** + * Sample code: Pools_Update. + * + * @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(); + resource.update().apply(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Pools_Update_CustomThroughput.json + */ + /** + * Sample code: Pools_Update_CustomThroughput. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void poolsUpdateCustomThroughput(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + CapacityPool resource = manager.pools() + .getWithResponse("myRG", "account1", "customPool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### RansomwareReports_ClearSuspects + +```java +import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; + +/** + * Samples for RansomwareReports ClearSuspects. + */ +public final class RansomwareReportsClearSuspectsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/RansomwareReports_ClearSuspects.json + */ + /** + * Sample code: RansomwareReports_ClearSuspects. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsClearSuspects(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .clearSuspects("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.POTENTIAL_THREAT) + .withExtensions(Arrays.asList(".threat")), + com.azure.core.util.Context.NONE); + } +} +``` + +### RansomwareReports_Get + +```java +/** + * Samples for RansomwareReports Get. + */ +public final class RansomwareReportsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/RansomwareReports_Get.json + */ + /** + * Sample code: RansomwareReports_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .getWithResponse("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + com.azure.core.util.Context.NONE); + } +} +``` + +### RansomwareReports_List + +```java +/** + * Samples for RansomwareReports List. + */ +public final class RansomwareReportsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/RansomwareReports_List.json + */ + /** + * Sample code: RansomwareReports_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### SnapshotPolicies_Create + +```java +import com.azure.resourcemanager.netapp.models.DailySchedule; +import com.azure.resourcemanager.netapp.models.HourlySchedule; +import com.azure.resourcemanager.netapp.models.MonthlySchedule; +import com.azure.resourcemanager.netapp.models.WeeklySchedule; + +/** + * Samples for SnapshotPolicies Create. + */ +public final class SnapshotPoliciesCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/SnapshotPolicies_Create.json + */ + /** + * Sample code: SnapshotPolicies_Create. + * + * @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(); + } +} +``` + +### SnapshotPolicies_Delete + +```java +/** + * Samples for SnapshotPolicies Delete. + */ +public final class SnapshotPoliciesDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/SnapshotPolicies_Delete.json + */ + /** + * Sample code: SnapshotPolicies_Delete. + * + * @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); + } +} +``` + +### SnapshotPolicies_Get + +```java +/** + * Samples for SnapshotPolicies Get. + */ +public final class SnapshotPoliciesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/SnapshotPolicies_Get.json + */ + /** + * Sample code: SnapshotPolicies_Get. + * + * @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); + } +} +``` + +### SnapshotPolicies_List + +```java +/** + * Samples for SnapshotPolicies List. + */ +public final class SnapshotPoliciesListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/SnapshotPolicies_List.json + */ + /** + * Sample code: SnapshotPolicies_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void snapshotPoliciesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.snapshotPolicies().list("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### SnapshotPolicies_ListVolumes + +```java +/** + * Samples for SnapshotPolicies ListVolumes. + */ +public final class SnapshotPoliciesListVolumesSamples { + /* + * x-ms-original-file: 2026-05-15-preview/SnapshotPolicies_ListVolumes.json + */ + /** + * Sample code: SnapshotPolicies_ListVolumes. + * + * @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); + } +} +``` + +### SnapshotPolicies_Update + +```java +import com.azure.resourcemanager.netapp.models.DailySchedule; +import com.azure.resourcemanager.netapp.models.HourlySchedule; +import com.azure.resourcemanager.netapp.models.MonthlySchedule; +import com.azure.resourcemanager.netapp.models.SnapshotPolicy; +import com.azure.resourcemanager.netapp.models.WeeklySchedule; + +/** + * Samples for SnapshotPolicies Update. + */ +public final class SnapshotPoliciesUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/SnapshotPolicies_Update.json + */ + /** + * Sample code: SnapshotPolicies_Update. + * + * @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(); + } +} +``` + +### Snapshots_Create + +```java +/** + * Samples for Snapshots Create. + */ +public final class SnapshotsCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Snapshots_Create.json + */ + /** + * Sample code: Snapshots_Create. + * + * @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(); + } +} +``` + +### Snapshots_Delete + +```java +/** + * Samples for Snapshots Delete. + */ +public final class SnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Snapshots_Delete.json + */ + /** + * Sample code: Snapshots_Delete. + * + * @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); + } +} +``` + +### Snapshots_Get + +```java +/** + * Samples for Snapshots Get. + */ +public final class SnapshotsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Snapshots_Get.json + */ + /** + * Sample code: Snapshots_Get. + * + * @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); + } +} +``` + +### Snapshots_List + +```java +/** + * Samples for Snapshots List. + */ +public final class SnapshotsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Snapshots_List.json + */ + /** + * Sample code: Snapshots_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void snapshotsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.snapshots().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Snapshots_RestoreFiles + +```java +import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; +import java.util.Arrays; + +/** + * Samples for Snapshots RestoreFiles. + */ +public final class SnapshotsRestoreFilesSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Snapshots_SingleFileRestore.json + */ + /** + * Sample code: Snapshots_SingleFileRestore. + * + * @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); + } +} +``` + +### Subvolumes_Create + +```java +/** + * Samples for Subvolumes Create. + */ +public final class SubvolumesCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Subvolumes_Create.json + */ + /** + * Sample code: Subvolumes_Create. + * + * @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(); + } +} +``` + +### Subvolumes_Delete + +```java +/** + * Samples for Subvolumes Delete. + */ +public final class SubvolumesDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Subvolumes_Delete.json + */ + /** + * Sample code: Subvolumes_Delete. + * + * @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); + } +} +``` + +### Subvolumes_Get + +```java +/** + * Samples for Subvolumes Get. + */ +public final class SubvolumesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Subvolumes_Get.json + */ + /** + * Sample code: Subvolumes_Get. + * + * @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); + } +} +``` + +### Subvolumes_GetMetadata + +```java +/** + * Samples for Subvolumes GetMetadata. + */ +public final class SubvolumesGetMetadataSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Subvolumes_Metadata.json + */ + /** + * Sample code: Subvolumes_Metadata. + * + * @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); + } +} +``` + +### Subvolumes_ListByVolume + +```java +/** + * Samples for Subvolumes ListByVolume. + */ +public final class SubvolumesListByVolumeSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Subvolumes_List.json + */ + /** + * Sample code: Subvolumes_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void subvolumesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.subvolumes().listByVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Subvolumes_Update + +```java +import com.azure.resourcemanager.netapp.models.SubvolumeInfo; + +/** + * Samples for Subvolumes Update. + */ +public final class SubvolumesUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Subvolumes_Update.json + */ + /** + * Sample code: Subvolumes_Update. + * + * @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(); + resource.update().withPath("/subvolumePath").apply(); + } +} +``` + +### VolumeGroups_Create + +```java +import com.azure.resourcemanager.netapp.models.ApplicationType; +import com.azure.resourcemanager.netapp.models.AvsDataStore; +import com.azure.resourcemanager.netapp.models.ExportPolicyRule; +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.VolumeGroupMetadata; +import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; +import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; +import java.util.Arrays; + +/** + * Samples for VolumeGroups Create. + */ +public final class VolumeGroupsCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_SapHana.json + */ + /** + * Sample code: VolumeGroups_Create_SapHana. + * + * @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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withProximityPlacementGroup( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") + .withVolumeSpecName("log-backup"))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_Oracle.json + */ + /** + * Sample code: VolumeGroups_Create_Oracle. + * + * @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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/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) @@ -2510,10 +4398,9 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("data"), - new VolumeGroupVolumeProperties().withName("test-log-mnt00001") + .withVolumeSpecName("ora-data7"), + new VolumeGroupVolumeProperties().withName("test-ora-data8") + .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) @@ -2538,10 +4425,9 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("log"), - new VolumeGroupVolumeProperties().withName("test-shared") + .withVolumeSpecName("ora-data8"), + new VolumeGroupVolumeProperties().withName("test-ora-log") + .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) @@ -2566,10 +4452,9 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("shared"), - new VolumeGroupVolumeProperties().withName("test-data-backup") + .withVolumeSpecName("ora-log"), + new VolumeGroupVolumeProperties().withName("test-ora-log-mirror") + .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) @@ -2594,10 +4479,9 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("data-backup"), - new VolumeGroupVolumeProperties().withName("test-log-backup") + .withVolumeSpecName("ora-log-mirror"), + new VolumeGroupVolumeProperties().withName("test-ora-binary") + .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) .withUsageThreshold(107374182400L) @@ -2622,30 +4506,55 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withProximityPlacementGroup( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cys_sjain_fcp_rg/providers/Microsoft.Compute/proximityPlacementGroups/svlqa_sjain_multivolume_ppg") - .withVolumeSpecName("log-backup"))) + .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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("ora-backup"))) .create(); } /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_Custom.json */ /** - * Sample code: VolumeGroups_Create_Oracle. + * Sample code: VolumeGroups_Create_Custom. * * @param manager Entry point to NetAppFilesManager. */ - public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void volumeGroupsCreateCustom(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")) + .withApplicationType(ApplicationType.fromString("CUSTOM")) + .withApplicationIdentifier("CU2")) .withVolumes(Arrays.asList( - new VolumeGroupVolumeProperties().withName("test-ora-data1") + new VolumeGroupVolumeProperties().withName("test-cus-data1") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2671,8 +4580,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data1"), - new VolumeGroupVolumeProperties().withName("test-ora-data2") + .withVolumeSpecName("cus-data1"), + new VolumeGroupVolumeProperties().withName("test-cus-data2") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2698,8 +4607,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data2"), - new VolumeGroupVolumeProperties().withName("test-ora-data3") + .withVolumeSpecName("cus-data2"), + new VolumeGroupVolumeProperties().withName("test-cus-data3") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2725,8 +4634,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data3"), - new VolumeGroupVolumeProperties().withName("test-ora-data4") + .withVolumeSpecName("cus-data3"), + new VolumeGroupVolumeProperties().withName("test-cus-data4") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2752,8 +4661,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data4"), - new VolumeGroupVolumeProperties().withName("test-ora-data5") + .withVolumeSpecName("cus-data4"), + new VolumeGroupVolumeProperties().withName("test-cus-data5") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2779,8 +4688,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data5"), - new VolumeGroupVolumeProperties().withName("test-ora-data6") + .withVolumeSpecName("cus-data5"), + new VolumeGroupVolumeProperties().withName("test-cus-data6") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2806,8 +4715,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data6"), - new VolumeGroupVolumeProperties().withName("test-ora-data7") + .withVolumeSpecName("cus-data6"), + new VolumeGroupVolumeProperties().withName("test-cus-data7") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2833,8 +4742,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data7"), - new VolumeGroupVolumeProperties().withName("test-ora-data8") + .withVolumeSpecName("cus-data7"), + new VolumeGroupVolumeProperties().withName("test-cus-data8") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2860,8 +4769,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-data8"), - new VolumeGroupVolumeProperties().withName("test-ora-log") + .withVolumeSpecName("cus-data8"), + new VolumeGroupVolumeProperties().withName("test-cus-data9") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2887,8 +4796,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-log"), - new VolumeGroupVolumeProperties().withName("test-ora-log-mirror") + .withVolumeSpecName("cus-data9"), + new VolumeGroupVolumeProperties().withName("test-cus-data10") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2914,8 +4823,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-log-mirror"), - new VolumeGroupVolumeProperties().withName("test-ora-binary") + .withVolumeSpecName("cus-data10"), + new VolumeGroupVolumeProperties().withName("test-cus-data11") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2941,8 +4850,8 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-binary"), - new VolumeGroupVolumeProperties().withName("test-ora-backup") + .withVolumeSpecName("cus-data11"), + new VolumeGroupVolumeProperties().withName("test-cus-data12") .withZones(Arrays.asList("1")) .withCreationToken("fakeTokenPlaceholder") .withServiceLevel(ServiceLevel.PREMIUM) @@ -2968,7 +4877,230 @@ public final class VolumeGroupsCreateSamples { .withThroughputMibps(10.0F) .withCapacityPoolResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") - .withVolumeSpecName("ora-backup"))) + .withVolumeSpecName("cus-data12"))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_Custom_SMB.json + */ + /** + * Sample code: VolumeGroups_Create_Custom_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsCreateCustomSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.fromString("CUSTOM")) + .withApplicationIdentifier("CU2")) + .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-cus-data1") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data1"), + new VolumeGroupVolumeProperties().withName("test-cus-data2") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data2"), + new VolumeGroupVolumeProperties().withName("test-cus-data3") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data3"), + new VolumeGroupVolumeProperties().withName("test-cus-data4") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data4"), + new VolumeGroupVolumeProperties().withName("test-cus-data5") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data5"), + new VolumeGroupVolumeProperties().withName("test-cus-data6") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data6"), + new VolumeGroupVolumeProperties().withName("test-cus-data7") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data7"), + new VolumeGroupVolumeProperties().withName("test-cus-data8") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data8"), + new VolumeGroupVolumeProperties().withName("test-cus-data9") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data9"), + new VolumeGroupVolumeProperties().withName("test-cus-data10") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data10"), + new VolumeGroupVolumeProperties().withName("test-cus-data11") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data11"), + new VolumeGroupVolumeProperties().withName("test-cus-data12") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data12"))) .create(); } } @@ -2982,7 +5114,7 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Delete.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -3003,7 +5135,19 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_Custom.json + */ + /** + * Sample code: VolumeGroups_Get_Custom. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsGetCustom(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups().getWithResponse("myRG", "account1", "group1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -3015,7 +5159,19 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_Custom_SMB.json + */ + /** + * Sample code: VolumeGroups_Get_Custom_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsGetCustomSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups().getWithResponse("myRG", "account1", "group1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -3036,7 +5192,19 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_List_Custom.json + */ + /** + * Sample code: VolumeGroups_List_Custom. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsListCustom(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -3048,7 +5216,7 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: 2026-05-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -3071,7 +5239,7 @@ import com.azure.resourcemanager.netapp.models.QuotaType; */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2026-05-15-preview/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -3099,7 +5267,7 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2026-05-15-preview/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -3121,7 +5289,7 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2026-05-15-preview/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -3144,7 +5312,7 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2026-05-15-preview/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -3168,7 +5336,7 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2026-05-15-preview/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -3193,7 +5361,7 @@ public final class VolumeQuotaRulesUpdateSamples { */ public final class VolumesAuthorizeExternalReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_AuthorizeExternalReplication.json */ /** * Sample code: Volumes_AuthorizeExternalReplication. @@ -3218,7 +5386,7 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -3245,7 +5413,7 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2026-05-15-preview/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -3271,7 +5439,7 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_BreakReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -3296,7 +5464,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -3311,7 +5479,7 @@ public final class VolumesCreateOrUpdateSamples { .withCreationToken("my-unique-file-path") .withUsageThreshold(107374182400L) .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .create(); } @@ -3326,7 +5494,7 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Delete.json + * x-ms-original-file: 2026-05-15-preview/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -3347,7 +5515,7 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -3368,7 +5536,7 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeExternalReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_FinalizeExternalReplication.json */ /** * Sample code: Volumes_FinalizeExternalReplication. @@ -3390,7 +5558,7 @@ public final class VolumesFinalizeExternalReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2026-05-15-preview/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -3411,7 +5579,19 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Get.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ExtraLargeVolumes_Get.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeGet. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -3432,7 +5612,19 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_List.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ExtraLargeVolumes_List.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -3455,7 +5647,7 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: 2026-05-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2026-05-15-preview/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -3479,7 +5671,7 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { */ public final class VolumesListQuotaReportSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ListQuotaReport.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ListQuotaReport.json */ /** * Sample code: ListQuotaReport. @@ -3504,7 +5696,7 @@ import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ListReplications.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -3530,7 +5722,7 @@ import java.util.Arrays; */ public final class VolumesPeerExternalClusterSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PeerExternalCluster.json */ /** * Sample code: Volumes_PeerExternalCluster. @@ -3555,7 +5747,7 @@ public final class VolumesPeerExternalClusterSamples { */ public final class VolumesPerformReplicationTransferSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PerformReplicationTransfer.json */ /** * Sample code: Volumes_PerformReplicationTransfer. @@ -3579,7 +5771,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PoolChange.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_PoolChange. @@ -3603,7 +5795,7 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -3625,7 +5817,7 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -3649,7 +5841,7 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. @@ -3676,7 +5868,7 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Relocate.json + * x-ms-original-file: 2026-05-15-preview/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -3699,7 +5891,7 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -3721,7 +5913,7 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -3742,7 +5934,7 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -3765,7 +5957,7 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Revert.json + * x-ms-original-file: 2026-05-15-preview/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -3789,7 +5981,7 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2026-05-15-preview/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -3810,7 +6002,7 @@ public final class VolumesRevertRelocationSamples { */ public final class VolumesSplitCloneFromParentSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_SplitClone.json + * x-ms-original-file: 2026-05-15-preview/Volumes_SplitClone.json */ /** * Sample code: Volumes_SplitClone. @@ -3834,7 +6026,7 @@ import com.azure.resourcemanager.netapp.models.Volume; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Update.json + * x-ms-original-file: 2026-05-15-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index ff2bdd1679cc..d75c9f16e7b7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -18,7 +18,7 @@ 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 api-version 2026-05-01. + 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 api-version 2026-05-15-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true 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 cded158586b5..c9dd2c1cdbd6 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 @@ -26,6 +26,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.implementation.AccountsImpl; +import com.azure.resourcemanager.netapp.implementation.ActiveDirectoryConfigsImpl; import com.azure.resourcemanager.netapp.implementation.BackupPoliciesImpl; import com.azure.resourcemanager.netapp.implementation.BackupVaultsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsImpl; @@ -34,6 +35,14 @@ import com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesImpl; import com.azure.resourcemanager.netapp.implementation.BucketsImpl; import com.azure.resourcemanager.netapp.implementation.CachesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticAccountsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupPoliciesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupVaultsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticCapacityPoolsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticSnapshotPoliciesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticSnapshotsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticVolumesImpl; import com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsImpl; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; @@ -50,6 +59,7 @@ import com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesImpl; import com.azure.resourcemanager.netapp.implementation.VolumesImpl; import com.azure.resourcemanager.netapp.models.Accounts; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigs; import com.azure.resourcemanager.netapp.models.BackupPolicies; import com.azure.resourcemanager.netapp.models.BackupVaults; import com.azure.resourcemanager.netapp.models.Backups; @@ -58,6 +68,14 @@ import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; import com.azure.resourcemanager.netapp.models.Buckets; import com.azure.resourcemanager.netapp.models.Caches; +import com.azure.resourcemanager.netapp.models.ElasticAccounts; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicies; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaults; +import com.azure.resourcemanager.netapp.models.ElasticBackups; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPools; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicies; +import com.azure.resourcemanager.netapp.models.ElasticSnapshots; +import com.azure.resourcemanager.netapp.models.ElasticVolumes; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimitsAccounts; import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; @@ -111,6 +129,24 @@ public final class NetAppFilesManager { private Caches caches; + private ElasticAccounts elasticAccounts; + + private ElasticCapacityPools elasticCapacityPools; + + private ElasticVolumes elasticVolumes; + + private ElasticSnapshots elasticSnapshots; + + private ElasticSnapshotPolicies elasticSnapshotPolicies; + + private ElasticBackupVaults elasticBackupVaults; + + private ElasticBackupPolicies elasticBackupPolicies; + + private ElasticBackups elasticBackups; + + private ActiveDirectoryConfigs activeDirectoryConfigs; + private NetAppResourceQuotaLimits netAppResourceQuotaLimits; private NetAppResourceRegionInfos netAppResourceRegionInfos; @@ -503,6 +539,116 @@ public Caches caches() { return caches; } + /** + * Gets the resource collection API of ElasticAccounts. It manages ElasticAccount. + * + * @return Resource collection API of ElasticAccounts. + */ + public ElasticAccounts elasticAccounts() { + if (this.elasticAccounts == null) { + this.elasticAccounts = new ElasticAccountsImpl(clientObject.getElasticAccounts(), this); + } + return elasticAccounts; + } + + /** + * Gets the resource collection API of ElasticCapacityPools. It manages ElasticCapacityPool. + * + * @return Resource collection API of ElasticCapacityPools. + */ + public ElasticCapacityPools elasticCapacityPools() { + if (this.elasticCapacityPools == null) { + this.elasticCapacityPools = new ElasticCapacityPoolsImpl(clientObject.getElasticCapacityPools(), this); + } + return elasticCapacityPools; + } + + /** + * Gets the resource collection API of ElasticVolumes. It manages ElasticVolume. + * + * @return Resource collection API of ElasticVolumes. + */ + public ElasticVolumes elasticVolumes() { + if (this.elasticVolumes == null) { + this.elasticVolumes = new ElasticVolumesImpl(clientObject.getElasticVolumes(), this); + } + return elasticVolumes; + } + + /** + * Gets the resource collection API of ElasticSnapshots. It manages ElasticSnapshot. + * + * @return Resource collection API of ElasticSnapshots. + */ + public ElasticSnapshots elasticSnapshots() { + if (this.elasticSnapshots == null) { + this.elasticSnapshots = new ElasticSnapshotsImpl(clientObject.getElasticSnapshots(), this); + } + return elasticSnapshots; + } + + /** + * Gets the resource collection API of ElasticSnapshotPolicies. It manages ElasticSnapshotPolicy. + * + * @return Resource collection API of ElasticSnapshotPolicies. + */ + public ElasticSnapshotPolicies elasticSnapshotPolicies() { + if (this.elasticSnapshotPolicies == null) { + this.elasticSnapshotPolicies + = new ElasticSnapshotPoliciesImpl(clientObject.getElasticSnapshotPolicies(), this); + } + return elasticSnapshotPolicies; + } + + /** + * Gets the resource collection API of ElasticBackupVaults. It manages ElasticBackupVault. + * + * @return Resource collection API of ElasticBackupVaults. + */ + public ElasticBackupVaults elasticBackupVaults() { + if (this.elasticBackupVaults == null) { + this.elasticBackupVaults = new ElasticBackupVaultsImpl(clientObject.getElasticBackupVaults(), this); + } + return elasticBackupVaults; + } + + /** + * Gets the resource collection API of ElasticBackupPolicies. It manages ElasticBackupPolicy. + * + * @return Resource collection API of ElasticBackupPolicies. + */ + public ElasticBackupPolicies elasticBackupPolicies() { + if (this.elasticBackupPolicies == null) { + this.elasticBackupPolicies = new ElasticBackupPoliciesImpl(clientObject.getElasticBackupPolicies(), this); + } + return elasticBackupPolicies; + } + + /** + * Gets the resource collection API of ElasticBackups. It manages ElasticBackup. + * + * @return Resource collection API of ElasticBackups. + */ + public ElasticBackups elasticBackups() { + if (this.elasticBackups == null) { + this.elasticBackups = new ElasticBackupsImpl(clientObject.getElasticBackups(), this); + } + return elasticBackups; + } + + /** + * Gets the resource collection API of ActiveDirectoryConfigs. It manages ActiveDirectoryConfig. + * + * @return Resource collection API of ActiveDirectoryConfigs. + */ + public ActiveDirectoryConfigs activeDirectoryConfigs() { + if (this.activeDirectoryConfigs == null) { + this.activeDirectoryConfigs + = new ActiveDirectoryConfigsImpl(clientObject.getActiveDirectoryConfigs(), this); + } + return activeDirectoryConfigs; + } + /** * Gets the resource collection API of NetAppResourceQuotaLimits. * 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 0ce6e2c81f77..a9e5ddc935d6 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 @@ -509,4 +509,57 @@ SyncPoller, Void> beginChangeKeyVault(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) void changeKeyVault(String resourceGroupName, String accountName, ChangeKeyVault body, Context context); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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> beginRefreshLdapBindPassword(String resourceGroupName, String accountName); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRefreshLdapBindPassword(String resourceGroupName, String accountName, + Context context); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 refreshLdapBindPassword(String resourceGroupName, String accountName); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void refreshLdapBindPassword(String resourceGroupName, String accountName, Context context); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java new file mode 100644 index 000000000000..ab9def2b0953 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; + +/** + * An instance of this class provides access to all the operations defined in ActiveDirectoryConfigsClient. + */ +public interface ActiveDirectoryConfigsClient { + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body, Context context); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginUpdate(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginUpdate(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body, Context context); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName, + Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName, Context context); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all active directory configurations within the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all active directory configurations within the subscription. + * + * @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 response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java new file mode 100644 index 000000000000..1b42177183db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticAccountsClient. + */ +public interface ElasticAccountsClient { + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, ElasticAccountInner body); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, ElasticAccountInner body, Context context); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, + Context context); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body, + Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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, Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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, Context context); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @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 response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java new file mode 100644 index 000000000000..12f8ec5cce35 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupPoliciesClient. + */ +public interface ElasticBackupPoliciesClient { + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner get(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body, + Context context); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyInner body); + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyInner body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName, Context context); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java new file mode 100644 index 000000000000..7f9dfbb74b56 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupVaultsClient. + */ +public interface ElasticBackupVaultsClient { + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body, + Context context); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body); + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupVaultInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, ElasticBackupVaultUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupVaultInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, ElasticBackupVaultUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body); + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body, Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java new file mode 100644 index 000000000000..ea1cbfc596b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupInner; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupsClient. + */ +public interface ElasticBackupsClient { + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body, Context context); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java new file mode 100644 index 000000000000..bdf6643876d8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticCapacityPoolsClient. + */ +public interface ElasticCapacityPoolsClient { + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner get(String resourceGroupName, String accountName, String poolName); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body, Context context); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body); + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body, Context context); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticCapacityPoolInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, ElasticCapacityPoolUpdate body); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticCapacityPoolInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, ElasticCapacityPoolUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body); + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body, Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName, + Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName, Context context); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticCapacityPoolInner> beginChangeZone(String resourceGroupName, + String accountName, String poolName, ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticCapacityPoolInner> beginChangeZone(String resourceGroupName, + String accountName, String poolName, ChangeZoneRequest body, Context context); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckElasticResourceAvailabilityResponseInner checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java new file mode 100644 index 000000000000..062bc0b19bb4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticSnapshotPoliciesClient. + */ +public interface ElasticSnapshotPoliciesClient { + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 a ElasticSnapshotPolicy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 a ElasticSnapshotPolicy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner get(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body, + Context context); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyInner body); + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyInner body, Context context); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotPolicyInner> beginUpdate(String resourceGroupName, + String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body, Context context); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body); + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName, Context context); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java new file mode 100644 index 000000000000..b2021a544dba --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotInner; + +/** + * An instance of this class provides access to all the operations defined in ElasticSnapshotsClient. + */ +public interface ElasticSnapshotsClient { + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 a ElasticSnapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 a ElasticSnapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body, + Context context); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, + String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, + String volumeName, String snapshotName, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, String snapshotName, + Context context); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java new file mode 100644 index 000000000000..b273fd6e03d0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticVolumesClient. + */ +public interface ElasticVolumesClient { + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner get(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body, Context context); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeInner body); + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeInner body, Context context); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body, Context context); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body); + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body, Context context); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, + String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, + String volumeName, Context context); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName, Context context); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticPool(String resourceGroupName, String accountName, String poolName); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticPool(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body, Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert 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 39883afaff97..57bd68b86eac 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 @@ -137,6 +137,69 @@ public interface NetAppManagementClient { */ CachesClient getCaches(); + /** + * Gets the ElasticAccountsClient object to access its operations. + * + * @return the ElasticAccountsClient object. + */ + ElasticAccountsClient getElasticAccounts(); + + /** + * Gets the ElasticCapacityPoolsClient object to access its operations. + * + * @return the ElasticCapacityPoolsClient object. + */ + ElasticCapacityPoolsClient getElasticCapacityPools(); + + /** + * Gets the ElasticVolumesClient object to access its operations. + * + * @return the ElasticVolumesClient object. + */ + ElasticVolumesClient getElasticVolumes(); + + /** + * Gets the ElasticSnapshotsClient object to access its operations. + * + * @return the ElasticSnapshotsClient object. + */ + ElasticSnapshotsClient getElasticSnapshots(); + + /** + * Gets the ElasticSnapshotPoliciesClient object to access its operations. + * + * @return the ElasticSnapshotPoliciesClient object. + */ + ElasticSnapshotPoliciesClient getElasticSnapshotPolicies(); + + /** + * Gets the ElasticBackupVaultsClient object to access its operations. + * + * @return the ElasticBackupVaultsClient object. + */ + ElasticBackupVaultsClient getElasticBackupVaults(); + + /** + * Gets the ElasticBackupPoliciesClient object to access its operations. + * + * @return the ElasticBackupPoliciesClient object. + */ + ElasticBackupPoliciesClient getElasticBackupPolicies(); + + /** + * Gets the ElasticBackupsClient object to access its operations. + * + * @return the ElasticBackupsClient object. + */ + ElasticBackupsClient getElasticBackups(); + + /** + * Gets the ActiveDirectoryConfigsClient object to access its operations. + * + * @return the ActiveDirectoryConfigsClient object. + */ + ActiveDirectoryConfigsClient getActiveDirectoryConfigs(); + /** * Gets the NetAppResourceQuotaLimitsClient object to access its operations. * 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 667ce9fe0bd8..27e42ab8104f 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 @@ -11,6 +11,8 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.EntraIdConfig; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import java.io.IOException; import java.util.List; @@ -30,6 +32,11 @@ public final class AccountProperties implements JsonSerializable activeDirectories; + /* + * Entra ID configuration for the account. + */ + private EntraIdConfig entraIdConfig; + /* * Encryption settings */ @@ -51,6 +58,11 @@ public final class AccountProperties implements JsonSerializable activeDirec return this; } + /** + * Get the entraIdConfig property: Entra ID configuration for the account. + * + * @return the entraIdConfig value. + */ + public EntraIdConfig entraIdConfig() { + return this.entraIdConfig; + } + + /** + * Set the entraIdConfig property: Entra ID configuration for the account. + * + * @param entraIdConfig the entraIdConfig value to set. + * @return the AccountProperties object itself. + */ + public AccountProperties withEntraIdConfig(EntraIdConfig entraIdConfig) { + this.entraIdConfig = entraIdConfig; + return this; + } + /** * Get the encryption property: Encryption settings. * @@ -147,6 +179,26 @@ public MultiAdStatus multiAdStatus() { return this.multiAdStatus; } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.ldapConfiguration; + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the AccountProperties object itself. + */ + public AccountProperties withLdapConfiguration(LdapConfiguration ldapConfiguration) { + this.ldapConfiguration = ldapConfiguration; + return this; + } + /** * Validates the instance. * @@ -156,9 +208,15 @@ public void validate() { if (activeDirectories() != null) { activeDirectories().forEach(e -> e.validate()); } + if (entraIdConfig() != null) { + entraIdConfig().validate(); + } if (encryption() != null) { encryption().validate(); } + if (ldapConfiguration() != null) { + ldapConfiguration().validate(); + } } /** @@ -169,8 +227,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("activeDirectories", this.activeDirectories, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("entraIdConfig", this.entraIdConfig); jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeStringField("nfsV4IDDomain", this.nfsV4IdDomain); + jsonWriter.writeJsonField("ldapConfiguration", this.ldapConfiguration); return jsonWriter.writeEndObject(); } @@ -195,6 +255,8 @@ public static AccountProperties fromJson(JsonReader jsonReader) throws IOExcepti List activeDirectories = reader.readArray(reader1 -> ActiveDirectory.fromJson(reader1)); deserializedAccountProperties.activeDirectories = activeDirectories; + } else if ("entraIdConfig".equals(fieldName)) { + deserializedAccountProperties.entraIdConfig = EntraIdConfig.fromJson(reader); } else if ("encryption".equals(fieldName)) { deserializedAccountProperties.encryption = AccountEncryption.fromJson(reader); } else if ("disableShowmount".equals(fieldName)) { @@ -203,6 +265,8 @@ public static AccountProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedAccountProperties.nfsV4IdDomain = reader.getString(); } else if ("multiAdStatus".equals(fieldName)) { deserializedAccountProperties.multiAdStatus = MultiAdStatus.fromString(reader.getString()); + } else if ("ldapConfiguration".equals(fieldName)) { + deserializedAccountProperties.ldapConfiguration = LdapConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountPropertiesPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountPropertiesPatch.java new file mode 100644 index 000000000000..fa5e77c84b13 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountPropertiesPatch.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.AccountEncryption; +import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.EntraIdConfigPatch; +import com.azure.resourcemanager.netapp.models.LdapConfigurationPatch; +import java.io.IOException; +import java.util.List; + +/** + * NetApp account patch properties. + */ +@Fluent +public final class AccountPropertiesPatch implements JsonSerializable { + /* + * Active Directories + */ + private List activeDirectories; + + /* + * Encryption settings + */ + private AccountEncryption encryption; + + /* + * 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. + */ + private String nfsV4IdDomain; + + /* + * Entra ID configuration for the account. + */ + private EntraIdConfigPatch entraIdConfig; + + /* + * LDAP Configuration for the account. + */ + private LdapConfigurationPatch ldapConfiguration; + + /** + * Creates an instance of AccountPropertiesPatch class. + */ + public AccountPropertiesPatch() { + } + + /** + * Get the activeDirectories property: Active Directories. + * + * @return the activeDirectories value. + */ + public List activeDirectories() { + return this.activeDirectories; + } + + /** + * Set the activeDirectories property: Active Directories. + * + * @param activeDirectories the activeDirectories value to set. + * @return the AccountPropertiesPatch object itself. + */ + public AccountPropertiesPatch withActiveDirectories(List activeDirectories) { + this.activeDirectories = activeDirectories; + return this; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public AccountEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the AccountPropertiesPatch object itself. + */ + public AccountPropertiesPatch withEncryption(AccountEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * 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 AccountPropertiesPatch object itself. + */ + public AccountPropertiesPatch withNfsV4IdDomain(String nfsV4IdDomain) { + this.nfsV4IdDomain = nfsV4IdDomain; + return this; + } + + /** + * Get the entraIdConfig property: Entra ID configuration for the account. + * + * @return the entraIdConfig value. + */ + public EntraIdConfigPatch entraIdConfig() { + return this.entraIdConfig; + } + + /** + * Set the entraIdConfig property: Entra ID configuration for the account. + * + * @param entraIdConfig the entraIdConfig value to set. + * @return the AccountPropertiesPatch object itself. + */ + public AccountPropertiesPatch withEntraIdConfig(EntraIdConfigPatch entraIdConfig) { + this.entraIdConfig = entraIdConfig; + return this; + } + + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfigurationPatch ldapConfiguration() { + return this.ldapConfiguration; + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the AccountPropertiesPatch object itself. + */ + public AccountPropertiesPatch withLdapConfiguration(LdapConfigurationPatch ldapConfiguration) { + this.ldapConfiguration = ldapConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (activeDirectories() != null) { + activeDirectories().forEach(e -> e.validate()); + } + if (encryption() != null) { + encryption().validate(); + } + if (entraIdConfig() != null) { + entraIdConfig().validate(); + } + if (ldapConfiguration() != null) { + ldapConfiguration().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("activeDirectories", this.activeDirectories, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("nfsV4IDDomain", this.nfsV4IdDomain); + jsonWriter.writeJsonField("entraIdConfig", this.entraIdConfig); + jsonWriter.writeJsonField("ldapConfiguration", this.ldapConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccountPropertiesPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccountPropertiesPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccountPropertiesPatch. + */ + public static AccountPropertiesPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccountPropertiesPatch deserializedAccountPropertiesPatch = new AccountPropertiesPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activeDirectories".equals(fieldName)) { + List activeDirectories + = reader.readArray(reader1 -> ActiveDirectory.fromJson(reader1)); + deserializedAccountPropertiesPatch.activeDirectories = activeDirectories; + } else if ("encryption".equals(fieldName)) { + deserializedAccountPropertiesPatch.encryption = AccountEncryption.fromJson(reader); + } else if ("nfsV4IDDomain".equals(fieldName)) { + deserializedAccountPropertiesPatch.nfsV4IdDomain = reader.getString(); + } else if ("entraIdConfig".equals(fieldName)) { + deserializedAccountPropertiesPatch.entraIdConfig = EntraIdConfigPatch.fromJson(reader); + } else if ("ldapConfiguration".equals(fieldName)) { + deserializedAccountPropertiesPatch.ldapConfiguration = LdapConfigurationPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccountPropertiesPatch; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java new file mode 100644 index 000000000000..fdbfdf2c2060 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * Active Directory Configuration resource. + */ +@Fluent +public final class ActiveDirectoryConfigInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ActiveDirectoryConfigProperties properties; + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ActiveDirectoryConfigInner class. + */ + public ActiveDirectoryConfigInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ActiveDirectoryConfigProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ActiveDirectoryConfigInner object itself. + */ + public ActiveDirectoryConfigInner withProperties(ActiveDirectoryConfigProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ActiveDirectoryConfigInner object itself. + */ + public ActiveDirectoryConfigInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ActiveDirectoryConfigInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ActiveDirectoryConfigInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigInner. + */ + public static ActiveDirectoryConfigInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigInner deserializedActiveDirectoryConfigInner = new ActiveDirectoryConfigInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.properties + = ActiveDirectoryConfigProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.etag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java index 4ec65b42aeb2..254bfbbada50 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java @@ -147,8 +147,8 @@ public String poolId() { } /** - * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @return the size value. */ @@ -157,8 +157,8 @@ public long size() { } /** - * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @param size the size value to set. * @return the CapacityPoolInner object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java new file mode 100644 index 000000000000..e510e0cead5c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import java.io.IOException; + +/** + * Information regarding availability of a resource. + */ +@Immutable +public final class CheckElasticResourceAvailabilityResponseInner + implements JsonSerializable { + /* + * True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + */ + private CheckElasticResourceAvailabilityStatus isAvailable; + + /* + * Invalid indicates the name provided does not match Azure NetApp Files naming requirements. AlreadyExists + * indicates that the name is already in use and is therefore unavailable. + */ + private CheckElasticResourceAvailabilityReason reason; + + /* + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource + * naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource + * name is already in use, and direct them to select a different name. + */ + private String message; + + /** + * Creates an instance of CheckElasticResourceAvailabilityResponseInner class. + */ + private CheckElasticResourceAvailabilityResponseInner() { + } + + /** + * Get the isAvailable property: True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * + * @return the isAvailable value. + */ + public CheckElasticResourceAvailabilityStatus isAvailable() { + return this.isAvailable; + } + + /** + * Get the reason property: Invalid indicates the name provided does not match Azure NetApp Files naming + * requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * + * @return the reason value. + */ + public CheckElasticResourceAvailabilityReason reason() { + return this.reason; + } + + /** + * Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("isAvailable", this.isAvailable == null ? null : this.isAvailable.toString()); + jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString()); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckElasticResourceAvailabilityResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckElasticResourceAvailabilityResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckElasticResourceAvailabilityResponseInner. + */ + public static CheckElasticResourceAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckElasticResourceAvailabilityResponseInner deserializedCheckElasticResourceAvailabilityResponseInner + = new CheckElasticResourceAvailabilityResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isAvailable".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.isAvailable + = CheckElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.reason + = CheckElasticResourceAvailabilityReason.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckElasticResourceAvailabilityResponseInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java new file mode 100644 index 000000000000..fec53001fe1a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp elastic account resource. + */ +@Fluent +public final class ElasticAccountInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticAccountProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticAccountInner class. + */ + public ElasticAccountInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticAccountProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticAccountInner object itself. + */ + public ElasticAccountInner withProperties(ElasticAccountProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ElasticAccountInner object itself. + */ + public ElasticAccountInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticAccountInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticAccountInner. + */ + public static ElasticAccountInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountInner deserializedElasticAccountInner = new ElasticAccountInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticAccountInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticAccountInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticAccountInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticAccountInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticAccountInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticAccountInner.properties = ElasticAccountProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticAccountInner.eTag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedElasticAccountInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticAccountInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java new file mode 100644 index 000000000000..355c759d9ec7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import java.io.IOException; + +/** + * NetApp Elastic Backup under an elastic Backup Vault. + */ +@Fluent +public final class ElasticBackupInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupInner class. + */ + public ElasticBackupInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupInner object itself. + */ + public ElasticBackupInner withProperties(ElasticBackupProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupInner. + */ + public static ElasticBackupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupInner deserializedElasticBackupInner = new ElasticBackupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupInner.properties = ElasticBackupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java new file mode 100644 index 000000000000..46c2fe6bfa0d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp Elastic Backup Policy resource. + */ +@Fluent +public final class ElasticBackupPolicyInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupPolicyProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupPolicyInner class. + */ + public ElasticBackupPolicyInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupPolicyInner object itself. + */ + public ElasticBackupPolicyInner withProperties(ElasticBackupPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupPolicyInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyInner. + */ + public static ElasticBackupPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyInner deserializedElasticBackupPolicyInner = new ElasticBackupPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticBackupPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupPolicyInner.properties = ElasticBackupPolicyProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticBackupPolicyInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java new file mode 100644 index 000000000000..578bd49e28cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp elastic backup vault resource. + */ +@Fluent +public final class ElasticBackupVaultInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupVaultProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupVaultInner class. + */ + public ElasticBackupVaultInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupVaultProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupVaultInner object itself. + */ + public ElasticBackupVaultInner withProperties(ElasticBackupVaultProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupVaultInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupVaultInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupVaultInner. + */ + public static ElasticBackupVaultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultInner deserializedElasticBackupVaultInner = new ElasticBackupVaultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupVaultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupVaultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupVaultInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticBackupVaultInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupVaultInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupVaultInner.properties = ElasticBackupVaultProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticBackupVaultInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupVaultInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java new file mode 100644 index 000000000000..9440f6af3ca5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * NetApp Elastic Capacity Pool resource. + */ +@Fluent +public final class ElasticCapacityPoolInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticCapacityPoolProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The availability zones. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticCapacityPoolInner class. + */ + public ElasticCapacityPoolInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticCapacityPoolProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticCapacityPoolInner object itself. + */ + public ElasticCapacityPoolInner withProperties(ElasticCapacityPoolProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ElasticCapacityPoolInner object itself. + */ + public ElasticCapacityPoolInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticCapacityPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticCapacityPoolInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolInner. + */ + public static ElasticCapacityPoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolInner deserializedElasticCapacityPoolInner = new ElasticCapacityPoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticCapacityPoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticCapacityPoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticCapacityPoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticCapacityPoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticCapacityPoolInner.properties = ElasticCapacityPoolProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticCapacityPoolInner.eTag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedElasticCapacityPoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java new file mode 100644 index 000000000000..0e81120fbefd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; +import java.io.IOException; + +/** + * NetApp Elastic Snapshot under an Elastic Volume. + */ +@Fluent +public final class ElasticSnapshotInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticSnapshotInner class. + */ + public ElasticSnapshotInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotInner object itself. + */ + public ElasticSnapshotInner withProperties(ElasticSnapshotProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotInner. + */ + public static ElasticSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotInner deserializedElasticSnapshotInner = new ElasticSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticSnapshotInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotInner.properties = ElasticSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java new file mode 100644 index 000000000000..2aa9cb9185f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp Elastic Snapshot Policy under an Elastic Account. + */ +@Fluent +public final class ElasticSnapshotPolicyInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotPolicyProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticSnapshotPolicyInner class. + */ + public ElasticSnapshotPolicyInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotPolicyInner object itself. + */ + public ElasticSnapshotPolicyInner withProperties(ElasticSnapshotPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticSnapshotPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticSnapshotPolicyInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyInner. + */ + public static ElasticSnapshotPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyInner deserializedElasticSnapshotPolicyInner = new ElasticSnapshotPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticSnapshotPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.properties + = ElasticSnapshotPolicyProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java new file mode 100644 index 000000000000..53b43ec7950f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * NetApp Elastic Volume resource. + */ +@Fluent +public final class ElasticVolumeInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticVolumeProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The availability zones. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticVolumeInner class. + */ + public ElasticVolumeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticVolumeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticVolumeInner object itself. + */ + public ElasticVolumeInner withProperties(ElasticVolumeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ElasticVolumeInner object itself. + */ + public ElasticVolumeInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticVolumeInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticVolumeInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeInner. + */ + public static ElasticVolumeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeInner deserializedElasticVolumeInner = new ElasticVolumeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticVolumeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticVolumeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticVolumeInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticVolumeInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticVolumeInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticVolumeInner.properties = ElasticVolumeProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticVolumeInner.eTag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticVolumeInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedElasticVolumeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeInner; + }); + } +} 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 ec793e09817a..c55ef862ec67 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 @@ -12,6 +12,8 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.EntraIdConfig; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import java.io.IOException; @@ -195,6 +197,29 @@ public NetAppAccountInner withActiveDirectories(List activeDire return this; } + /** + * Get the entraIdConfig property: Entra ID configuration for the account. + * + * @return the entraIdConfig value. + */ + public EntraIdConfig entraIdConfig() { + return this.innerProperties() == null ? null : this.innerProperties().entraIdConfig(); + } + + /** + * Set the entraIdConfig property: Entra ID configuration for the account. + * + * @param entraIdConfig the entraIdConfig value to set. + * @return the NetAppAccountInner object itself. + */ + public NetAppAccountInner withEntraIdConfig(EntraIdConfig entraIdConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withEntraIdConfig(entraIdConfig); + return this; + } + /** * Get the encryption property: Encryption settings. * @@ -262,6 +287,29 @@ public MultiAdStatus multiAdStatus() { return this.innerProperties() == null ? null : this.innerProperties().multiAdStatus(); } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().ldapConfiguration(); + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the NetAppAccountInner object itself. + */ + public NetAppAccountInner withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withLdapConfiguration(ldapConfiguration); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java index a7f3357ea72a..f38106329998 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java @@ -18,8 +18,8 @@ @Fluent public final class PoolPatchProperties implements JsonSerializable { /* - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of - * 1099511627776). + * Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or in 1TiB chunks (value + * must be multiple of 1099511627776). */ private Long size; @@ -46,8 +46,8 @@ public PoolPatchProperties() { } /** - * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @return the size value. */ @@ -56,8 +56,8 @@ public Long size() { } /** - * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @param size the size value to set. * @return the PoolPatchProperties object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java index 25b7c2934f0f..f9c2741a0671 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java @@ -26,8 +26,8 @@ public final class PoolProperties implements JsonSerializable { private String poolId; /* - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of - * 1099511627776). + * Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or in 1TiB chunks (value + * must be multiple of 1099511627776). */ private long size; @@ -89,8 +89,8 @@ public String poolId() { } /** - * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @return the size value. */ @@ -99,8 +99,8 @@ public long size() { } /** - * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @param size the size value to set. * @return the PoolProperties object itself. 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 39be9012ae6e..553aed0bff5f 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 @@ -19,6 +19,8 @@ import com.azure.resourcemanager.netapp.models.EnableSubvolumes; import com.azure.resourcemanager.netapp.models.EncryptionKeySource; import com.azure.resourcemanager.netapp.models.FileAccessLogs; +import com.azure.resourcemanager.netapp.models.LargeVolumeType; +import com.azure.resourcemanager.netapp.models.LdapServerType; import com.azure.resourcemanager.netapp.models.MountTargetProperties; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs; @@ -26,6 +28,7 @@ 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.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -235,9 +238,11 @@ public VolumeInner withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -247,9 +252,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeInner object itself. @@ -863,6 +870,29 @@ public VolumeInner withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.innerProperties() == null ? null : this.innerProperties().ldapServerType(); + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLdapServerType(LdapServerType ldapServerType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLdapServerType(ldapServerType); + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1324,6 +1354,37 @@ public VolumeInner withIsLargeVolume(Boolean isLargeVolume) { return this; } + /** + * Get the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + public LargeVolumeType largeVolumeType() { + return this.innerProperties() == null ? null : this.innerProperties().largeVolumeType(); + } + + /** + * Set the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @param largeVolumeType the largeVolumeType value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLargeVolumeType(LargeVolumeType largeVolumeType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLargeVolumeType(largeVolumeType); + return this; + } + /** * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -1342,6 +1403,29 @@ public Long inheritedSizeInBytes() { return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); } + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLanguage(VolumeLanguage language) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + /** * Get the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java index b03bf0e90072..a719bc951111 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java @@ -31,8 +31,10 @@ public final class VolumePatchProperties implements JsonSerializable changeKeyVaultSync(@HostParam("endpoint") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @BodyParam("application/json") ChangeKeyVault body, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/refreshLdapBindPassword") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> refreshLdapBindPassword(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/refreshLdapBindPassword") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response refreshLdapBindPasswordSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -2345,6 +2363,209 @@ public void changeKeyVault(String resourceGroupName, String accountName, ChangeK beginChangeKeyVault(resourceGroupName, accountName, body, context).getFinalResult(); } + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> refreshLdapBindPasswordWithResponseAsync(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.")); + } + return FluxUtil + .withContext(context -> service.refreshLdapBindPassword(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshLdapBindPasswordWithResponse(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.refreshLdapBindPasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, Context.NONE); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response refreshLdapBindPasswordWithResponse(String resourceGroupName, String accountName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.refreshLdapBindPasswordSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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> beginRefreshLdapBindPasswordAsync(String resourceGroupName, + String accountName) { + Mono>> mono + = refreshLdapBindPasswordWithResponseAsync(resourceGroupName, accountName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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> beginRefreshLdapBindPassword(String resourceGroupName, + String accountName) { + Response response = refreshLdapBindPasswordWithResponse(resourceGroupName, accountName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRefreshLdapBindPassword(String resourceGroupName, String accountName, + Context context) { + Response response = refreshLdapBindPasswordWithResponse(resourceGroupName, accountName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 refreshLdapBindPasswordAsync(String resourceGroupName, String accountName) { + return beginRefreshLdapBindPasswordAsync(resourceGroupName, accountName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 refreshLdapBindPassword(String resourceGroupName, String accountName) { + beginRefreshLdapBindPassword(resourceGroupName, accountName).getFinalResult(); + } + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void refreshLdapBindPassword(String resourceGroupName, String accountName, Context context) { + beginRefreshLdapBindPassword(resourceGroupName, accountName, context).getFinalResult(); + } + /** * 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 c0ff6e240394..7b8ebdb2d4ec 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 @@ -122,6 +122,14 @@ public void changeKeyVault(String resourceGroupName, String accountName, ChangeK this.serviceClient().changeKeyVault(resourceGroupName, accountName, body, context); } + public void refreshLdapBindPassword(String resourceGroupName, String accountName) { + this.serviceClient().refreshLdapBindPassword(resourceGroupName, accountName); + } + + public void refreshLdapBindPassword(String resourceGroupName, String accountName, Context context) { + this.serviceClient().refreshLdapBindPassword(resourceGroupName, accountName, context); + } + public NetAppAccount getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java new file mode 100644 index 000000000000..9608e5b64d4d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class ActiveDirectoryConfigImpl + implements ActiveDirectoryConfig, ActiveDirectoryConfig.Definition, ActiveDirectoryConfig.Update { + private ActiveDirectoryConfigInner 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 ActiveDirectoryConfigProperties properties() { + return this.innerModel().properties(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ActiveDirectoryConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String activeDirectoryConfigName; + + private ActiveDirectoryConfigUpdate updateBody; + + public ActiveDirectoryConfigImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ActiveDirectoryConfig create() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .createOrUpdate(resourceGroupName, activeDirectoryConfigName, this.innerModel(), Context.NONE); + return this; + } + + public ActiveDirectoryConfig create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .createOrUpdate(resourceGroupName, activeDirectoryConfigName, this.innerModel(), context); + return this; + } + + ActiveDirectoryConfigImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ActiveDirectoryConfigInner(); + this.serviceManager = serviceManager; + this.activeDirectoryConfigName = name; + } + + public ActiveDirectoryConfigImpl update() { + this.updateBody = new ActiveDirectoryConfigUpdate(); + return this; + } + + public ActiveDirectoryConfig apply() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .update(resourceGroupName, activeDirectoryConfigName, updateBody, Context.NONE); + return this; + } + + public ActiveDirectoryConfig apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .update(resourceGroupName, activeDirectoryConfigName, updateBody, context); + return this; + } + + ActiveDirectoryConfigImpl(ActiveDirectoryConfigInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.activeDirectoryConfigName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "activeDirectoryConfigs"); + } + + public ActiveDirectoryConfig refresh() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE) + .getValue(); + return this; + } + + public ActiveDirectoryConfig refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context) + .getValue(); + return this; + } + + public ActiveDirectoryConfigImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ActiveDirectoryConfigImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ActiveDirectoryConfigImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ActiveDirectoryConfigImpl withProperties(ActiveDirectoryConfigProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ActiveDirectoryConfigImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public ActiveDirectoryConfigImpl withProperties(ActiveDirectoryConfigUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java new file mode 100644 index 000000000000..0b1642b1e178 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java @@ -0,0 +1,1468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; +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 ActiveDirectoryConfigsClient. + */ +public final class ActiveDirectoryConfigsClientImpl implements ActiveDirectoryConfigsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ActiveDirectoryConfigsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ActiveDirectoryConfigsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ActiveDirectoryConfigsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ActiveDirectoryConfigsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientActiveDirectoryConfigs to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientActiveDirectoryConfigs") + public interface ActiveDirectoryConfigsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName) { + 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 (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String activeDirectoryConfigName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, activeDirectoryConfigName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, accept, context); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + return getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE).getValue(); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigInner 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 (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + context); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActiveDirectoryConfigInner> beginCreateOrUpdateAsync( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, Context.NONE); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, activeDirectoryConfigName, body, context); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, context); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, activeDirectoryConfigName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body) { + return beginCreateOrUpdate(resourceGroupName, activeDirectoryConfigName, body).getFinalResult(); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, activeDirectoryConfigName, body, context).getFinalResult(); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate 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 (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + context); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActiveDirectoryConfigInner> + beginUpdateAsync(String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, + this.client.getContext()); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> + beginUpdate(String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + Response response = updateWithResponse(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, Context.NONE); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> beginUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body, Context context) { + Response response = updateWithResponse(resourceGroupName, activeDirectoryConfigName, body, context); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, context); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + return beginUpdateAsync(resourceGroupName, activeDirectoryConfigName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + return beginUpdate(resourceGroupName, activeDirectoryConfigName, body).getFinalResult(); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @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 active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context) { + return beginUpdate(resourceGroupName, activeDirectoryConfigName, body, context).getFinalResult(); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName) { + 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 (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, Context.NONE); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String activeDirectoryConfigName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, context); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, activeDirectoryConfigName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName) { + Response response = deleteWithResponse(resourceGroupName, activeDirectoryConfigName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, activeDirectoryConfigName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName) { + return beginDeleteAsync(resourceGroupName, activeDirectoryConfigName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName) { + beginDelete(resourceGroupName, activeDirectoryConfigName).getFinalResult(); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName, Context context) { + beginDelete(resourceGroupName, activeDirectoryConfigName, context).getFinalResult(); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the subscription. + * + * @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 response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all active directory configurations within the subscription. + * + * @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 response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java new file mode 100644 index 000000000000..57f4f5033f33 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ActiveDirectoryConfigsClient; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigs; + +public final class ActiveDirectoryConfigsImpl implements ActiveDirectoryConfigs { + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigsImpl.class); + + private final ActiveDirectoryConfigsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ActiveDirectoryConfigsImpl(ActiveDirectoryConfigsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ActiveDirectoryConfigImpl(inner.getValue(), this.manager())); + } + + public ActiveDirectoryConfig getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + ActiveDirectoryConfigInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, activeDirectoryConfigName); + if (inner != null) { + return new ActiveDirectoryConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + this.serviceClient().delete(resourceGroupName, activeDirectoryConfigName); + } + + public void delete(String resourceGroupName, String activeDirectoryConfigName, Context context) { + this.serviceClient().delete(resourceGroupName, activeDirectoryConfigName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ActiveDirectoryConfigImpl(inner1, this.manager())); + } + + public ActiveDirectoryConfig getById(String id) { + 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 activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context); + } + + public void deleteById(String id) { + 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 activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + this.delete(resourceGroupName, activeDirectoryConfigName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 activeDirectoryConfigName = ResourceManagerUtils.getValueFromIdByName(id, "activeDirectoryConfigs"); + if (activeDirectoryConfigName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'activeDirectoryConfigs'.", id))); + } + this.delete(resourceGroupName, activeDirectoryConfigName, context); + } + + private ActiveDirectoryConfigsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ActiveDirectoryConfigImpl define(String name) { + return new ActiveDirectoryConfigImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java new file mode 100644 index 000000000000..2b7bfcf99083 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; + +public final class CheckElasticResourceAvailabilityResponseImpl implements CheckElasticResourceAvailabilityResponse { + private CheckElasticResourceAvailabilityResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + CheckElasticResourceAvailabilityResponseImpl(CheckElasticResourceAvailabilityResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public CheckElasticResourceAvailabilityStatus isAvailable() { + return this.innerModel().isAvailable(); + } + + public CheckElasticResourceAvailabilityReason reason() { + return this.innerModel().reason(); + } + + public String message() { + return this.innerModel().message(); + } + + public CheckElasticResourceAvailabilityResponseInner 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/ElasticAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java new file mode 100644 index 000000000000..11bd2660a1ff --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class ElasticAccountImpl implements ElasticAccount, ElasticAccount.Definition, ElasticAccount.Update { + private ElasticAccountInner 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 ElasticAccountProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticAccountInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private ElasticAccountUpdate updateBody; + + public ElasticAccountImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ElasticAccount create() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticAccount create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); + return this; + } + + ElasticAccountImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticAccountInner(); + this.serviceManager = serviceManager; + this.accountName = name; + } + + public ElasticAccountImpl update() { + this.updateBody = new ElasticAccountUpdate(); + return this; + } + + public ElasticAccount apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .update(resourceGroupName, accountName, updateBody, Context.NONE); + return this; + } + + public ElasticAccount apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .update(resourceGroupName, accountName, updateBody, context); + return this; + } + + ElasticAccountImpl(ElasticAccountInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + } + + public ElasticAccount refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE) + .getValue(); + return this; + } + + public ElasticAccount refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, context) + .getValue(); + return this; + } + + public ElasticAccountImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticAccountImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticAccountImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticAccountImpl withProperties(ElasticAccountProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticAccountImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public ElasticAccountImpl withProperties(ElasticAccountUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java new file mode 100644 index 000000000000..1f3905cf94b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java @@ -0,0 +1,1427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; +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 ElasticAccountsClient. + */ +public final class ElasticAccountsClientImpl implements ElasticAccountsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticAccountsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticAccountsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticAccountsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticAccounts to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticAccounts") + public interface ElasticAccountsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, ElasticAccountInner 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + ElasticAccountInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + ElasticAccountInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticAccountInner> + beginCreateOrUpdateAsync(String resourceGroupName, String accountName, ElasticAccountInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticAccountInner.class, ElasticAccountInner.class, this.client.getContext()); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> + beginCreateOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, body); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> + beginCreateOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, body, context); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, context); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + ElasticAccountInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, body).getFinalResult(); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, + Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + ElasticAccountUpdate 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + ElasticAccountUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticAccountInner> beginUpdateAsync(String resourceGroupName, + String accountName, ElasticAccountUpdate body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticAccountInner.class, ElasticAccountInner.class, this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, body); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body, Context context) { + Response response = updateWithResponse(resourceGroupName, accountName, body, context); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body) { + return beginUpdate(resourceGroupName, accountName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @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 netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body, + Context context) { + return beginUpdate(resourceGroupName, accountName, body, context).getFinalResult(); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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) { + 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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, Context.NONE); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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) { + Response response = deleteWithResponse(resourceGroupName, accountName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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, + Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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) { + return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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) { + beginDelete(resourceGroupName, accountName).getFinalResult(); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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, Context context) { + beginDelete(resourceGroupName, accountName, context).getFinalResult(); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @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 response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @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 response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java new file mode 100644 index 000000000000..2a12b6a8e008 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import com.azure.resourcemanager.netapp.models.ElasticAccounts; + +public final class ElasticAccountsImpl implements ElasticAccounts { + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountsImpl.class); + + private final ElasticAccountsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticAccountsImpl(ElasticAccountsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticAccountImpl(inner.getValue(), this.manager())); + } + + public ElasticAccount getByResourceGroup(String resourceGroupName, String accountName) { + ElasticAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); + if (inner != null) { + return new ElasticAccountImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); + } + + public void delete(String resourceGroupName, String accountName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public ElasticAccount getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + this.delete(resourceGroupName, accountName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + this.delete(resourceGroupName, accountName, context); + } + + private ElasticAccountsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticAccountImpl define(String name) { + return new ElasticAccountImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java new file mode 100644 index 000000000000..d5c1bbf4ab11 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; + +public final class ElasticBackupImpl implements ElasticBackup, ElasticBackup.Definition, ElasticBackup.Update { + private ElasticBackupInner 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 ElasticBackupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupInner 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; + + public ElasticBackupImpl withExistingElasticBackupVault(String resourceGroupName, String accountName, + String backupVaultName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.backupVaultName = backupVaultName; + return this; + } + + public ElasticBackup create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticBackup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + ElasticBackupImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupInner(); + this.serviceManager = serviceManager; + this.backupName = name; + } + + public ElasticBackupImpl update() { + return this; + } + + public ElasticBackup apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + ElasticBackupImpl(ElasticBackupInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupVaults"); + this.backupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackups"); + } + + public ElasticBackup refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context) + .getValue(); + return this; + } + + public ElasticBackupImpl withProperties(ElasticBackupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java new file mode 100644 index 000000000000..9570804a8999 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java @@ -0,0 +1,1323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; +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 ElasticBackupPoliciesClient. + */ +public final class ElasticBackupPoliciesClientImpl implements ElasticBackupPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupPoliciesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticBackupPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackupPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackupPolicies") + public interface ElasticBackupPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupPolicyUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupPolicyName") String backupPolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + 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 (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + return getWithResponseAsync(resourceGroupName, accountName, backupPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupPolicyName, accept, context); + } + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner get(String resourceGroupName, String accountName, String backupPolicyName) { + return getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupPolicyName, ElasticBackupPolicyInner 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 (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupPolicyInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupPolicyName, body); + return this.client.getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupPolicyName, body, context); + return this.client.getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, context); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupPolicyName, body).getFinalResult(); + } + + /** + * Create or update the specified Elastic Backup Policy in the NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupPolicyName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate 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 (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, contentType, accept, + body, context); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupPolicyInner> beginUpdateAsync( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupPolicyName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, + this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, backupPolicyName, body); + return this.client.getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String backupPolicyName, ElasticBackupPolicyUpdate body, + Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, backupPolicyName, body, context); + return this.client.getLroResult(response, + ElasticBackupPolicyInner.class, ElasticBackupPolicyInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, + String backupPolicyName, ElasticBackupPolicyUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, backupPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body) { + return beginUpdate(resourceGroupName, accountName, backupPolicyName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupPolicyName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName) { + 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 (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, Context.NONE); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, context); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName, Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName) { + return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName) { + beginDelete(resourceGroupName, accountName, backupPolicyName).getFinalResult(); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, backupPolicyName, context).getFinalResult(); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountSinglePageAsync(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.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, 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 and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPoliciesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java new file mode 100644 index 000000000000..4899e3583e0e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicies; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; + +public final class ElasticBackupPoliciesImpl implements ElasticBackupPolicies { + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPoliciesImpl.class); + + private final ElasticBackupPoliciesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticBackupPoliciesImpl(ElasticBackupPoliciesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupPolicyName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupPolicyImpl(inner.getValue(), this.manager())); + } + + public ElasticBackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName) { + ElasticBackupPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, backupPolicyName); + if (inner != null) { + return new ElasticBackupPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupPolicyName) { + this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName); + } + + public void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName, context); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupPolicyImpl(inner1, this.manager())); + } + + public ElasticBackupPolicy getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, backupPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, backupPolicyName, context); + } + + private ElasticBackupPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupPolicyImpl define(String name) { + return new ElasticBackupPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java new file mode 100644 index 000000000000..b5f1b87e2ade --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; +import java.util.Collections; +import java.util.Map; + +public final class ElasticBackupPolicyImpl + implements ElasticBackupPolicy, ElasticBackupPolicy.Definition, ElasticBackupPolicy.Update { + private ElasticBackupPolicyInner 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 ElasticBackupPolicyProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupPolicyName; + + private ElasticBackupPolicyUpdate updateBody; + + public ElasticBackupPolicyImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticBackupPolicy create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .createOrUpdate(resourceGroupName, accountName, backupPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackupPolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .createOrUpdate(resourceGroupName, accountName, backupPolicyName, this.innerModel(), context); + return this; + } + + ElasticBackupPolicyImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupPolicyInner(); + this.serviceManager = serviceManager; + this.backupPolicyName = name; + } + + public ElasticBackupPolicyImpl update() { + this.updateBody = new ElasticBackupPolicyUpdate(); + return this; + } + + public ElasticBackupPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, updateBody, Context.NONE); + return this; + } + + public ElasticBackupPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, updateBody, context); + return this; + } + + ElasticBackupPolicyImpl(ElasticBackupPolicyInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupPolicies"); + } + + public ElasticBackupPolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackupPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .getWithResponse(resourceGroupName, accountName, backupPolicyName, context) + .getValue(); + return this; + } + + public ElasticBackupPolicyImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticBackupPolicyImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticBackupPolicyImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticBackupPolicyImpl withProperties(ElasticBackupPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticBackupPolicyImpl withProperties(ElasticBackupPolicyUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java new file mode 100644 index 000000000000..13bcd05c95f6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; +import java.util.Collections; +import java.util.Map; + +public final class ElasticBackupVaultImpl + implements ElasticBackupVault, ElasticBackupVault.Definition, ElasticBackupVault.Update { + private ElasticBackupVaultInner 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 ElasticBackupVaultProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupVaultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupVaultName; + + private ElasticBackupVaultUpdate updateBody; + + public ElasticBackupVaultImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticBackupVault create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackupVault create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, this.innerModel(), context); + return this; + } + + ElasticBackupVaultImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupVaultInner(); + this.serviceManager = serviceManager; + this.backupVaultName = name; + } + + public ElasticBackupVaultImpl update() { + this.updateBody = new ElasticBackupVaultUpdate(); + return this; + } + + public ElasticBackupVault apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, updateBody, Context.NONE); + return this; + } + + public ElasticBackupVault apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, updateBody, context); + return this; + } + + ElasticBackupVaultImpl(ElasticBackupVaultInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupVaults"); + } + + public ElasticBackupVault refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackupVault refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .getWithResponse(resourceGroupName, accountName, backupVaultName, context) + .getValue(); + return this; + } + + public ElasticBackupVaultImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticBackupVaultImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticBackupVaultImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticBackupVaultImpl withProperties(ElasticBackupVaultProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java new file mode 100644 index 000000000000..40825ed76062 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java @@ -0,0 +1,1322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; +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 ElasticBackupVaultsClient. + */ +public final class ElasticBackupVaultsClientImpl implements ElasticBackupVaultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupVaultsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupVaultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupVaultsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticBackupVaultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackupVaults to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackupVaults") + public interface ElasticBackupVaultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticBackupVaultUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic 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.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic 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())); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, accept, context); + } + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner get(String resourceGroupName, String accountName, String backupVaultName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, ElasticBackupVaultInner 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + context); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupVaultInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, body); + return this.client.getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, Context.NONE); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupVaultInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, body, context); + return this.client.getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, context); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, body).getFinalResult(); + } + + /** + * Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body Resource create parameters. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, contentType, accept, body, + context); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupVaultInner> beginUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, + this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupVaultInner> beginUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, backupVaultName, body); + return this.client.getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupVaultInner> beginUpdate( + String resourceGroupName, String accountName, String backupVaultName, ElasticBackupVaultUpdate body, + Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, body, context); + return this.client.getLroResult(response, + ElasticBackupVaultInner.class, ElasticBackupVaultInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, + String backupVaultName, ElasticBackupVaultUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param body The resource properties to be updated. + * @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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, context); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupVaultName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupVaultName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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) { + beginDelete(resourceGroupName, accountName, backupVaultName).getFinalResult(); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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) { + beginDelete(resourceGroupName, accountName, backupVaultName, context).getFinalResult(); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountSinglePageAsync(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.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, 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 and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java new file mode 100644 index 000000000000..827e6c61a571 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaults; + +public final class ElasticBackupVaultsImpl implements ElasticBackupVaults { + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultsImpl.class); + + private final ElasticBackupVaultsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticBackupVaultsImpl(ElasticBackupVaultsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, backupVaultName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupVaultImpl(inner.getValue(), this.manager())); + } + + public ElasticBackupVault get(String resourceGroupName, String accountName, String backupVaultName) { + ElasticBackupVaultInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName); + if (inner != null) { + return new ElasticBackupVaultImpl(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 PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupVaultImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupVaultImpl(inner1, this.manager())); + } + + public ElasticBackupVault getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, context); + } + + private ElasticBackupVaultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupVaultImpl define(String name) { + return new ElasticBackupVaultImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java new file mode 100644 index 000000000000..d048173279a6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java @@ -0,0 +1,1420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult; +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 ElasticBackupsClient. + */ +public final class ElasticBackupsClientImpl implements ElasticBackupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackups to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackups") + public interface ElasticBackupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVault(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVaultSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVaultNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic 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.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic 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())); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, backupName, accept, context); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner get(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE).getValue(); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, Context.NONE); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, context); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticBackupInner.class, ElasticBackupInner.class, this.client.getContext()); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, Context.NONE); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, context); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, body).getFinalResult(); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, body, context) + .getFinalResult(); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic 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, ElasticBackupInner 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, Context.NONE); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, context); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticBackupInner.class, ElasticBackupInner.class, this.client.getContext()); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Response response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, Context.NONE); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, context); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, backupName, body).getFinalResult(); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @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 netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, backupName, body, context).getFinalResult(); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, context); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupVaultName, backupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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) { + Response response + = deleteWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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) { + beginDelete(resourceGroupName, accountName, backupVaultName, backupName).getFinalResult(); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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) { + beginDelete(resourceGroupName, accountName, backupVaultName, backupName, context).getFinalResult(); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultSinglePageAsync(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.listByVault(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, 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 all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, + String backupVaultName) { + return new PagedFlux<>(() -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName), + nextLink -> listByVaultNextSinglePageAsync(nextLink)); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultSinglePage(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultSinglePage(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + return new PagedIterable<>(() -> listByVaultSinglePage(resourceGroupName, accountName, backupVaultName), + nextLink -> listByVaultNextSinglePage(nextLink)); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + return new PagedIterable<>( + () -> listByVaultSinglePage(resourceGroupName, accountName, backupVaultName, context), + nextLink -> listByVaultNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java new file mode 100644 index 000000000000..3f110c1e6b84 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackups; + +public final class ElasticBackupsImpl implements ElasticBackups { + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupsImpl.class); + + private final ElasticBackupsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticBackupsImpl(ElasticBackupsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupImpl(inner.getValue(), this.manager())); + } + + public ElasticBackup get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + ElasticBackupInner inner + = this.serviceClient().get(resourceGroupName, accountName, backupVaultName, backupName); + if (inner != null) { + return new ElasticBackupImpl(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 PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + PagedIterable inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupImpl(inner1, this.manager())); + } + + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + PagedIterable inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupImpl(inner1, this.manager())); + } + + public ElasticBackup getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + private ElasticBackupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupImpl define(String name) { + return new ElasticBackupImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java new file mode 100644 index 000000000000..af68ba51b1c6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.Response; +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.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ElasticCapacityPoolImpl + implements ElasticCapacityPool, ElasticCapacityPool.Definition, ElasticCapacityPool.Update { + private ElasticCapacityPoolInner 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 ElasticCapacityPoolProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticCapacityPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private ElasticCapacityPoolUpdate updateBody; + + public ElasticCapacityPoolImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticCapacityPool create() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticCapacityPool create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), context); + return this; + } + + ElasticCapacityPoolImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticCapacityPoolInner(); + this.serviceManager = serviceManager; + this.poolName = name; + } + + public ElasticCapacityPoolImpl update() { + this.updateBody = new ElasticCapacityPoolUpdate(); + return this; + } + + public ElasticCapacityPool apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .update(resourceGroupName, accountName, poolName, updateBody, Context.NONE); + return this; + } + + public ElasticCapacityPool apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .update(resourceGroupName, accountName, poolName, updateBody, context); + return this; + } + + ElasticCapacityPoolImpl(ElasticCapacityPoolInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + } + + public ElasticCapacityPool refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .getWithResponse(resourceGroupName, accountName, poolName, Context.NONE) + .getValue(); + return this; + } + + public ElasticCapacityPool refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .getWithResponse(resourceGroupName, accountName, poolName, context) + .getValue(); + return this; + } + + public ElasticCapacityPool changeZone(ChangeZoneRequest body) { + return serviceManager.elasticCapacityPools().changeZone(resourceGroupName, accountName, poolName, body); + } + + public ElasticCapacityPool changeZone(ChangeZoneRequest body, Context context) { + return serviceManager.elasticCapacityPools() + .changeZone(resourceGroupName, accountName, poolName, body, context); + } + + public Response checkVolumeFilePathAvailabilityWithResponse( + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + return serviceManager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, context); + } + + public CheckElasticResourceAvailabilityResponse + checkVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityRequest body) { + return serviceManager.elasticCapacityPools() + .checkVolumeFilePathAvailability(resourceGroupName, accountName, poolName, body); + } + + public ElasticCapacityPoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticCapacityPoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticCapacityPoolImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticCapacityPoolImpl withProperties(ElasticCapacityPoolProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticCapacityPoolImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + + public ElasticCapacityPoolImpl withProperties(ElasticCapacityPoolUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java new file mode 100644 index 000000000000..6db9b1dff33b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java @@ -0,0 +1,1761 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Post; +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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; +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 ElasticCapacityPoolsClient. + */ +public final class ElasticCapacityPoolsClientImpl implements ElasticCapacityPoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticCapacityPoolsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticCapacityPoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticCapacityPoolsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticCapacityPoolsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticCapacityPools to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticCapacityPools") + public interface ElasticCapacityPoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticCapacityPoolUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> changeZone(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ChangeZoneRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response changeZoneSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ChangeZoneRequest body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> checkVolumeFilePathAvailability( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkVolumeFilePathAvailabilitySync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String poolName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, accept, context); + } + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner get(String resourceGroupName, String accountName, String poolName) { + return getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, ElasticCapacityPoolInner 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 (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticCapacityPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, body); + return this.client.getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticCapacityPoolInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, body, context); + return this.client.getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, context); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, body).getFinalResult(); + } + + /** + * Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body Resource create parameters. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String poolName, ElasticCapacityPoolUpdate 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 (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticCapacityPoolInner> beginUpdateAsync( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolUpdate body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, poolName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, + this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticCapacityPoolInner> + beginUpdate(String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, poolName, body); + return this.client.getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticCapacityPoolInner> beginUpdate( + String resourceGroupName, String accountName, String poolName, ElasticCapacityPoolUpdate body, + Context context) { + Response response = updateWithResponse(resourceGroupName, accountName, poolName, body, context); + return this.client.getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body) { + return beginUpdate(resourceGroupName, accountName, poolName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The resource properties to be updated. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner update(String resourceGroupName, String accountName, String poolName, + ElasticCapacityPoolUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName) { + 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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, Context.NONE); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, context); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, poolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName) { + Response response = deleteWithResponse(resourceGroupName, accountName, poolName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, poolName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName) { + beginDelete(resourceGroupName, accountName, poolName).getFinalResult(); + } + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, context).getFinalResult(); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountSinglePageAsync(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.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, 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 and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> changeZoneWithResponseAsync(String resourceGroupName, String accountName, + String poolName, ChangeZoneRequest 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 (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.changeZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response changeZoneWithResponse(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.changeZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + Context.NONE); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response changeZoneWithResponse(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.changeZoneSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticCapacityPoolInner> + beginChangeZoneAsync(String resourceGroupName, String accountName, String poolName, ChangeZoneRequest body) { + Mono>> mono + = changeZoneWithResponseAsync(resourceGroupName, accountName, poolName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, + this.client.getContext()); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticCapacityPoolInner> + beginChangeZone(String resourceGroupName, String accountName, String poolName, ChangeZoneRequest body) { + Response response = changeZoneWithResponse(resourceGroupName, accountName, poolName, body); + return this.client.getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, Context.NONE); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticCapacityPoolInner> beginChangeZone( + String resourceGroupName, String accountName, String poolName, ChangeZoneRequest body, Context context) { + Response response = changeZoneWithResponse(resourceGroupName, accountName, poolName, body, context); + return this.client.getLroResult(response, + ElasticCapacityPoolInner.class, ElasticCapacityPoolInner.class, context); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono changeZoneAsync(String resourceGroupName, String accountName, + String poolName, ChangeZoneRequest body) { + return beginChangeZoneAsync(resourceGroupName, accountName, poolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body) { + return beginChangeZone(resourceGroupName, accountName, poolName, body).getFinalResult(); + } + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + return beginChangeZone(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkVolumeFilePathAvailabilityWithResponseAsync(String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest 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 (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkVolumeFilePathAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkVolumeFilePathAvailabilityAsync( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body) { + return checkVolumeFilePathAvailabilityWithResponseAsync(resourceGroupName, accountName, poolName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkVolumeFilePathAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckElasticResourceAvailabilityResponseInner checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body) { + return checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java new file mode 100644 index 000000000000..9234248ba2ee --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPools; + +public final class ElasticCapacityPoolsImpl implements ElasticCapacityPools { + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolsImpl.class); + + private final ElasticCapacityPoolsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticCapacityPoolsImpl(ElasticCapacityPoolsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticCapacityPoolImpl(inner.getValue(), this.manager())); + } + + public ElasticCapacityPool get(String resourceGroupName, String accountName, String poolName) { + ElasticCapacityPoolInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName); + if (inner != null) { + return new ElasticCapacityPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, context); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticCapacityPoolImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticCapacityPoolImpl(inner1, this.manager())); + } + + public ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body) { + ElasticCapacityPoolInner inner + = this.serviceClient().changeZone(resourceGroupName, accountName, poolName, body); + if (inner != null) { + return new ElasticCapacityPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + ElasticCapacityPoolInner inner + = this.serviceClient().changeZone(resourceGroupName, accountName, poolName, body, context); + if (inner != null) { + return new ElasticCapacityPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + Response inner = this.serviceClient() + .checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckElasticResourceAvailabilityResponseImpl(inner.getValue(), this.manager())); + } + + public CheckElasticResourceAvailabilityResponse checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body) { + CheckElasticResourceAvailabilityResponseInner inner + = this.serviceClient().checkVolumeFilePathAvailability(resourceGroupName, accountName, poolName, body); + if (inner != null) { + return new CheckElasticResourceAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticCapacityPool getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, context); + } + + private ElasticCapacityPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticCapacityPoolImpl define(String name) { + return new ElasticCapacityPoolImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java new file mode 100644 index 000000000000..7196cc3e5579 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotImpl implements ElasticSnapshot, ElasticSnapshot.Definition, ElasticSnapshot.Update { + private ElasticSnapshotInner 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 ElasticSnapshotProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticSnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private String snapshotName; + + public ElasticSnapshotImpl withExistingElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + this.volumeName = volumeName; + return this; + } + + public ElasticSnapshot create() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticSnapshot create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + context); + return this; + } + + ElasticSnapshotImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticSnapshotInner(); + this.serviceManager = serviceManager; + this.snapshotName = name; + } + + public ElasticSnapshotImpl update() { + return this; + } + + public ElasticSnapshot apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticSnapshot apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + context); + return this; + } + + ElasticSnapshotImpl(ElasticSnapshotInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticVolumes"); + this.snapshotName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticSnapshots"); + } + + public ElasticSnapshot refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + return this; + } + + public ElasticSnapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) + .getValue(); + return this; + } + + public ElasticSnapshotImpl withProperties(ElasticSnapshotProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java new file mode 100644 index 000000000000..e98b44912b66 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java @@ -0,0 +1,1635 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; +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 ElasticSnapshotPoliciesClient. + */ +public final class ElasticSnapshotPoliciesClientImpl implements ElasticSnapshotPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticSnapshotPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticSnapshotPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticSnapshotPoliciesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ElasticSnapshotPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticSnapshotPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticSnapshotPolicies") + public interface ElasticSnapshotPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyUpdate body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotPolicyUpdate body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listElasticVolumes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listElasticVolumesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("snapshotPolicyName") String snapshotPolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticAccountNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listElasticVolumesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listElasticVolumesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 ElasticSnapshotPolicy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String accountName, String snapshotPolicyName) { + 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 (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 ElasticSnapshotPolicy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return getWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 ElasticSnapshotPolicy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, snapshotPolicyName, accept, context); + } + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 ElasticSnapshotPolicy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner get(String resourceGroupName, String accountName, String snapshotPolicyName) { + return getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner 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 (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, context); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticSnapshotPolicyInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, + this.client.getContext()); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, Context.NONE); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotPolicyInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body, context); + return this.client.getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, context); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, snapshotPolicyName, body).getFinalResult(); + } + + /** + * Create a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner createOrUpdate(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, snapshotPolicyName, body, context).getFinalResult(); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate 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 (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, Context.NONE); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, contentType, accept, + body, context); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticSnapshotPolicyInner> beginUpdateAsync( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, + this.client.getContext()); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body); + return this.client.getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, Context.NONE); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotPolicyInner> beginUpdate( + String resourceGroupName, String accountName, String snapshotPolicyName, ElasticSnapshotPolicyUpdate body, + Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, snapshotPolicyName, body, context); + return this.client.getLroResult(response, + ElasticSnapshotPolicyInner.class, ElasticSnapshotPolicyInner.class, context); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, + String snapshotPolicyName, ElasticSnapshotPolicyUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, snapshotPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body) { + return beginUpdate(resourceGroupName, accountName, snapshotPolicyName, body).getFinalResult(); + } + + /** + * Update a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param body The resource properties to be updated. + * @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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, snapshotPolicyName, body, context).getFinalResult(); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName) { + 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 (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, Context.NONE); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, context); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName) { + Response response = deleteWithResponse(resourceGroupName, accountName, snapshotPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName, Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName) { + return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName) { + beginDelete(resourceGroupName, accountName, snapshotPolicyName).getFinalResult(); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, snapshotPolicyName, context).getFinalResult(); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByElasticAccountSinglePageAsync(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.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, 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 ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, + String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listElasticVolumesSinglePageAsync(String resourceGroupName, + String accountName, String snapshotPolicyName) { + 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 (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listElasticVolumes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, 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 elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listElasticVolumesAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return new PagedFlux<>( + () -> listElasticVolumesSinglePageAsync(resourceGroupName, accountName, snapshotPolicyName), + nextLink -> listElasticVolumesNextSinglePageAsync(nextLink)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesSinglePage(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listElasticVolumesSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, + snapshotPolicyName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesSinglePage(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listElasticVolumesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return new PagedIterable<>( + () -> listElasticVolumesSinglePage(resourceGroupName, accountName, snapshotPolicyName), + nextLink -> listElasticVolumesNextSinglePage(nextLink)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + return new PagedIterable<>( + () -> listElasticVolumesSinglePage(resourceGroupName, accountName, snapshotPolicyName, context), + nextLink -> listElasticVolumesNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(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.listByElasticAccountNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listElasticVolumesNextSinglePageAsync(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.listElasticVolumesNext(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. + * @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 elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listElasticVolumesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listElasticVolumesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPoliciesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java new file mode 100644 index 000000000000..1e0054cf2788 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicies; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticVolume; + +public final class ElasticSnapshotPoliciesImpl implements ElasticSnapshotPolicies { + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPoliciesImpl.class); + + private final ElasticSnapshotPoliciesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticSnapshotPoliciesImpl(ElasticSnapshotPoliciesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticSnapshotPolicyImpl(inner.getValue(), this.manager())); + } + + public ElasticSnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName) { + ElasticSnapshotPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, snapshotPolicyName); + if (inner != null) { + return new ElasticSnapshotPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName) { + this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName); + } + + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName, context); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName) { + PagedIterable inner + = this.serviceClient().listElasticVolumes(resourceGroupName, accountName, snapshotPolicyName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + PagedIterable inner + = this.serviceClient().listElasticVolumes(resourceGroupName, accountName, snapshotPolicyName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public ElasticSnapshotPolicy getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, snapshotPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, snapshotPolicyName, context); + } + + private ElasticSnapshotPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticSnapshotPolicyImpl define(String name) { + return new ElasticSnapshotPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java new file mode 100644 index 000000000000..c0f1db8361fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import java.util.Collections; +import java.util.Map; + +public final class ElasticSnapshotPolicyImpl + implements ElasticSnapshotPolicy, ElasticSnapshotPolicy.Definition, ElasticSnapshotPolicy.Update { + private ElasticSnapshotPolicyInner 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 ElasticSnapshotPolicyProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticSnapshotPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String snapshotPolicyName; + + private ElasticSnapshotPolicyUpdate updateBody; + + public ElasticSnapshotPolicyImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticSnapshotPolicy create() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .createOrUpdate(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticSnapshotPolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .createOrUpdate(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), context); + return this; + } + + ElasticSnapshotPolicyImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticSnapshotPolicyInner(); + this.serviceManager = serviceManager; + this.snapshotPolicyName = name; + } + + public ElasticSnapshotPolicyImpl update() { + this.updateBody = new ElasticSnapshotPolicyUpdate(); + return this; + } + + public ElasticSnapshotPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, updateBody, Context.NONE); + return this; + } + + public ElasticSnapshotPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, updateBody, context); + return this; + } + + ElasticSnapshotPolicyImpl(ElasticSnapshotPolicyInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.snapshotPolicyName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticSnapshotPolicies"); + } + + public ElasticSnapshotPolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE) + .getValue(); + return this; + } + + public ElasticSnapshotPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context) + .getValue(); + return this; + } + + public ElasticSnapshotPolicyImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticSnapshotPolicyImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticSnapshotPolicyImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticSnapshotPolicyImpl withProperties(ElasticSnapshotPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticSnapshotPolicyImpl withProperties(ElasticSnapshotPolicyUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java new file mode 100644 index 000000000000..95ea6dc5374f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java @@ -0,0 +1,1188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult; +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 ElasticSnapshotsClient. + */ +public final class ElasticSnapshotsClientImpl implements ElasticSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticSnapshotsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticSnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticSnapshots to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticSnapshots") + public interface ElasticSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticVolume(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticVolumeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticVolumeNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticVolumeNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 ElasticSnapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + 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 (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.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 ElasticSnapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 ElasticSnapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, snapshotName, accept, context); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 ElasticSnapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner 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 (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, Context.NONE); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, context); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticSnapshotInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticSnapshotInner.class, ElasticSnapshotInner.class, this.client.getContext()); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); + return this.client.getLroResult(response, + ElasticSnapshotInner.class, ElasticSnapshotInner.class, Context.NONE); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, + snapshotName, body, context); + return this.client.getLroResult(response, + ElasticSnapshotInner.class, ElasticSnapshotInner.class, context); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) + .getFinalResult(); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @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 netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) + .getFinalResult(); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, String snapshotName) { + 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 (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + Context.NONE); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + context); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, String snapshotName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, + String volumeName, String snapshotName) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, + String volumeName, String snapshotName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, + String snapshotName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, + String snapshotName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, snapshotName).getFinalResult(); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, + String snapshotName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context).getFinalResult(); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticVolumeSinglePageAsync(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.listByElasticVolume(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, 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 ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticVolumeAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return new PagedFlux<>( + () -> listByElasticVolumeSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listByElasticVolumeNextSinglePageAsync(nextLink)); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeSinglePage(String resourceGroupName, + String accountName, String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByElasticVolumeSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + volumeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeSinglePage(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticVolumeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return new PagedIterable<>( + () -> listByElasticVolumeSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listByElasticVolumeNextSinglePage(nextLink)); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + return new PagedIterable<>( + () -> listByElasticVolumeSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listByElasticVolumeNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticVolumeNextSinglePageAsync(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.listByElasticVolumeNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticVolumeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticVolumeNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java new file mode 100644 index 000000000000..de5a2418aa00 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshots; + +public final class ElasticSnapshotsImpl implements ElasticSnapshots { + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotsImpl.class); + + private final ElasticSnapshotsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticSnapshotsImpl(ElasticSnapshotsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticSnapshotImpl(inner.getValue(), this.manager())); + } + + public ElasticSnapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + ElasticSnapshotInner inner + = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, snapshotName); + if (inner != null) { + return new ElasticSnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName) { + PagedIterable inner + = this.serviceClient().listByElasticVolume(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + PagedIterable inner + = this.serviceClient().listByElasticVolume(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotImpl(inner1, this.manager())); + } + + public ElasticSnapshot getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + private ElasticSnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticSnapshotImpl define(String name) { + return new ElasticSnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java new file mode 100644 index 000000000000..adb207a1a222 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ElasticVolumeImpl implements ElasticVolume, ElasticVolume.Definition, ElasticVolume.Update { + private ElasticVolumeInner 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 ElasticVolumeProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticVolumeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private ElasticVolumeUpdate updateBody; + + public ElasticVolumeImpl withExistingElasticCapacityPool(String resourceGroupName, String accountName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + return this; + } + + public ElasticVolume create() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticVolume create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), context); + return this; + } + + ElasticVolumeImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticVolumeInner(); + this.serviceManager = serviceManager; + this.volumeName = name; + } + + public ElasticVolumeImpl update() { + this.updateBody = new ElasticVolumeUpdate(); + return this; + } + + public ElasticVolume apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, Context.NONE); + return this; + } + + public ElasticVolume apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, context); + return this; + } + + ElasticVolumeImpl(ElasticVolumeInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticVolumes"); + } + + public ElasticVolume refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) + .getValue(); + return this; + } + + public ElasticVolume refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, context) + .getValue(); + return this; + } + + public ElasticVolume revert(ElasticVolumeRevert body) { + return serviceManager.elasticVolumes().revert(resourceGroupName, accountName, poolName, volumeName, body); + } + + public ElasticVolume revert(ElasticVolumeRevert body, Context context) { + return serviceManager.elasticVolumes() + .revert(resourceGroupName, accountName, poolName, volumeName, body, context); + } + + public ElasticVolumeImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticVolumeImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticVolumeImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticVolumeImpl withProperties(ElasticVolumeProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticVolumeImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + + public ElasticVolumeImpl withProperties(ElasticVolumeUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java new file mode 100644 index 000000000000..1070e6438b54 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java @@ -0,0 +1,1710 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.Post; +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.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +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 ElasticVolumesClient. + */ +public final class ElasticVolumesClientImpl implements ElasticVolumesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticVolumesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticVolumesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticVolumesClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticVolumesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticVolumes to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticVolumes") + public interface ElasticVolumesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticPool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticPoolSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> revert(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeRevert body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response revertSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticVolumeRevert body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticPoolNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticPoolNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, accept, context); + } + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner get(String resourceGroupName, String accountName, String poolName, String volumeName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE).getValue(); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, context); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticVolumeInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, ElasticVolumeInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticVolumeInner.class, ElasticVolumeInner.class, this.client.getContext()); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, Context.NONE); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticVolumeInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, context); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, body).getFinalResult(); + } + + /** + * Create or update the specified volume within the capacity pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body Resource create parameters. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, body, context) + .getFinalResult(); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeUpdate 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, Context.NONE); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, context); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticVolumeInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticVolumeInner.class, ElasticVolumeInner.class, this.client.getContext()); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, Context.NONE); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticVolumeInner> beginUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeUpdate body, Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, context); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, body).getFinalResult(); + } + + /** + * Patch the specified elastic volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The resource properties to be updated. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 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.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, Context.NONE); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, context); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, + String volumeName) { + Response response = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, + String volumeName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName).getFinalResult(); + } + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName, + Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, context).getFinalResult(); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticPoolSinglePageAsync(String resourceGroupName, + String accountName, String poolName) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, 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 all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticPoolAsync(String resourceGroupName, String accountName, + String poolName) { + return new PagedFlux<>(() -> listByElasticPoolSinglePageAsync(resourceGroupName, accountName, poolName), + nextLink -> listByElasticPoolNextSinglePageAsync(nextLink)); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticPoolSinglePage(String resourceGroupName, String accountName, + String poolName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticPoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticPoolSinglePage(String resourceGroupName, String accountName, + String poolName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticPoolSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticPool(String resourceGroupName, String accountName, + String poolName) { + return new PagedIterable<>(() -> listByElasticPoolSinglePage(resourceGroupName, accountName, poolName), + nextLink -> listByElasticPoolNextSinglePage(nextLink)); + } + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticPool(String resourceGroupName, String accountName, + String poolName, Context context) { + return new PagedIterable<>(() -> listByElasticPoolSinglePage(resourceGroupName, accountName, poolName, context), + nextLink -> listByElasticPoolNextSinglePage(nextLink, context)); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> revertWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, ElasticVolumeRevert 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 contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.revert(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response revertWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeRevert body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.revertSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, Context.NONE); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response revertWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeRevert body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.revertSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, contentType, accept, + body, context); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticVolumeInner> beginRevertAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body) { + Mono>> mono + = revertWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticVolumeInner.class, ElasticVolumeInner.class, this.client.getContext()); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body) { + Response response = revertWithResponse(resourceGroupName, accountName, poolName, volumeName, body); + return this.client.getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, Context.NONE); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticVolumeInner> beginRevert(String resourceGroupName, + String accountName, String poolName, String volumeName, ElasticVolumeRevert body, Context context) { + Response response + = revertWithResponse(resourceGroupName, accountName, poolName, volumeName, body, context); + return this.client.getLroResult(response, ElasticVolumeInner.class, + ElasticVolumeInner.class, context); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono revertAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, ElasticVolumeRevert body) { + return beginRevertAsync(resourceGroupName, accountName, poolName, volumeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body) { + return beginRevert(resourceGroupName, accountName, poolName, volumeName, body).getFinalResult(); + } + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context) { + return beginRevert(resourceGroupName, accountName, poolName, volumeName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticPoolNextSinglePageAsync(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.listByElasticPoolNext(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticPoolNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticPoolNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @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 response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticPoolNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticPoolNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java new file mode 100644 index 000000000000..7bb4bbf1f4fe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticVolumesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumes; + +public final class ElasticVolumesImpl implements ElasticVolumes { + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumesImpl.class); + + private final ElasticVolumesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ElasticVolumesImpl(ElasticVolumesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticVolumeImpl(inner.getValue(), this.manager())); + } + + public ElasticVolume get(String resourceGroupName, String accountName, String poolName, String volumeName) { + ElasticVolumeInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName); + if (inner != null) { + return new ElasticVolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, context); + } + + public PagedIterable listByElasticPool(String resourceGroupName, String accountName, + String poolName) { + PagedIterable inner + = this.serviceClient().listByElasticPool(resourceGroupName, accountName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticPool(String resourceGroupName, String accountName, String poolName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticPool(resourceGroupName, accountName, poolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body) { + ElasticVolumeInner inner + = this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body); + if (inner != null) { + return new ElasticVolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context) { + ElasticVolumeInner inner + = this.serviceClient().revert(resourceGroupName, accountName, poolName, volumeName, body, context); + if (inner != null) { + return new ElasticVolumeImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticVolume getById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + } + + public void deleteById(String id) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + 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 = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, context); + } + + private ElasticVolumesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticVolumeImpl define(String name) { + return new ElasticVolumeImpl(name, this.manager()); + } +} 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 f7fdcc5c73b5..d8a9b6646b30 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 @@ -12,7 +12,11 @@ import com.azure.resourcemanager.netapp.models.ActiveDirectory; import com.azure.resourcemanager.netapp.models.ChangeKeyVault; import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; +import com.azure.resourcemanager.netapp.models.EntraIdConfig; +import com.azure.resourcemanager.netapp.models.EntraIdConfigPatch; import com.azure.resourcemanager.netapp.models.GetKeyVaultStatusResponse; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; +import com.azure.resourcemanager.netapp.models.LdapConfigurationPatch; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import com.azure.resourcemanager.netapp.models.NetAppAccount; @@ -76,6 +80,10 @@ public List activeDirectories() { } } + public EntraIdConfig entraIdConfig() { + return this.innerModel().entraIdConfig(); + } + public AccountEncryption encryption() { return this.innerModel().encryption(); } @@ -92,6 +100,10 @@ public MultiAdStatus multiAdStatus() { return this.innerModel().multiAdStatus(); } + public LdapConfiguration ldapConfiguration() { + return this.innerModel().ldapConfiguration(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -217,6 +229,14 @@ public void changeKeyVault(ChangeKeyVault body, Context context) { serviceManager.accounts().changeKeyVault(resourceGroupName, accountName, body, context); } + public void refreshLdapBindPassword() { + serviceManager.accounts().refreshLdapBindPassword(resourceGroupName, accountName); + } + + public void refreshLdapBindPassword(Context context) { + serviceManager.accounts().refreshLdapBindPassword(resourceGroupName, accountName, context); + } + public NetAppAccountImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -257,6 +277,11 @@ public NetAppAccountImpl withActiveDirectories(List activeDirec } } + public NetAppAccountImpl withEntraIdConfig(EntraIdConfig entraIdConfig) { + this.innerModel().withEntraIdConfig(entraIdConfig); + return this; + } + public NetAppAccountImpl withEncryption(AccountEncryption encryption) { if (isInCreateMode()) { this.innerModel().withEncryption(encryption); @@ -277,6 +302,21 @@ public NetAppAccountImpl withNfsV4IdDomain(String nfsV4IdDomain) { } } + public NetAppAccountImpl withLdapConfiguration(LdapConfiguration ldapConfiguration) { + this.innerModel().withLdapConfiguration(ldapConfiguration); + return this; + } + + public NetAppAccountImpl withEntraIdConfig(EntraIdConfigPatch entraIdConfig) { + this.updateBody.withEntraIdConfig(entraIdConfig); + return this; + } + + public NetAppAccountImpl withLdapConfiguration(LdapConfigurationPatch ldapConfiguration) { + this.updateBody.withLdapConfiguration(ldapConfiguration); + return this; + } + private boolean isInCreateMode() { return this.innerModel() == null || 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 978e7998cbe2..8e0eee0eae97 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 @@ -27,6 +27,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.netapp.fluent.AccountsClient; +import com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient; import com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient; import com.azure.resourcemanager.netapp.fluent.BackupVaultsClient; import com.azure.resourcemanager.netapp.fluent.BackupsClient; @@ -35,6 +36,14 @@ import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; import com.azure.resourcemanager.netapp.fluent.BucketsClient; import com.azure.resourcemanager.netapp.fluent.CachesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; @@ -330,6 +339,132 @@ public CachesClient getCaches() { return this.caches; } + /** + * The ElasticAccountsClient object to access its operations. + */ + private final ElasticAccountsClient elasticAccounts; + + /** + * Gets the ElasticAccountsClient object to access its operations. + * + * @return the ElasticAccountsClient object. + */ + public ElasticAccountsClient getElasticAccounts() { + return this.elasticAccounts; + } + + /** + * The ElasticCapacityPoolsClient object to access its operations. + */ + private final ElasticCapacityPoolsClient elasticCapacityPools; + + /** + * Gets the ElasticCapacityPoolsClient object to access its operations. + * + * @return the ElasticCapacityPoolsClient object. + */ + public ElasticCapacityPoolsClient getElasticCapacityPools() { + return this.elasticCapacityPools; + } + + /** + * The ElasticVolumesClient object to access its operations. + */ + private final ElasticVolumesClient elasticVolumes; + + /** + * Gets the ElasticVolumesClient object to access its operations. + * + * @return the ElasticVolumesClient object. + */ + public ElasticVolumesClient getElasticVolumes() { + return this.elasticVolumes; + } + + /** + * The ElasticSnapshotsClient object to access its operations. + */ + private final ElasticSnapshotsClient elasticSnapshots; + + /** + * Gets the ElasticSnapshotsClient object to access its operations. + * + * @return the ElasticSnapshotsClient object. + */ + public ElasticSnapshotsClient getElasticSnapshots() { + return this.elasticSnapshots; + } + + /** + * The ElasticSnapshotPoliciesClient object to access its operations. + */ + private final ElasticSnapshotPoliciesClient elasticSnapshotPolicies; + + /** + * Gets the ElasticSnapshotPoliciesClient object to access its operations. + * + * @return the ElasticSnapshotPoliciesClient object. + */ + public ElasticSnapshotPoliciesClient getElasticSnapshotPolicies() { + return this.elasticSnapshotPolicies; + } + + /** + * The ElasticBackupVaultsClient object to access its operations. + */ + private final ElasticBackupVaultsClient elasticBackupVaults; + + /** + * Gets the ElasticBackupVaultsClient object to access its operations. + * + * @return the ElasticBackupVaultsClient object. + */ + public ElasticBackupVaultsClient getElasticBackupVaults() { + return this.elasticBackupVaults; + } + + /** + * The ElasticBackupPoliciesClient object to access its operations. + */ + private final ElasticBackupPoliciesClient elasticBackupPolicies; + + /** + * Gets the ElasticBackupPoliciesClient object to access its operations. + * + * @return the ElasticBackupPoliciesClient object. + */ + public ElasticBackupPoliciesClient getElasticBackupPolicies() { + return this.elasticBackupPolicies; + } + + /** + * The ElasticBackupsClient object to access its operations. + */ + private final ElasticBackupsClient elasticBackups; + + /** + * Gets the ElasticBackupsClient object to access its operations. + * + * @return the ElasticBackupsClient object. + */ + public ElasticBackupsClient getElasticBackups() { + return this.elasticBackups; + } + + /** + * The ActiveDirectoryConfigsClient object to access its operations. + */ + private final ActiveDirectoryConfigsClient activeDirectoryConfigs; + + /** + * Gets the ActiveDirectoryConfigsClient object to access its operations. + * + * @return the ActiveDirectoryConfigsClient object. + */ + public ActiveDirectoryConfigsClient getActiveDirectoryConfigs() { + return this.activeDirectoryConfigs; + } + /** * The NetAppResourceQuotaLimitsClient object to access its operations. */ @@ -487,7 +622,7 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-05-01"; + this.apiVersion = "2026-05-15-preview"; this.operations = new OperationsClientImpl(this); this.netAppResourceQuotaLimitsAccounts = new NetAppResourceQuotaLimitsAccountsClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); @@ -501,6 +636,15 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.backupVaults = new BackupVaultsClientImpl(this); this.buckets = new BucketsClientImpl(this); this.caches = new CachesClientImpl(this); + this.elasticAccounts = new ElasticAccountsClientImpl(this); + this.elasticCapacityPools = new ElasticCapacityPoolsClientImpl(this); + this.elasticVolumes = new ElasticVolumesClientImpl(this); + this.elasticSnapshots = new ElasticSnapshotsClientImpl(this); + this.elasticSnapshotPolicies = new ElasticSnapshotPoliciesClientImpl(this); + this.elasticBackupVaults = new ElasticBackupVaultsClientImpl(this); + this.elasticBackupPolicies = new ElasticBackupPoliciesClientImpl(this); + this.elasticBackups = new ElasticBackupsClientImpl(this); + this.activeDirectoryConfigs = new ActiveDirectoryConfigsClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); this.netAppResourceRegionInfos = new NetAppResourceRegionInfosClientImpl(this); this.accounts = new AccountsClientImpl(this); 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 3d7b5ddb758e..24a3e1e152a8 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 @@ -23,6 +23,8 @@ import com.azure.resourcemanager.netapp.models.FileAccessLogs; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; +import com.azure.resourcemanager.netapp.models.LargeVolumeType; +import com.azure.resourcemanager.netapp.models.LdapServerType; import com.azure.resourcemanager.netapp.models.ListQuotaReportResult; import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; import com.azure.resourcemanager.netapp.models.MountTargetProperties; @@ -40,6 +42,7 @@ import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; import com.azure.resourcemanager.netapp.models.SvmPeerCommandResponse; import com.azure.resourcemanager.netapp.models.Volume; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePatch; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; @@ -240,6 +243,10 @@ public Boolean ldapEnabled() { return this.innerModel().ldapEnabled(); } + public LdapServerType ldapServerType() { + return this.innerModel().ldapServerType(); + } + public Boolean coolAccess() { return this.innerModel().coolAccess(); } @@ -342,6 +349,10 @@ public Boolean isLargeVolume() { return this.innerModel().isLargeVolume(); } + public LargeVolumeType largeVolumeType() { + return this.innerModel().largeVolumeType(); + } + public String originatingResourceId() { return this.innerModel().originatingResourceId(); } @@ -350,6 +361,10 @@ public Long inheritedSizeInBytes() { return this.innerModel().inheritedSizeInBytes(); } + public VolumeLanguage language() { + return this.innerModel().language(); + } + public BreakthroughMode breakthroughMode() { return this.innerModel().breakthroughMode(); } @@ -822,6 +837,11 @@ public VolumeImpl withLdapEnabled(Boolean ldapEnabled) { return this; } + public VolumeImpl withLdapServerType(LdapServerType ldapServerType) { + this.innerModel().withLdapServerType(ldapServerType); + return this; + } + public VolumeImpl withCoolAccess(Boolean coolAccess) { if (isInCreateMode()) { this.innerModel().withCoolAccess(coolAccess); @@ -937,6 +957,16 @@ public VolumeImpl withIsLargeVolume(Boolean isLargeVolume) { return this; } + public VolumeImpl withLargeVolumeType(LargeVolumeType largeVolumeType) { + this.innerModel().withLargeVolumeType(largeVolumeType); + return this; + } + + public VolumeImpl withLanguage(VolumeLanguage language) { + this.innerModel().withLanguage(language); + return this; + } + public VolumeImpl withBreakthroughMode(BreakthroughMode breakthroughMode) { this.innerModel().withBreakthroughMode(breakthroughMode); return this; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java new file mode 100644 index 000000000000..c4156bf746f6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ActiveDirectoryConfig list operation. + */ +@Immutable +public final class ActiveDirectoryConfigListResult implements JsonSerializable { + /* + * The ActiveDirectoryConfig items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ActiveDirectoryConfigListResult class. + */ + private ActiveDirectoryConfigListResult() { + } + + /** + * Get the value property: The ActiveDirectoryConfig items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ActiveDirectoryConfigListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigListResult. + */ + public static ActiveDirectoryConfigListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigListResult deserializedActiveDirectoryConfigListResult + = new ActiveDirectoryConfigListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ActiveDirectoryConfigInner.fromJson(reader1)); + deserializedActiveDirectoryConfigListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedActiveDirectoryConfigListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java new file mode 100644 index 000000000000..39dc1ba7e341 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticAccount list operation. + */ +@Immutable +public final class ElasticAccountListResult implements JsonSerializable { + /* + * The ElasticAccount items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticAccountListResult class. + */ + private ElasticAccountListResult() { + } + + /** + * Get the value property: The ElasticAccount items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticAccountListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticAccountListResult. + */ + public static ElasticAccountListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountListResult deserializedElasticAccountListResult = new ElasticAccountListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticAccountInner.fromJson(reader1)); + deserializedElasticAccountListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticAccountListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java new file mode 100644 index 000000000000..0667488f7b95 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackup list operation. + */ +@Immutable +public final class ElasticBackupListResult implements JsonSerializable { + /* + * The ElasticBackup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupListResult class. + */ + private ElasticBackupListResult() { + } + + /** + * Get the value property: The ElasticBackup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticBackupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupListResult. + */ + public static ElasticBackupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupListResult deserializedElasticBackupListResult = new ElasticBackupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticBackupInner.fromJson(reader1)); + deserializedElasticBackupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java new file mode 100644 index 000000000000..aaaed85dae68 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackupPolicy list operation. + */ +@Immutable +public final class ElasticBackupPolicyListResult implements JsonSerializable { + /* + * The ElasticBackupPolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupPolicyListResult class. + */ + private ElasticBackupPolicyListResult() { + } + + /** + * Get the value property: The ElasticBackupPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticBackupPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyListResult. + */ + public static ElasticBackupPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyListResult deserializedElasticBackupPolicyListResult + = new ElasticBackupPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticBackupPolicyInner.fromJson(reader1)); + deserializedElasticBackupPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java new file mode 100644 index 000000000000..a81d1b7f1925 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackupVault list operation. + */ +@Immutable +public final class ElasticBackupVaultListResult implements JsonSerializable { + /* + * The ElasticBackupVault items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupVaultListResult class. + */ + private ElasticBackupVaultListResult() { + } + + /** + * Get the value property: The ElasticBackupVault items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticBackupVaultListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupVaultListResult. + */ + public static ElasticBackupVaultListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultListResult deserializedElasticBackupVaultListResult = new ElasticBackupVaultListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticBackupVaultInner.fromJson(reader1)); + deserializedElasticBackupVaultListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupVaultListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java new file mode 100644 index 000000000000..9eccce4ead03 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticCapacityPool list operation. + */ +@Immutable +public final class ElasticCapacityPoolListResult implements JsonSerializable { + /* + * The ElasticCapacityPool items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticCapacityPoolListResult class. + */ + private ElasticCapacityPoolListResult() { + } + + /** + * Get the value property: The ElasticCapacityPool items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticCapacityPoolListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolListResult. + */ + public static ElasticCapacityPoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolListResult deserializedElasticCapacityPoolListResult + = new ElasticCapacityPoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticCapacityPoolInner.fromJson(reader1)); + deserializedElasticCapacityPoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticCapacityPoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java new file mode 100644 index 000000000000..c8fbd65c6204 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticSnapshot list operation. + */ +@Immutable +public final class ElasticSnapshotListResult implements JsonSerializable { + /* + * The ElasticSnapshot items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotListResult class. + */ + private ElasticSnapshotListResult() { + } + + /** + * Get the value property: The ElasticSnapshot items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model ElasticSnapshotListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotListResult. + */ + public static ElasticSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotListResult deserializedElasticSnapshotListResult = new ElasticSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticSnapshotInner.fromJson(reader1)); + deserializedElasticSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java new file mode 100644 index 000000000000..b67a4f4bcf8c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticSnapshotPolicy list operation. + */ +@Immutable +public final class ElasticSnapshotPolicyListResult implements JsonSerializable { + /* + * The ElasticSnapshotPolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotPolicyListResult class. + */ + private ElasticSnapshotPolicyListResult() { + } + + /** + * Get the value property: The ElasticSnapshotPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticSnapshotPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyListResult. + */ + public static ElasticSnapshotPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyListResult deserializedElasticSnapshotPolicyListResult + = new ElasticSnapshotPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticSnapshotPolicyInner.fromJson(reader1)); + deserializedElasticSnapshotPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java new file mode 100644 index 000000000000..e14266cfa95e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volumes associated with Elastic Snapshot Policy. + */ +@Immutable +public final class ElasticSnapshotPolicyVolumeList implements JsonSerializable { + /* + * The ElasticVolume items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotPolicyVolumeList class. + */ + private ElasticSnapshotPolicyVolumeList() { + } + + /** + * Get the value property: The ElasticVolume items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticSnapshotPolicyVolumeList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPolicyVolumeList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyVolumeList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyVolumeList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyVolumeList. + */ + public static ElasticSnapshotPolicyVolumeList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyVolumeList deserializedElasticSnapshotPolicyVolumeList + = new ElasticSnapshotPolicyVolumeList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticVolumeInner.fromJson(reader1)); + deserializedElasticSnapshotPolicyVolumeList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotPolicyVolumeList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyVolumeList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java new file mode 100644 index 000000000000..9ef3accbd8b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticVolume list operation. + */ +@Immutable +public final class ElasticVolumeListResult implements JsonSerializable { + /* + * The ElasticVolume items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticVolumeListResult class. + */ + private ElasticVolumeListResult() { + } + + /** + * Get the value property: The ElasticVolume items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticVolumeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumeListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeListResult. + */ + public static ElasticVolumeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeListResult deserializedElasticVolumeListResult = new ElasticVolumeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticVolumeInner.fromJson(reader1)); + deserializedElasticVolumeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticVolumeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeListResult; + }); + } +} 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 cfa6046a113f..2aedda8ed737 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 @@ -212,6 +212,29 @@ GetKeyVaultStatusResponse getChangeKeyVaultInformation(String resourceGroupName, */ void changeKeyVault(String resourceGroupName, String accountName, ChangeKeyVault body, Context context); + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 refreshLdapBindPassword(String resourceGroupName, String accountName); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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. + */ + void refreshLdapBindPassword(String resourceGroupName, String accountName, Context context); + /** * Get the NetApp account. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java new file mode 100644 index 000000000000..f791224f4e96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ActiveDirectoryConfigInner; +import java.util.Map; + +/** + * An immutable client-side representation of ActiveDirectoryConfig. + */ +public interface ActiveDirectoryConfig { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ActiveDirectoryConfigProperties properties(); + + /** + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ActiveDirectoryConfigInner object. + * + * @return the inner object. + */ + ActiveDirectoryConfigInner innerModel(); + + /** + * The entirety of the ActiveDirectoryConfig definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ActiveDirectoryConfig definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ActiveDirectoryConfig definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ActiveDirectoryConfig 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ActiveDirectoryConfig 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.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + ActiveDirectoryConfig create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ActiveDirectoryConfig create(Context context); + } + + /** + * The stage of the ActiveDirectoryConfig 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); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ActiveDirectoryConfigProperties properties); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the ActiveDirectoryConfig resource. + * + * @return the stage of resource update. + */ + ActiveDirectoryConfig.Update update(); + + /** + * The template for ActiveDirectoryConfig update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ActiveDirectoryConfig apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ActiveDirectoryConfig apply(Context context); + } + + /** + * The ActiveDirectoryConfig update stages. + */ + interface UpdateStages { + /** + * The stage of the ActiveDirectoryConfig 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); + } + + /** + * The stage of the ActiveDirectoryConfig update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ActiveDirectoryConfig update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ActiveDirectoryConfigUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ActiveDirectoryConfig refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ActiveDirectoryConfig refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java new file mode 100644 index 000000000000..5d427b5196c1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Active Directory Configuration properties. + */ +@Fluent +public final class ActiveDirectoryConfigProperties implements JsonSerializable { + /* + * A domain user account with permission to create machine accounts + */ + private String userName; + + /* + * An array of DNS server IP addresses(IPv4 only) for the Active Directory + */ + private List dns; + + /* + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount + * volumes + */ + private String smbServerName; + + /* + * The Organizational Unit (OU) within the Windows Active Directory + */ + private String organizationalUnit; + + /* + * The Active Directory site the service will limit Domain Controller discovery to + */ + private String site; + + /* + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without + * domain specifier + */ + private List backupOperators; + + /* + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without + * domain specifier + */ + private List administrators; + + /* + * Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB Continuously + * available shares for SQL). A list of unique usernames without domain specifier + */ + private List securityOperators; + + /* + * Status of the Active Directory + */ + private ActiveDirectoryStatus activeDirectoryStatus; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Name of the Active Directory domain + */ + private String domain; + + /* + * Access password from Azure KeyVault Secrets to connect Active Directory + */ + private SecretPassword secretPassword; + + /** + * Creates an instance of ActiveDirectoryConfigProperties class. + */ + public ActiveDirectoryConfigProperties() { + } + + /** + * Get the userName property: A domain user account with permission to create machine accounts. + * + * @return the userName value. + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName property: A domain user account with permission to create machine accounts. + * + * @param userName the userName value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @return the dns value. + */ + public List dns() { + return this.dns; + } + + /** + * Set the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @param dns the dns value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withDns(List dns) { + this.dns = dns; + return this; + } + + /** + * Get the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @return the smbServerName value. + */ + public String smbServerName() { + return this.smbServerName; + } + + /** + * Set the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @param smbServerName the smbServerName value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSmbServerName(String smbServerName) { + this.smbServerName = smbServerName; + return this; + } + + /** + * Get the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @return the organizationalUnit value. + */ + public String organizationalUnit() { + return this.organizationalUnit; + } + + /** + * Set the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @param organizationalUnit the organizationalUnit value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withOrganizationalUnit(String organizationalUnit) { + this.organizationalUnit = organizationalUnit; + return this; + } + + /** + * Get the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @param site the site value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @return the backupOperators value. + */ + public List backupOperators() { + return this.backupOperators; + } + + /** + * Set the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @param backupOperators the backupOperators value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withBackupOperators(List backupOperators) { + this.backupOperators = backupOperators; + return this; + } + + /** + * Get the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @return the administrators value. + */ + public List administrators() { + return this.administrators; + } + + /** + * Set the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @param administrators the administrators value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withAdministrators(List administrators) { + this.administrators = administrators; + return this; + } + + /** + * Get the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @return the securityOperators value. + */ + public List securityOperators() { + return this.securityOperators; + } + + /** + * Set the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @param securityOperators the securityOperators value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSecurityOperators(List securityOperators) { + this.securityOperators = securityOperators; + return this; + } + + /** + * Get the activeDirectoryStatus property: Status of the Active Directory. + * + * @return the activeDirectoryStatus value. + */ + public ActiveDirectoryStatus activeDirectoryStatus() { + return this.activeDirectoryStatus; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the domain property: Name of the Active Directory domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the Active Directory domain. + * + * @param domain the domain value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @return the secretPassword value. + */ + public SecretPassword secretPassword() { + return this.secretPassword; + } + + /** + * Set the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @param secretPassword the secretPassword value to set. + * @return the ActiveDirectoryConfigProperties object itself. + */ + public ActiveDirectoryConfigProperties withSecretPassword(SecretPassword secretPassword) { + this.secretPassword = secretPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (site() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property site in model ActiveDirectoryConfigProperties")); + } + if (domain() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property domain in model ActiveDirectoryConfigProperties")); + } + if (secretPassword() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretPassword in model ActiveDirectoryConfigProperties")); + } else { + secretPassword().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("site", this.site); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeJsonField("secretPassword", this.secretPassword); + jsonWriter.writeStringField("userName", this.userName); + jsonWriter.writeArrayField("dns", this.dns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("smbServerName", this.smbServerName); + jsonWriter.writeStringField("organizationalUnit", this.organizationalUnit); + jsonWriter.writeArrayField("backupOperators", this.backupOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("administrators", this.administrators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("securityOperators", this.securityOperators, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigProperties. + */ + public static ActiveDirectoryConfigProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigProperties deserializedActiveDirectoryConfigProperties + = new ActiveDirectoryConfigProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("site".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.site = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.domain = reader.getString(); + } else if ("secretPassword".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.secretPassword = SecretPassword.fromJson(reader); + } else if ("userName".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.userName = reader.getString(); + } else if ("dns".equals(fieldName)) { + List dns = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.dns = dns; + } else if ("smbServerName".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.smbServerName = reader.getString(); + } else if ("organizationalUnit".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.organizationalUnit = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.administrators = administrators; + } else if ("securityOperators".equals(fieldName)) { + List securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.securityOperators = securityOperators; + } else if ("activeDirectoryStatus".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.activeDirectoryStatus + = ActiveDirectoryStatus.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java new file mode 100644 index 000000000000..bbd3b5956700 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ActiveDirectoryConfig. + */ +@Fluent +public final class ActiveDirectoryConfigUpdate implements JsonSerializable { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ActiveDirectoryConfigUpdateProperties properties; + + /** + * Creates an instance of ActiveDirectoryConfigUpdate class. + */ + public ActiveDirectoryConfigUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * 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 ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ActiveDirectoryConfigUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withProperties(ActiveDirectoryConfigUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigUpdate if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigUpdate. + */ + public static ActiveDirectoryConfigUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigUpdate deserializedActiveDirectoryConfigUpdate = new ActiveDirectoryConfigUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdate.properties + = ActiveDirectoryConfigUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java new file mode 100644 index 000000000000..bcf5c74329a3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The updatable properties of the ActiveDirectoryConfig. + */ +@Fluent +public final class ActiveDirectoryConfigUpdateProperties + implements JsonSerializable { + /* + * A domain user account with permission to create machine accounts + */ + private String userName; + + /* + * An array of DNS server IP addresses(IPv4 only) for the Active Directory + */ + private List dns; + + /* + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount + * volumes + */ + private String smbServerName; + + /* + * The Organizational Unit (OU) within the Windows Active Directory + */ + private String organizationalUnit; + + /* + * The Active Directory site the service will limit Domain Controller discovery to + */ + private String site; + + /* + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without + * domain specifier + */ + private List backupOperators; + + /* + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without + * domain specifier + */ + private List administrators; + + /* + * Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB Continuously + * available shares for SQL). A list of unique usernames without domain specifier + */ + private List securityOperators; + + /* + * Name of the Active Directory domain + */ + private String domain; + + /* + * Access password from Azure KeyVault Secrets to connect Active Directory + */ + private SecretPassword secretPassword; + + /** + * Creates an instance of ActiveDirectoryConfigUpdateProperties class. + */ + public ActiveDirectoryConfigUpdateProperties() { + } + + /** + * Get the userName property: A domain user account with permission to create machine accounts. + * + * @return the userName value. + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName property: A domain user account with permission to create machine accounts. + * + * @param userName the userName value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @return the dns value. + */ + public List dns() { + return this.dns; + } + + /** + * Set the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @param dns the dns value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withDns(List dns) { + this.dns = dns; + return this; + } + + /** + * Get the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @return the smbServerName value. + */ + public String smbServerName() { + return this.smbServerName; + } + + /** + * Set the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @param smbServerName the smbServerName value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSmbServerName(String smbServerName) { + this.smbServerName = smbServerName; + return this; + } + + /** + * Get the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @return the organizationalUnit value. + */ + public String organizationalUnit() { + return this.organizationalUnit; + } + + /** + * Set the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @param organizationalUnit the organizationalUnit value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withOrganizationalUnit(String organizationalUnit) { + this.organizationalUnit = organizationalUnit; + return this; + } + + /** + * Get the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @param site the site value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @return the backupOperators value. + */ + public List backupOperators() { + return this.backupOperators; + } + + /** + * Set the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @param backupOperators the backupOperators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withBackupOperators(List backupOperators) { + this.backupOperators = backupOperators; + return this; + } + + /** + * Get the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @return the administrators value. + */ + public List administrators() { + return this.administrators; + } + + /** + * Set the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @param administrators the administrators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withAdministrators(List administrators) { + this.administrators = administrators; + return this; + } + + /** + * Get the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @return the securityOperators value. + */ + public List securityOperators() { + return this.securityOperators; + } + + /** + * Set the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @param securityOperators the securityOperators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSecurityOperators(List securityOperators) { + this.securityOperators = securityOperators; + return this; + } + + /** + * Get the domain property: Name of the Active Directory domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the Active Directory domain. + * + * @param domain the domain value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @return the secretPassword value. + */ + public SecretPassword secretPassword() { + return this.secretPassword; + } + + /** + * Set the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @param secretPassword the secretPassword value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSecretPassword(SecretPassword secretPassword) { + this.secretPassword = secretPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (secretPassword() != null) { + secretPassword().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userName", this.userName); + jsonWriter.writeArrayField("dns", this.dns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("smbServerName", this.smbServerName); + jsonWriter.writeStringField("organizationalUnit", this.organizationalUnit); + jsonWriter.writeStringField("site", this.site); + jsonWriter.writeArrayField("backupOperators", this.backupOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("administrators", this.administrators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("securityOperators", this.securityOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeJsonField("secretPassword", this.secretPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigUpdateProperties. + */ + public static ActiveDirectoryConfigUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigUpdateProperties deserializedActiveDirectoryConfigUpdateProperties + = new ActiveDirectoryConfigUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userName".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.userName = reader.getString(); + } else if ("dns".equals(fieldName)) { + List dns = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.dns = dns; + } else if ("smbServerName".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.smbServerName = reader.getString(); + } else if ("organizationalUnit".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.organizationalUnit = reader.getString(); + } else if ("site".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.site = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.administrators = administrators; + } else if ("securityOperators".equals(fieldName)) { + List securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.securityOperators = securityOperators; + } else if ("domain".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.domain = reader.getString(); + } else if ("secretPassword".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.secretPassword = SecretPassword.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java new file mode 100644 index 000000000000..512c71a48c3a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ActiveDirectoryConfigs. + */ +public interface ActiveDirectoryConfigs { + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 details of the specified active directory configuration. + */ + ActiveDirectoryConfig getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 deleteByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @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 activeDirectoryConfigName, Context context); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all active directory configurations within the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all active directory configurations within the subscription. + * + * @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 response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @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 details of the specified active directory configuration along with {@link Response}. + */ + ActiveDirectoryConfig getById(String id); + + /** + * Get the details of the specified active directory configuration. + * + * @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 details of the specified active directory configuration along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @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 the specified Active Directory configuration. + * + * @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 ActiveDirectoryConfig resource. + * + * @param name resource name. + * @return the first stage of the new ActiveDirectoryConfig definition. + */ + ActiveDirectoryConfig.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindAuthenticationLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindAuthenticationLevel.java new file mode 100644 index 000000000000..43b8081798bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindAuthenticationLevel.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The authentication level to use when binding to the LDAP server. + */ +public final class BindAuthenticationLevel extends ExpandableStringEnum { + /** + * Anonymous bind i.e. no credentials provided. + */ + public static final BindAuthenticationLevel ANONYMOUS = fromString("Anonymous"); + + /** + * Simple bind i.e. plain text credentials provided. + */ + public static final BindAuthenticationLevel SIMPLE = fromString("Simple"); + + /** + * Creates a new instance of BindAuthenticationLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BindAuthenticationLevel() { + } + + /** + * Creates or finds a BindAuthenticationLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding BindAuthenticationLevel. + */ + public static BindAuthenticationLevel fromString(String name) { + return fromString(name, BindAuthenticationLevel.class); + } + + /** + * Gets known BindAuthenticationLevel values. + * + * @return known BindAuthenticationLevel values. + */ + public static Collection values() { + return values(BindAuthenticationLevel.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfig.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfig.java new file mode 100644 index 000000000000..f94828f8ac00 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfig.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is stored. + */ +@Fluent +public final class BindPasswordAkvConfig implements JsonSerializable { + /* + * The Azure Key Vault URI where the Bind DN user password is stored. + */ + private String azureKeyVaultUri; + + /* + * The name of the secret in Azure Key Vault that contains the Bind DN user password. + */ + private String secretName; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of BindPasswordAkvConfig class. + */ + public BindPasswordAkvConfig() { + } + + /** + * Get the azureKeyVaultUri property: The Azure Key Vault URI where the Bind DN user password is stored. + * + * @return the azureKeyVaultUri value. + */ + public String azureKeyVaultUri() { + return this.azureKeyVaultUri; + } + + /** + * Set the azureKeyVaultUri property: The Azure Key Vault URI where the Bind DN user password is stored. + * + * @param azureKeyVaultUri the azureKeyVaultUri value to set. + * @return the BindPasswordAkvConfig object itself. + */ + public BindPasswordAkvConfig withAzureKeyVaultUri(String azureKeyVaultUri) { + this.azureKeyVaultUri = azureKeyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of the secret in Azure Key Vault that contains the Bind DN user password. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of the secret in Azure Key Vault that contains the Bind DN user password. + * + * @param secretName the secretName value to set. + * @return the BindPasswordAkvConfig object itself. + */ + public BindPasswordAkvConfig withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the BindPasswordAkvConfig object itself. + */ + public BindPasswordAkvConfig withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureKeyVaultUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property azureKeyVaultUri in model BindPasswordAkvConfig")); + } + if (secretName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretName in model BindPasswordAkvConfig")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BindPasswordAkvConfig.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureKeyVaultUri", this.azureKeyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BindPasswordAkvConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BindPasswordAkvConfig if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BindPasswordAkvConfig. + */ + public static BindPasswordAkvConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BindPasswordAkvConfig deserializedBindPasswordAkvConfig = new BindPasswordAkvConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureKeyVaultUri".equals(fieldName)) { + deserializedBindPasswordAkvConfig.azureKeyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedBindPasswordAkvConfig.secretName = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedBindPasswordAkvConfig.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBindPasswordAkvConfig; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfigPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfigPatch.java new file mode 100644 index 000000000000..a882b7ccbc64 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfigPatch.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is stored. + */ +@Fluent +public final class BindPasswordAkvConfigPatch implements JsonSerializable { + /* + * The Azure Key Vault URI where the Bind DN user password is stored. + */ + private String azureKeyVaultUri; + + /* + * The name of the secret in Azure Key Vault that contains the Bind DN user password. + */ + private String secretName; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of BindPasswordAkvConfigPatch class. + */ + public BindPasswordAkvConfigPatch() { + } + + /** + * Get the azureKeyVaultUri property: The Azure Key Vault URI where the Bind DN user password is stored. + * + * @return the azureKeyVaultUri value. + */ + public String azureKeyVaultUri() { + return this.azureKeyVaultUri; + } + + /** + * Set the azureKeyVaultUri property: The Azure Key Vault URI where the Bind DN user password is stored. + * + * @param azureKeyVaultUri the azureKeyVaultUri value to set. + * @return the BindPasswordAkvConfigPatch object itself. + */ + public BindPasswordAkvConfigPatch withAzureKeyVaultUri(String azureKeyVaultUri) { + this.azureKeyVaultUri = azureKeyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of the secret in Azure Key Vault that contains the Bind DN user password. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of the secret in Azure Key Vault that contains the Bind DN user password. + * + * @param secretName the secretName value to set. + * @return the BindPasswordAkvConfigPatch object itself. + */ + public BindPasswordAkvConfigPatch withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the BindPasswordAkvConfigPatch object itself. + */ + public BindPasswordAkvConfigPatch withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureKeyVaultUri", this.azureKeyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BindPasswordAkvConfigPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BindPasswordAkvConfigPatch if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BindPasswordAkvConfigPatch. + */ + public static BindPasswordAkvConfigPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BindPasswordAkvConfigPatch deserializedBindPasswordAkvConfigPatch = new BindPasswordAkvConfigPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureKeyVaultUri".equals(fieldName)) { + deserializedBindPasswordAkvConfigPatch.azureKeyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedBindPasswordAkvConfigPatch.secretName = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedBindPasswordAkvConfigPatch.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBindPasswordAkvConfigPatch; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java index cb345a4eb495..abe1b1ed9488 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java @@ -74,8 +74,8 @@ public interface CapacityPool { String poolId(); /** - * Gets the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Gets the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) + * or in 1TiB chunks (value must be multiple of 1099511627776). * * @return the size value. */ @@ -225,11 +225,11 @@ interface WithParentResource { */ interface WithSize { /** - * Specifies the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks - * (value must be multiple of 1099511627776).. + * Specifies the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB + * (549755813888 bytes) or in 1TiB chunks (value must be multiple of 1099511627776).. * - * @param size Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * @param size Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or in + * 1TiB chunks (value must be multiple of 1099511627776). * @return the next definition stage. */ WithServiceLevel withSize(long size); @@ -390,11 +390,11 @@ interface WithTags { */ interface WithSize { /** - * Specifies the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks - * (value must be multiple of 1099511627776).. + * Specifies the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB + * (549755813888 bytes) or in 1TiB chunks (value must be multiple of 1099511627776).. * - * @param size Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * @param size Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or in + * 1TiB chunks (value must be multiple of 1099511627776). * @return the next definition stage. */ Update withSize(Long size); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java index fee779b57f66..8dad9c50f96b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java @@ -131,8 +131,8 @@ private PoolPatchProperties innerProperties() { } /** - * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @return the size value. */ @@ -141,8 +141,8 @@ public Long size() { } /** - * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be - * multiple of 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are 512GiB (549755813888 bytes) or + * in 1TiB chunks (value must be multiple of 1099511627776). * * @param size the size value to set. * @return the CapacityPoolPatch object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CertificateAkvDetails.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CertificateAkvDetails.java index 5b72460c559e..32b16041a945 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CertificateAkvDetails.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CertificateAkvDetails.java @@ -26,6 +26,13 @@ public final class CertificateAkvDetails implements JsonSerializable { + /* + * Availability zone to move Zone Redundant elastic capacity pool to + */ + private String newZone; + + /** + * Creates an instance of ChangeZoneRequest class. + */ + public ChangeZoneRequest() { + } + + /** + * Get the newZone property: Availability zone to move Zone Redundant elastic capacity pool to. + * + * @return the newZone value. + */ + public String newZone() { + return this.newZone; + } + + /** + * Set the newZone property: Availability zone to move Zone Redundant elastic capacity pool to. + * + * @param newZone the newZone value to set. + * @return the ChangeZoneRequest object itself. + */ + public ChangeZoneRequest withNewZone(String newZone) { + this.newZone = newZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (newZone() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property newZone in model ChangeZoneRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ChangeZoneRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("newZone", this.newZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeZoneRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeZoneRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ChangeZoneRequest. + */ + public static ChangeZoneRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeZoneRequest deserializedChangeZoneRequest = new ChangeZoneRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("newZone".equals(fieldName)) { + deserializedChangeZoneRequest.newZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeZoneRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java new file mode 100644 index 000000000000..3b1409dad2b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Availability reason. + */ +public final class CheckElasticResourceAvailabilityReason + extends ExpandableStringEnum { + /** + * Value indicating the name provided does not match Azure NetApp Files naming requirements. + */ + public static final CheckElasticResourceAvailabilityReason INVALID = fromString("Invalid"); + + /** + * Value indicating the name is already in use and is therefore unavailable. + */ + public static final CheckElasticResourceAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates a new instance of CheckElasticResourceAvailabilityReason value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckElasticResourceAvailabilityReason() { + } + + /** + * Creates or finds a CheckElasticResourceAvailabilityReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckElasticResourceAvailabilityReason. + */ + public static CheckElasticResourceAvailabilityReason fromString(String name) { + return fromString(name, CheckElasticResourceAvailabilityReason.class); + } + + /** + * Gets known CheckElasticResourceAvailabilityReason values. + * + * @return known CheckElasticResourceAvailabilityReason values. + */ + public static Collection values() { + return values(CheckElasticResourceAvailabilityReason.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java new file mode 100644 index 000000000000..5af7e272e2e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; + +/** + * An immutable client-side representation of CheckElasticResourceAvailabilityResponse. + */ +public interface CheckElasticResourceAvailabilityResponse { + /** + * Gets the isAvailable property: True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * + * @return the isAvailable value. + */ + CheckElasticResourceAvailabilityStatus isAvailable(); + + /** + * Gets the reason property: Invalid indicates the name provided does not match Azure NetApp Files naming + * requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * + * @return the reason value. + */ + CheckElasticResourceAvailabilityReason reason(); + + /** + * Gets the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner + * object. + * + * @return the inner object. + */ + CheckElasticResourceAvailabilityResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java new file mode 100644 index 000000000000..166f957b4018 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Availability status. + */ +public final class CheckElasticResourceAvailabilityStatus + extends ExpandableStringEnum { + /** + * Value indicating the name is valid and available. + */ + public static final CheckElasticResourceAvailabilityStatus TRUE = fromString("True"); + + /** + * Value indicating the the name is invalid, unavailable, or both. + */ + public static final CheckElasticResourceAvailabilityStatus FALSE = fromString("False"); + + /** + * Creates a new instance of CheckElasticResourceAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckElasticResourceAvailabilityStatus() { + } + + /** + * Creates or finds a CheckElasticResourceAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckElasticResourceAvailabilityStatus. + */ + public static CheckElasticResourceAvailabilityStatus fromString(String name) { + return fromString(name, CheckElasticResourceAvailabilityStatus.class); + } + + /** + * Gets known CheckElasticResourceAvailabilityStatus values. + * + * @return known CheckElasticResourceAvailabilityStatus values. + */ + public static Collection values() { + return values(CheckElasticResourceAvailabilityStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java new file mode 100644 index 000000000000..b12b14137a72 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * File path availability request content - availability is based on the elastic volume filePath within the given + * elastic capacityPool. + */ +@Fluent +public final class CheckElasticVolumeFilePathAvailabilityRequest + implements JsonSerializable { + /* + * A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic + * capacity pool. + */ + private String filePath; + + /** + * Creates an instance of CheckElasticVolumeFilePathAvailabilityRequest class. + */ + public CheckElasticVolumeFilePathAvailabilityRequest() { + } + + /** + * Get the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @param filePath the filePath value to set. + * @return the CheckElasticVolumeFilePathAvailabilityRequest object itself. + */ + public CheckElasticVolumeFilePathAvailabilityRequest withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property filePath in model CheckElasticVolumeFilePathAvailabilityRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CheckElasticVolumeFilePathAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filePath", this.filePath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckElasticVolumeFilePathAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckElasticVolumeFilePathAvailabilityRequest if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CheckElasticVolumeFilePathAvailabilityRequest. + */ + public static CheckElasticVolumeFilePathAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckElasticVolumeFilePathAvailabilityRequest deserializedCheckElasticVolumeFilePathAvailabilityRequest + = new CheckElasticVolumeFilePathAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePath".equals(fieldName)) { + deserializedCheckElasticVolumeFilePathAvailabilityRequest.filePath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckElasticVolumeFilePathAvailabilityRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsAkvDetails.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsAkvDetails.java index 98b4c8cedd84..4366a60c1e51 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsAkvDetails.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsAkvDetails.java @@ -31,6 +31,13 @@ public final class CredentialsAkvDetails implements JsonSerializable { + /** + * Take a snapshot each Sunday. + */ + public static final DayOfWeek SUNDAY = fromString("Sunday"); + + /** + * Take a snapshot each Monday. + */ + public static final DayOfWeek MONDAY = fromString("Monday"); + + /** + * Take a snapshot each Tuesday. + */ + public static final DayOfWeek TUESDAY = fromString("Tuesday"); + + /** + * Take a snapshot each Wednesday. + */ + public static final DayOfWeek WEDNESDAY = fromString("Wednesday"); + + /** + * Take a snapshot each Thursday. + */ + public static final DayOfWeek THURSDAY = fromString("Thursday"); + + /** + * Take a snapshot each Friday. + */ + public static final DayOfWeek FRIDAY = fromString("Friday"); + + /** + * Take a snapshot each Saturday. + */ + public static final DayOfWeek SATURDAY = fromString("Saturday"); + + /** + * Creates a new instance of DayOfWeek value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DayOfWeek() { + } + + /** + * Creates or finds a DayOfWeek from its string representation. + * + * @param name a name to look for. + * @return the corresponding DayOfWeek. + */ + public static DayOfWeek fromString(String name) { + return fromString(name, DayOfWeek.class); + } + + /** + * Gets known DayOfWeek values. + * + * @return known DayOfWeek values. + */ + public static Collection values() { + return values(DayOfWeek.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java new file mode 100644 index 000000000000..74a275dbed06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticAccountInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticAccount. + */ +public interface ElasticAccount { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticAccountProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticAccountInner object. + * + * @return the inner object. + */ + ElasticAccountInner innerModel(); + + /** + * The entirety of the ElasticAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ElasticAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticAccount definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticAccount 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. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ElasticAccount definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ElasticAccount 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.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticAccount create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticAccount create(Context context); + } + + /** + * The stage of the ElasticAccount 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); + } + + /** + * The stage of the ElasticAccount definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticAccountProperties properties); + } + + /** + * The stage of the ElasticAccount definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the ElasticAccount resource. + * + * @return the stage of resource update. + */ + ElasticAccount.Update update(); + + /** + * The template for ElasticAccount update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticAccount apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticAccount apply(Context context); + } + + /** + * The ElasticAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticAccount 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); + } + + /** + * The stage of the ElasticAccount update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ElasticAccount update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticAccountUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticAccount refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticAccount refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java new file mode 100644 index 000000000000..ba88af2cec9b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NetApp elastic account properties. + */ +@Fluent +public final class ElasticAccountProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Encryption settings + */ + private ElasticEncryption encryption; + + /** + * Creates an instance of ElasticAccountProperties class. + */ + public ElasticAccountProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticAccountProperties object itself. + */ + public ElasticAccountProperties withEncryption(ElasticEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountProperties. + */ + public static ElasticAccountProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountProperties deserializedElasticAccountProperties = new ElasticAccountProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticAccountProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedElasticAccountProperties.encryption = ElasticEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java new file mode 100644 index 000000000000..73c6fe0da659 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticAccount. + */ +@Fluent +public final class ElasticAccountUpdate implements JsonSerializable { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticAccountUpdateProperties properties; + + /** + * Creates an instance of ElasticAccountUpdate class. + */ + public ElasticAccountUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * 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 ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticAccountUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withProperties(ElasticAccountUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountUpdate. + */ + public static ElasticAccountUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountUpdate deserializedElasticAccountUpdate = new ElasticAccountUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedElasticAccountUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticAccountUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticAccountUpdate.properties = ElasticAccountUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java new file mode 100644 index 000000000000..10032af75144 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticAccount. + */ +@Fluent +public final class ElasticAccountUpdateProperties implements JsonSerializable { + /* + * Encryption settings + */ + private ElasticEncryption encryption; + + /** + * Creates an instance of ElasticAccountUpdateProperties class. + */ + public ElasticAccountUpdateProperties() { + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticAccountUpdateProperties object itself. + */ + public ElasticAccountUpdateProperties withEncryption(ElasticEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountUpdateProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountUpdateProperties. + */ + public static ElasticAccountUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountUpdateProperties deserializedElasticAccountUpdateProperties + = new ElasticAccountUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("encryption".equals(fieldName)) { + deserializedElasticAccountUpdateProperties.encryption = ElasticEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java new file mode 100644 index 000000000000..d0a352417a67 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticAccounts. + */ +public interface ElasticAccounts { + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 NetApp Elastic Account. + */ + ElasticAccount getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 deleteByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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, Context context); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @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 response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the NetApp Elastic Account. + * + * @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 NetApp Elastic Account along with {@link Response}. + */ + ElasticAccount getById(String id); + + /** + * Get the NetApp Elastic Account. + * + * @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 NetApp Elastic Account along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @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 the specified NetApp elastic account. + * + * @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 ElasticAccount resource. + * + * @param name resource name. + * @return the first stage of the new ElasticAccount definition. + */ + ElasticAccount.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java new file mode 100644 index 000000000000..5d92beb9983b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupInner; + +/** + * An immutable client-side representation of ElasticBackup. + */ +public interface ElasticBackup { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticBackupInner object. + * + * @return the inner object. + */ + ElasticBackupInner innerModel(); + + /** + * The entirety of the ElasticBackup definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackup definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ElasticBackup 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 ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @return the next definition stage. + */ + WithCreate withExistingElasticBackupVault(String resourceGroupName, String accountName, + String backupVaultName); + } + + /** + * The stage of the ElasticBackup 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackup create(Context context); + } + + /** + * The stage of the ElasticBackup definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupProperties properties); + } + } + + /** + * Begins update for the ElasticBackup resource. + * + * @return the stage of resource update. + */ + ElasticBackup.Update update(); + + /** + * The template for ElasticBackup update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackup apply(Context context); + } + + /** + * The ElasticBackup update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackup update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticBackupProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackup refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java new file mode 100644 index 000000000000..75cece14fea6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticBackupPolicies. + */ +public interface ElasticBackupPolicies { + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupPolicyName, + Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 Elastic Backup Policy. + */ + ElasticBackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @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 backupPolicyName, Context context); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get the Elastic Backup Policy. + * + * @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 Elastic Backup Policy along with {@link Response}. + */ + ElasticBackupPolicy getById(String id); + + /** + * Get the Elastic Backup Policy. + * + * @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 Elastic Backup Policy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @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 the specified Elastic Policy. + * + * @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 ElasticBackupPolicy resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackupPolicy definition. + */ + ElasticBackupPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java new file mode 100644 index 000000000000..c05d1474cc2a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupPolicyInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticBackupPolicy. + */ +public interface ElasticBackupPolicy { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupPolicyProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticBackupPolicyInner object. + * + * @return the inner object. + */ + ElasticBackupPolicyInner innerModel(); + + /** + * The entirety of the ElasticBackupPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackupPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackupPolicy definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticBackupPolicy 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 ElasticBackupPolicy 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 ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticBackupPolicy 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackupPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackupPolicy create(Context context); + } + + /** + * The stage of the ElasticBackupPolicy 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); + } + + /** + * The stage of the ElasticBackupPolicy definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupPolicyProperties properties); + } + } + + /** + * Begins update for the ElasticBackupPolicy resource. + * + * @return the stage of resource update. + */ + ElasticBackupPolicy.Update update(); + + /** + * The template for ElasticBackupPolicy update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackupPolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackupPolicy apply(Context context); + } + + /** + * The ElasticBackupPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackupPolicy 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); + } + + /** + * The stage of the ElasticBackupPolicy update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticBackupPolicyUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackupPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackupPolicy refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java new file mode 100644 index 000000000000..a829e3c74291 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Backup Policy properties. + */ +@Fluent +public final class ElasticBackupPolicyProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Daily backups count to keep + */ + private Integer dailyBackupsToKeep; + + /* + * Weekly backups count to keep + */ + private Integer weeklyBackupsToKeep; + + /* + * Monthly backups count to keep + */ + private Integer monthlyBackupsToKeep; + + /* + * The number of volumes currently using this Backup Policy. + */ + private Integer assignedVolumesCount; + + /* + * The property to identify whether Backup Policy is enabled or not + */ + private ElasticBackupPolicyState policyState; + + /** + * Creates an instance of ElasticBackupPolicyProperties class. + */ + public ElasticBackupPolicyProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the dailyBackupsToKeep property: Daily backups count to keep. + * + * @return the dailyBackupsToKeep value. + */ + public Integer dailyBackupsToKeep() { + return this.dailyBackupsToKeep; + } + + /** + * Set the dailyBackupsToKeep property: Daily backups count to keep. + * + * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) { + this.dailyBackupsToKeep = dailyBackupsToKeep; + return this; + } + + /** + * Get the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @return the weeklyBackupsToKeep value. + */ + public Integer weeklyBackupsToKeep() { + return this.weeklyBackupsToKeep; + } + + /** + * Set the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { + this.weeklyBackupsToKeep = weeklyBackupsToKeep; + return this; + } + + /** + * Get the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @return the monthlyBackupsToKeep value. + */ + public Integer monthlyBackupsToKeep() { + return this.monthlyBackupsToKeep; + } + + /** + * Set the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { + this.monthlyBackupsToKeep = monthlyBackupsToKeep; + return this; + } + + /** + * Get the assignedVolumesCount property: The number of volumes currently using this Backup Policy. + * + * @return the assignedVolumesCount value. + */ + public Integer assignedVolumesCount() { + return this.assignedVolumesCount; + } + + /** + * Get the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @return the policyState value. + */ + public ElasticBackupPolicyState policyState() { + return this.policyState; + } + + /** + * Set the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @param policyState the policyState value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withPolicyState(ElasticBackupPolicyState policyState) { + this.policyState = policyState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("dailyBackupsToKeep", this.dailyBackupsToKeep); + jsonWriter.writeNumberField("weeklyBackupsToKeep", this.weeklyBackupsToKeep); + jsonWriter.writeNumberField("monthlyBackupsToKeep", this.monthlyBackupsToKeep); + jsonWriter.writeStringField("policyState", this.policyState == null ? null : this.policyState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyProperties. + */ + public static ElasticBackupPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyProperties deserializedElasticBackupPolicyProperties + = new ElasticBackupPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("dailyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.dailyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("weeklyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.weeklyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("monthlyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.monthlyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("assignedVolumesCount".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.assignedVolumesCount + = reader.getNullable(JsonReader::getInt); + } else if ("policyState".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.policyState + = ElasticBackupPolicyState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java new file mode 100644 index 000000000000..6b507c88adf5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Elastic Backup Policy state. + */ +public final class ElasticBackupPolicyState extends ExpandableStringEnum { + /** + * Value indicating the policy is enabled. + */ + public static final ElasticBackupPolicyState ENABLED = fromString("Enabled"); + + /** + * Value indicating the policy is disabled. + */ + public static final ElasticBackupPolicyState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticBackupPolicyState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticBackupPolicyState() { + } + + /** + * Creates or finds a ElasticBackupPolicyState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticBackupPolicyState. + */ + public static ElasticBackupPolicyState fromString(String name) { + return fromString(name, ElasticBackupPolicyState.class); + } + + /** + * Gets known ElasticBackupPolicyState values. + * + * @return known ElasticBackupPolicyState values. + */ + public static Collection values() { + return values(ElasticBackupPolicyState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java new file mode 100644 index 000000000000..97c446acbc60 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticBackupPolicy. + */ +@Fluent +public final class ElasticBackupPolicyUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupPolicyUpdateProperties properties; + + /** + * Creates an instance of ElasticBackupPolicyUpdate class. + */ + public ElasticBackupPolicyUpdate() { + } + + /** + * 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 ElasticBackupPolicyUpdate object itself. + */ + public ElasticBackupPolicyUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupPolicyUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupPolicyUpdate object itself. + */ + public ElasticBackupPolicyUpdate withProperties(ElasticBackupPolicyUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyUpdate. + */ + public static ElasticBackupPolicyUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyUpdate deserializedElasticBackupPolicyUpdate = new ElasticBackupPolicyUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupPolicyUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupPolicyUpdate.properties + = ElasticBackupPolicyUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java new file mode 100644 index 000000000000..feb77d0173c4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticBackupPolicy. + */ +@Fluent +public final class ElasticBackupPolicyUpdateProperties + implements JsonSerializable { + /* + * Daily backups count to keep + */ + private Integer dailyBackupsToKeep; + + /* + * Weekly backups count to keep + */ + private Integer weeklyBackupsToKeep; + + /* + * Monthly backups count to keep + */ + private Integer monthlyBackupsToKeep; + + /* + * The property to identify whether Backup Policy is enabled or not + */ + private ElasticBackupPolicyState policyState; + + /** + * Creates an instance of ElasticBackupPolicyUpdateProperties class. + */ + public ElasticBackupPolicyUpdateProperties() { + } + + /** + * Get the dailyBackupsToKeep property: Daily backups count to keep. + * + * @return the dailyBackupsToKeep value. + */ + public Integer dailyBackupsToKeep() { + return this.dailyBackupsToKeep; + } + + /** + * Set the dailyBackupsToKeep property: Daily backups count to keep. + * + * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) { + this.dailyBackupsToKeep = dailyBackupsToKeep; + return this; + } + + /** + * Get the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @return the weeklyBackupsToKeep value. + */ + public Integer weeklyBackupsToKeep() { + return this.weeklyBackupsToKeep; + } + + /** + * Set the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { + this.weeklyBackupsToKeep = weeklyBackupsToKeep; + return this; + } + + /** + * Get the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @return the monthlyBackupsToKeep value. + */ + public Integer monthlyBackupsToKeep() { + return this.monthlyBackupsToKeep; + } + + /** + * Set the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { + this.monthlyBackupsToKeep = monthlyBackupsToKeep; + return this; + } + + /** + * Get the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @return the policyState value. + */ + public ElasticBackupPolicyState policyState() { + return this.policyState; + } + + /** + * Set the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @param policyState the policyState value to set. + * @return the ElasticBackupPolicyUpdateProperties object itself. + */ + public ElasticBackupPolicyUpdateProperties withPolicyState(ElasticBackupPolicyState policyState) { + this.policyState = policyState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("dailyBackupsToKeep", this.dailyBackupsToKeep); + jsonWriter.writeNumberField("weeklyBackupsToKeep", this.weeklyBackupsToKeep); + jsonWriter.writeNumberField("monthlyBackupsToKeep", this.monthlyBackupsToKeep); + jsonWriter.writeStringField("policyState", this.policyState == null ? null : this.policyState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyUpdateProperties. + */ + public static ElasticBackupPolicyUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyUpdateProperties deserializedElasticBackupPolicyUpdateProperties + = new ElasticBackupPolicyUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dailyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.dailyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("weeklyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.weeklyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("monthlyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.monthlyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("policyState".equals(fieldName)) { + deserializedElasticBackupPolicyUpdateProperties.policyState + = ElasticBackupPolicyState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java new file mode 100644 index 000000000000..f494ee77a458 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Elastic Backup properties. + */ +@Fluent +public final class ElasticBackupProperties implements JsonSerializable { + /* + * The creation date of the backup + */ + private OffsetDateTime creationDate; + + /* + * The snapshot creation date of the backup + */ + private OffsetDateTime snapshotCreationDate; + + /* + * The completion date of the backup + */ + private OffsetDateTime completionDate; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Size of backup in bytes + */ + private Long size; + + /* + * Label for backup + */ + private String label; + + /* + * Type of backup Manual or Scheduled + */ + private ElasticBackupType backupType; + + /* + * Failure reason + */ + private String failureReason; + + /* + * ResourceId used to identify the Elastic Volume + */ + private String elasticVolumeResourceId; + + /* + * Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and + * UseExistingSnapshot/CreateNewSnapshot for manual backups + */ + private SnapshotUsage snapshotUsage; + + /* + * ResourceId used to identify the elastic snapshot resource. This is required when an existing snapshot needs to be + * used for creating a manual backup + */ + private String elasticSnapshotResourceId; + + /* + * ResourceId used to identify the elastic backup policy + */ + private String elasticBackupPolicyResourceId; + + /* + * Specifies if the backup is for a large volume. + */ + private VolumeSize volumeSize; + + /** + * Creates an instance of ElasticBackupProperties class. + */ + public ElasticBackupProperties() { + } + + /** + * Get the creationDate property: The creation date of the backup. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the snapshotCreationDate property: The snapshot creation date of the backup. + * + * @return the snapshotCreationDate value. + */ + public OffsetDateTime snapshotCreationDate() { + return this.snapshotCreationDate; + } + + /** + * Get the completionDate property: The completion date of the backup. + * + * @return the completionDate value. + */ + public OffsetDateTime completionDate() { + return this.completionDate; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState 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 ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the backupType property: Type of backup Manual or Scheduled. + * + * @return the backupType value. + */ + public ElasticBackupType backupType() { + return this.backupType; + } + + /** + * Get the failureReason property: Failure reason. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Get the elasticVolumeResourceId property: ResourceId used to identify the Elastic Volume. + * + * @return the elasticVolumeResourceId value. + */ + public String elasticVolumeResourceId() { + return this.elasticVolumeResourceId; + } + + /** + * Set the elasticVolumeResourceId property: ResourceId used to identify the Elastic Volume. + * + * @param elasticVolumeResourceId the elasticVolumeResourceId value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withElasticVolumeResourceId(String elasticVolumeResourceId) { + this.elasticVolumeResourceId = elasticVolumeResourceId; + return this; + } + + /** + * Get the snapshotUsage property: Manual backup using an already existing snapshot. This will always be + * CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + * + * @return the snapshotUsage value. + */ + public SnapshotUsage snapshotUsage() { + return this.snapshotUsage; + } + + /** + * Set the snapshotUsage property: Manual backup using an already existing snapshot. This will always be + * CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + * + * @param snapshotUsage the snapshotUsage value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withSnapshotUsage(SnapshotUsage snapshotUsage) { + this.snapshotUsage = snapshotUsage; + return this; + } + + /** + * Get the elasticSnapshotResourceId property: ResourceId used to identify the elastic snapshot resource. This is + * required when an existing snapshot needs to be used for creating a manual backup. + * + * @return the elasticSnapshotResourceId value. + */ + public String elasticSnapshotResourceId() { + return this.elasticSnapshotResourceId; + } + + /** + * Set the elasticSnapshotResourceId property: ResourceId used to identify the elastic snapshot resource. This is + * required when an existing snapshot needs to be used for creating a manual backup. + * + * @param elasticSnapshotResourceId the elasticSnapshotResourceId value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withElasticSnapshotResourceId(String elasticSnapshotResourceId) { + this.elasticSnapshotResourceId = elasticSnapshotResourceId; + return this; + } + + /** + * Get the elasticBackupPolicyResourceId property: ResourceId used to identify the elastic backup policy. + * + * @return the elasticBackupPolicyResourceId value. + */ + public String elasticBackupPolicyResourceId() { + return this.elasticBackupPolicyResourceId; + } + + /** + * Get the volumeSize property: Specifies if the backup is for a large volume. + * + * @return the volumeSize value. + */ + public VolumeSize volumeSize() { + return this.volumeSize; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (elasticVolumeResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property elasticVolumeResourceId in model ElasticBackupProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticVolumeResourceId", this.elasticVolumeResourceId); + jsonWriter.writeStringField("label", this.label); + jsonWriter.writeStringField("snapshotUsage", this.snapshotUsage == null ? null : this.snapshotUsage.toString()); + jsonWriter.writeStringField("elasticSnapshotResourceId", this.elasticSnapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupProperties. + */ + public static ElasticBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupProperties deserializedElasticBackupProperties = new ElasticBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticVolumeResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticVolumeResourceId = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedElasticBackupProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("snapshotCreationDate".equals(fieldName)) { + deserializedElasticBackupProperties.snapshotCreationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("completionDate".equals(fieldName)) { + deserializedElasticBackupProperties.completionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("size".equals(fieldName)) { + deserializedElasticBackupProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("label".equals(fieldName)) { + deserializedElasticBackupProperties.label = reader.getString(); + } else if ("backupType".equals(fieldName)) { + deserializedElasticBackupProperties.backupType = ElasticBackupType.fromString(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedElasticBackupProperties.failureReason = reader.getString(); + } else if ("snapshotUsage".equals(fieldName)) { + deserializedElasticBackupProperties.snapshotUsage = SnapshotUsage.fromString(reader.getString()); + } else if ("elasticSnapshotResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticSnapshotResourceId = reader.getString(); + } else if ("elasticBackupPolicyResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticBackupPolicyResourceId = reader.getString(); + } else if ("volumeSize".equals(fieldName)) { + deserializedElasticBackupProperties.volumeSize = VolumeSize.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java new file mode 100644 index 000000000000..76dece2d90fe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of backup. + */ +public final class ElasticBackupType extends ExpandableStringEnum { + /** + * Manual backup type. + */ + public static final ElasticBackupType MANUAL = fromString("Manual"); + + /** + * Scheduled backup type. + */ + public static final ElasticBackupType SCHEDULED = fromString("Scheduled"); + + /** + * Creates a new instance of ElasticBackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticBackupType() { + } + + /** + * Creates or finds a ElasticBackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticBackupType. + */ + public static ElasticBackupType fromString(String name) { + return fromString(name, ElasticBackupType.class); + } + + /** + * Gets known ElasticBackupType values. + * + * @return known ElasticBackupType values. + */ + public static Collection values() { + return values(ElasticBackupType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java new file mode 100644 index 000000000000..7eb3253c88b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticBackupVaultInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticBackupVault. + */ +public interface ElasticBackupVault { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupVaultProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticBackupVaultInner object. + * + * @return the inner object. + */ + ElasticBackupVaultInner innerModel(); + + /** + * The entirety of the ElasticBackupVault definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackupVault definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackupVault definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticBackupVault 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 ElasticBackupVault 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 ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticBackupVault 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackupVault create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackupVault create(Context context); + } + + /** + * The stage of the ElasticBackupVault 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); + } + + /** + * The stage of the ElasticBackupVault definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupVaultProperties properties); + } + } + + /** + * Begins update for the ElasticBackupVault resource. + * + * @return the stage of resource update. + */ + ElasticBackupVault.Update update(); + + /** + * The template for ElasticBackupVault update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackupVault apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackupVault apply(Context context); + } + + /** + * The ElasticBackupVault update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackupVault 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. + */ + ElasticBackupVault refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackupVault refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java new file mode 100644 index 000000000000..8e5406661ee9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Backup Vault properties. + */ +@Immutable +public final class ElasticBackupVaultProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticBackupVaultProperties class. + */ + public ElasticBackupVaultProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupVaultProperties. + */ + public static ElasticBackupVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultProperties deserializedElasticBackupVaultProperties = new ElasticBackupVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupVaultProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java new file mode 100644 index 000000000000..2b73e7208cf0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticBackupVault. + */ +@Fluent +public final class ElasticBackupVaultUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of ElasticBackupVaultUpdate class. + */ + public ElasticBackupVaultUpdate() { + } + + /** + * 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 ElasticBackupVaultUpdate object itself. + */ + public ElasticBackupVaultUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupVaultUpdate. + */ + public static ElasticBackupVaultUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultUpdate deserializedElasticBackupVaultUpdate = new ElasticBackupVaultUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupVaultUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java new file mode 100644 index 000000000000..9f6b3c422549 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticBackupVaults. + */ +public interface ElasticBackupVaults { + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic Backup Vault along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 Elastic Backup Vault. + */ + ElasticBackupVault get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get the Elastic 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 Elastic Backup Vault along with {@link Response}. + */ + ElasticBackupVault getById(String id); + + /** + * Get the Elastic 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 Elastic Backup Vault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic 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 the specified Elastic 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 ElasticBackupVault resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackupVault definition. + */ + ElasticBackupVault.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java new file mode 100644 index 000000000000..e158b9e65f00 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticBackups. + */ +public interface ElasticBackups { + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 Elastic Backup under Elastic Backup Vault. + */ + ElasticBackup get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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 a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @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); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @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 response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Get the specified Elastic Backup under Elastic 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 Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + ElasticBackup getById(String id); + + /** + * Get the specified Elastic Backup under Elastic 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 Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticBackup. + * + * @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 a ElasticBackup. + * + * @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 ElasticBackup resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackup definition. + */ + ElasticBackup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java new file mode 100644 index 000000000000..fc6b3baa9025 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.Response; +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.ElasticCapacityPoolInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticCapacityPool. + */ +public interface ElasticCapacityPool { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticCapacityPoolProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticCapacityPoolInner object. + * + * @return the inner object. + */ + ElasticCapacityPoolInner innerModel(); + + /** + * The entirety of the ElasticCapacityPool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticCapacityPool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticCapacityPool definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticCapacityPool 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 ElasticCapacityPool 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 ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticCapacityPool 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.WithProperties, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticCapacityPool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticCapacityPool create(Context context); + } + + /** + * The stage of the ElasticCapacityPool 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); + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticCapacityPoolProperties properties); + } + + /** + * The stage of the ElasticCapacityPool definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } + } + + /** + * Begins update for the ElasticCapacityPool resource. + * + * @return the stage of resource update. + */ + ElasticCapacityPool.Update update(); + + /** + * The template for ElasticCapacityPool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticCapacityPool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticCapacityPool apply(Context context); + } + + /** + * The ElasticCapacityPool update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticCapacityPool 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); + } + + /** + * The stage of the ElasticCapacityPool update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticCapacityPoolUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticCapacityPool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticCapacityPool refresh(Context context); + + /** + * Moves pool to another zone. + * + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + ElasticCapacityPool changeZone(ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + ElasticCapacityPool changeZone(ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param body The content of the action request. + * @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 availability of a resource along with {@link Response}. + */ + Response checkVolumeFilePathAvailabilityWithResponse( + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param body The content of the action request. + * @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 availability of a resource. + */ + CheckElasticResourceAvailabilityResponse + checkVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityRequest body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java new file mode 100644 index 000000000000..4f03b65a3831 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic capacity pool properties. + */ +@Fluent +public final class ElasticCapacityPoolProperties implements JsonSerializable { + /* + * Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in the range 1TiB to + * 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of 1TiB till 16TiB and in + * multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + */ + private long size; + + /* + * The service level of the elastic capacity pool + */ + private ElasticServiceLevel serviceLevel; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Encryption settings + */ + private ElasticEncryptionConfiguration encryption; + + /* + * Total throughput of the pool in MiB/s + */ + private Double totalThroughputMibps; + + /* + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/elasticVolumes, this is + * used by all the volumes within the pool + */ + private String subnetResourceId; + + /* + * Indicates the current zone of the pool. This can be changed for zoneRedundant service level pool with the + * changeZone action + */ + private String currentZone; + + /* + * Current availability status of the resource. + */ + private ElasticResourceAvailabilityStatus availabilityStatus; + + /* + * The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool + */ + private String activeDirectoryConfigResourceId; + + /** + * Creates an instance of ElasticCapacityPoolProperties class. + */ + public ElasticCapacityPoolProperties() { + } + + /** + * Get the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @param size the size value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the serviceLevel property: The service level of the elastic capacity pool. + * + * @return the serviceLevel value. + */ + public ElasticServiceLevel serviceLevel() { + return this.serviceLevel; + } + + /** + * Set the serviceLevel property: The service level of the elastic capacity pool. + * + * @param serviceLevel the serviceLevel value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withServiceLevel(ElasticServiceLevel serviceLevel) { + this.serviceLevel = serviceLevel; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryptionConfiguration encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withEncryption(ElasticEncryptionConfiguration encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the totalThroughputMibps property: Total throughput of the pool in MiB/s. + * + * @return the totalThroughputMibps value. + */ + public Double totalThroughputMibps() { + return this.totalThroughputMibps; + } + + /** + * Get the subnetResourceId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Get the currentZone property: Indicates the current zone of the pool. This can be changed for zoneRedundant + * service level pool with the changeZone action. + * + * @return the currentZone value. + */ + public String currentZone() { + return this.currentZone; + } + + /** + * Get the availabilityStatus property: Current availability status of the resource. + * + * @return the availabilityStatus value. + */ + public ElasticResourceAvailabilityStatus availabilityStatus() { + return this.availabilityStatus; + } + + /** + * Get the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @return the activeDirectoryConfigResourceId value. + */ + public String activeDirectoryConfigResourceId() { + return this.activeDirectoryConfigResourceId; + } + + /** + * Set the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @param activeDirectoryConfigResourceId the activeDirectoryConfigResourceId value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withActiveDirectoryConfigResourceId(String activeDirectoryConfigResourceId) { + this.activeDirectoryConfigResourceId = activeDirectoryConfigResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceLevel() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceLevel in model ElasticCapacityPoolProperties")); + } + if (encryption() != null) { + encryption().validate(); + } + if (subnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetResourceId in model ElasticCapacityPoolProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeStringField("serviceLevel", this.serviceLevel == null ? null : this.serviceLevel.toString()); + jsonWriter.writeStringField("subnetResourceId", this.subnetResourceId); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("activeDirectoryConfigResourceId", this.activeDirectoryConfigResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolProperties. + */ + public static ElasticCapacityPoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolProperties deserializedElasticCapacityPoolProperties + = new ElasticCapacityPoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.size = reader.getLong(); + } else if ("serviceLevel".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.serviceLevel + = ElasticServiceLevel.fromString(reader.getString()); + } else if ("subnetResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.subnetResourceId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.encryption + = ElasticEncryptionConfiguration.fromJson(reader); + } else if ("totalThroughputMibps".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.totalThroughputMibps + = reader.getNullable(JsonReader::getDouble); + } else if ("currentZone".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.currentZone = reader.getString(); + } else if ("availabilityStatus".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.availabilityStatus + = ElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("activeDirectoryConfigResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.activeDirectoryConfigResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java new file mode 100644 index 000000000000..c0edc78dae90 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticCapacityPool. + */ +@Fluent +public final class ElasticCapacityPoolUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticCapacityPoolUpdateProperties properties; + + /** + * Creates an instance of ElasticCapacityPoolUpdate class. + */ + public ElasticCapacityPoolUpdate() { + } + + /** + * 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 ElasticCapacityPoolUpdate object itself. + */ + public ElasticCapacityPoolUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticCapacityPoolUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticCapacityPoolUpdate object itself. + */ + public ElasticCapacityPoolUpdate withProperties(ElasticCapacityPoolUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolUpdate. + */ + public static ElasticCapacityPoolUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolUpdate deserializedElasticCapacityPoolUpdate = new ElasticCapacityPoolUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticCapacityPoolUpdate.properties + = ElasticCapacityPoolUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java new file mode 100644 index 000000000000..b88a394b7baf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticCapacityPool. + */ +@Fluent +public final class ElasticCapacityPoolUpdateProperties + implements JsonSerializable { + /* + * Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in the range 1TiB to + * 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of 1TiB till 16TiB and in + * multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + */ + private Long size; + + /* + * Encryption settings + */ + private ElasticEncryptionConfiguration encryption; + + /* + * The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool + */ + private String activeDirectoryConfigResourceId; + + /** + * Creates an instance of ElasticCapacityPoolUpdateProperties class. + */ + public ElasticCapacityPoolUpdateProperties() { + } + + /** + * Get the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @param size the size value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryptionConfiguration encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties withEncryption(ElasticEncryptionConfiguration encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @return the activeDirectoryConfigResourceId value. + */ + public String activeDirectoryConfigResourceId() { + return this.activeDirectoryConfigResourceId; + } + + /** + * Set the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @param activeDirectoryConfigResourceId the activeDirectoryConfigResourceId value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties + withActiveDirectoryConfigResourceId(String activeDirectoryConfigResourceId) { + this.activeDirectoryConfigResourceId = activeDirectoryConfigResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("activeDirectoryConfigResourceId", this.activeDirectoryConfigResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolUpdateProperties. + */ + public static ElasticCapacityPoolUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolUpdateProperties deserializedElasticCapacityPoolUpdateProperties + = new ElasticCapacityPoolUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("encryption".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.encryption + = ElasticEncryptionConfiguration.fromJson(reader); + } else if ("activeDirectoryConfigResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.activeDirectoryConfigResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java new file mode 100644 index 000000000000..712d1fc12fac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticCapacityPools. + */ +public interface ElasticCapacityPools { + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 NetApp Elastic Capacity Pool. + */ + ElasticCapacityPool get(String resourceGroupName, String accountName, String poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 poolName, Context context); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticCapacityPool list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body); + + /** + * Moves pool to another zone. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 netApp Elastic Capacity Pool resource. + */ + ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource along with {@link Response}. + */ + Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @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 availability of a resource. + */ + CheckElasticResourceAvailabilityResponse checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @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 NetApp Elastic Capacity Pool along with {@link Response}. + */ + ElasticCapacityPool getById(String id); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @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 NetApp Elastic Capacity Pool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @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 the specified NetApp Elastic Capacity Pool. + * + * @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 ElasticCapacityPool resource. + * + * @param name resource name. + * @return the first stage of the new ElasticCapacityPool definition. + */ + ElasticCapacityPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java new file mode 100644 index 000000000000..e4340a9c9b29 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Encryption settings. + */ +@Fluent +public final class ElasticEncryption implements JsonSerializable { + /* + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + */ + private KeySource keySource; + + /* + * Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private ElasticKeyVaultProperties keyVaultProperties; + + /* + * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private ElasticEncryptionIdentity identity; + + /** + * Creates an instance of ElasticEncryption class. + */ + public ElasticEncryption() { + } + + /** + * Get the keySource property: The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.NetApp, Microsoft.KeyVault. + * + * @return the keySource value. + */ + public KeySource keySource() { + return this.keySource; + } + + /** + * Set the keySource property: The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.NetApp, Microsoft.KeyVault. + * + * @param keySource the keySource value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withKeySource(KeySource keySource) { + this.keySource = keySource; + return this; + } + + /** + * Get the keyVaultProperties property: Properties provided by KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the keyVaultProperties value. + */ + public ElasticKeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Properties provided by KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withKeyVaultProperties(ElasticKeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the identity value. + */ + public ElasticEncryptionIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param identity the identity value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withIdentity(ElasticEncryptionIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keySource", this.keySource == null ? null : this.keySource.toString()); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryption if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticEncryption. + */ + public static ElasticEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryption deserializedElasticEncryption = new ElasticEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keySource".equals(fieldName)) { + deserializedElasticEncryption.keySource = KeySource.fromString(reader.getString()); + } else if ("keyVaultProperties".equals(fieldName)) { + deserializedElasticEncryption.keyVaultProperties = ElasticKeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedElasticEncryption.identity = ElasticEncryptionIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryption; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java new file mode 100644 index 000000000000..75a5ab4ad93f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * CMK Encryption Configuration. + */ +@Fluent +public final class ElasticEncryptionConfiguration implements JsonSerializable { + /* + * Pool Encryption Key Source. + */ + private ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource; + + /* + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable + * if encryptionKeySource = 'Microsoft.KeyVault'. + */ + private String keyVaultPrivateEndpointResourceId; + + /** + * Creates an instance of ElasticEncryptionConfiguration class. + */ + public ElasticEncryptionConfiguration() { + } + + /** + * Get the elasticPoolEncryptionKeySource property: Pool Encryption Key Source. + * + * @return the elasticPoolEncryptionKeySource value. + */ + public ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource() { + return this.elasticPoolEncryptionKeySource; + } + + /** + * Set the elasticPoolEncryptionKeySource property: Pool Encryption Key Source. + * + * @param elasticPoolEncryptionKeySource the elasticPoolEncryptionKeySource value to set. + * @return the ElasticEncryptionConfiguration object itself. + */ + public ElasticEncryptionConfiguration + withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource) { + this.elasticPoolEncryptionKeySource = elasticPoolEncryptionKeySource; + return this; + } + + /** + * Get the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @return the keyVaultPrivateEndpointResourceId value. + */ + public String keyVaultPrivateEndpointResourceId() { + return this.keyVaultPrivateEndpointResourceId; + } + + /** + * Set the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @param keyVaultPrivateEndpointResourceId the keyVaultPrivateEndpointResourceId value to set. + * @return the ElasticEncryptionConfiguration object itself. + */ + public ElasticEncryptionConfiguration + withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (elasticPoolEncryptionKeySource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property elasticPoolEncryptionKeySource in model ElasticEncryptionConfiguration")); + } + if (keyVaultPrivateEndpointResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultPrivateEndpointResourceId in model ElasticEncryptionConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticEncryptionConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticPoolEncryptionKeySource", + this.elasticPoolEncryptionKeySource == null ? null : this.elasticPoolEncryptionKeySource.toString()); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryptionConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryptionConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticEncryptionConfiguration. + */ + public static ElasticEncryptionConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryptionConfiguration deserializedElasticEncryptionConfiguration + = new ElasticEncryptionConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticPoolEncryptionKeySource".equals(fieldName)) { + deserializedElasticEncryptionConfiguration.elasticPoolEncryptionKeySource + = ElasticPoolEncryptionKeySource.fromString(reader.getString()); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedElasticEncryptionConfiguration.keyVaultPrivateEndpointResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryptionConfiguration; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java new file mode 100644 index 000000000000..f351a7dc8d79 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identity used to authenticate with key vault. + */ +@Fluent +public final class ElasticEncryptionIdentity implements JsonSerializable { + /* + * The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + */ + private String principalId; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if + * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + */ + private String userAssignedIdentity; + + /* + * ClientId of the multi-tenant Entra ID Application. Used to access cross-tenant keyvaults. + */ + private String federatedClientId; + + /** + * Creates an instance of ElasticEncryptionIdentity class. + */ + public ElasticEncryptionIdentity() { + } + + /** + * Get the principalId property: The principal ID (object ID) of the identity used to authenticate with key vault. + * Read-only. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the ElasticEncryptionIdentity object itself. + */ + public ElasticEncryptionIdentity withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Get the federatedClientId property: ClientId of the multi-tenant Entra ID Application. Used to access + * cross-tenant keyvaults. + * + * @return the federatedClientId value. + */ + public String federatedClientId() { + return this.federatedClientId; + } + + /** + * Set the federatedClientId property: ClientId of the multi-tenant Entra ID Application. Used to access + * cross-tenant keyvaults. + * + * @param federatedClientId the federatedClientId value to set. + * @return the ElasticEncryptionIdentity object itself. + */ + public ElasticEncryptionIdentity withFederatedClientId(String federatedClientId) { + this.federatedClientId = federatedClientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + jsonWriter.writeStringField("federatedClientId", this.federatedClientId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryptionIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryptionIdentity if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticEncryptionIdentity. + */ + public static ElasticEncryptionIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryptionIdentity deserializedElasticEncryptionIdentity = new ElasticEncryptionIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedElasticEncryptionIdentity.principalId = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedElasticEncryptionIdentity.userAssignedIdentity = reader.getString(); + } else if ("federatedClientId".equals(fieldName)) { + deserializedElasticEncryptionIdentity.federatedClientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryptionIdentity; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java new file mode 100644 index 000000000000..86e47d808720 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Set of export policy rules. + */ +@Fluent +public final class ElasticExportPolicy implements JsonSerializable { + /* + * Export policy rule + */ + private List rules; + + /** + * Creates an instance of ElasticExportPolicy class. + */ + public ElasticExportPolicy() { + } + + /** + * Get the rules property: Export policy rule. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: Export policy rule. + * + * @param rules the rules value to set. + * @return the ElasticExportPolicy object itself. + */ + public ElasticExportPolicy withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticExportPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticExportPolicy. + */ + public static ElasticExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticExportPolicy deserializedElasticExportPolicy = new ElasticExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List rules + = reader.readArray(reader1 -> ElasticExportPolicyRule.fromJson(reader1)); + deserializedElasticExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedElasticExportPolicy; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java new file mode 100644 index 000000000000..32b4063961f9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volume Export Policy Rule. + */ +@Fluent +public final class ElasticExportPolicyRule implements JsonSerializable { + /* + * Controls the priority of the export policy rule. When connecting to the volume the rule with the lowest index + * that applies to the connecting client is used + */ + private Integer ruleIndex; + + /* + * Specifies the Unix file access level for the volume. It encompasses both read-only and read-write permissions. + * Additionally, NoAccess can be set to block all access to the volume + */ + private ElasticUnixAccessRule unixAccessRule; + + /* + * Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type volumes + */ + private ElasticNfsv3Access nfsv3; + + /* + * Allows clients to access the volume with at least NFSv4.1 protocol. + */ + private ElasticNfsv4Access nfsv4; + + /* + * Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses and host names. + */ + private List allowedClients; + + /* + * Indicates whether root access to the volume is granted to clients affected by this rule + */ + private ElasticRootAccess rootAccess; + + /** + * Creates an instance of ElasticExportPolicyRule class. + */ + public ElasticExportPolicyRule() { + } + + /** + * Get the ruleIndex property: Controls the priority of the export policy rule. When connecting to the volume the + * rule with the lowest index that applies to the connecting client is used. + * + * @return the ruleIndex value. + */ + public Integer ruleIndex() { + return this.ruleIndex; + } + + /** + * Set the ruleIndex property: Controls the priority of the export policy rule. When connecting to the volume the + * rule with the lowest index that applies to the connecting client is used. + * + * @param ruleIndex the ruleIndex value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withRuleIndex(Integer ruleIndex) { + this.ruleIndex = ruleIndex; + return this; + } + + /** + * Get the unixAccessRule property: Specifies the Unix file access level for the volume. It encompasses both + * read-only and read-write permissions. Additionally, NoAccess can be set to block all access to the volume. + * + * @return the unixAccessRule value. + */ + public ElasticUnixAccessRule unixAccessRule() { + return this.unixAccessRule; + } + + /** + * Set the unixAccessRule property: Specifies the Unix file access level for the volume. It encompasses both + * read-only and read-write permissions. Additionally, NoAccess can be set to block all access to the volume. + * + * @param unixAccessRule the unixAccessRule value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withUnixAccessRule(ElasticUnixAccessRule unixAccessRule) { + this.unixAccessRule = unixAccessRule; + return this; + } + + /** + * Get the nfsv3 property: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type + * volumes. + * + * @return the nfsv3 value. + */ + public ElasticNfsv3Access nfsv3() { + return this.nfsv3; + } + + /** + * Set the nfsv3 property: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type + * volumes. + * + * @param nfsv3 the nfsv3 value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withNfsv3(ElasticNfsv3Access nfsv3) { + this.nfsv3 = nfsv3; + return this; + } + + /** + * Get the nfsv4 property: Allows clients to access the volume with at least NFSv4.1 protocol. + * + * @return the nfsv4 value. + */ + public ElasticNfsv4Access nfsv4() { + return this.nfsv4; + } + + /** + * Set the nfsv4 property: Allows clients to access the volume with at least NFSv4.1 protocol. + * + * @param nfsv4 the nfsv4 value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withNfsv4(ElasticNfsv4Access nfsv4) { + this.nfsv4 = nfsv4; + return this; + } + + /** + * Get the allowedClients property: Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 + * host addresses and host names. + * + * @return the allowedClients value. + */ + public List allowedClients() { + return this.allowedClients; + } + + /** + * Set the allowedClients property: Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 + * host addresses and host names. + * + * @param allowedClients the allowedClients value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withAllowedClients(List allowedClients) { + this.allowedClients = allowedClients; + return this; + } + + /** + * Get the rootAccess property: Indicates whether root access to the volume is granted to clients affected by this + * rule. + * + * @return the rootAccess value. + */ + public ElasticRootAccess rootAccess() { + return this.rootAccess; + } + + /** + * Set the rootAccess property: Indicates whether root access to the volume is granted to clients affected by this + * rule. + * + * @param rootAccess the rootAccess value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withRootAccess(ElasticRootAccess rootAccess) { + this.rootAccess = rootAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("ruleIndex", this.ruleIndex); + jsonWriter.writeStringField("unixAccessRule", + this.unixAccessRule == null ? null : this.unixAccessRule.toString()); + jsonWriter.writeStringField("nfsv3", this.nfsv3 == null ? null : this.nfsv3.toString()); + jsonWriter.writeStringField("nfsv4", this.nfsv4 == null ? null : this.nfsv4.toString()); + jsonWriter.writeArrayField("allowedClients", this.allowedClients, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("rootAccess", this.rootAccess == null ? null : this.rootAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticExportPolicyRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticExportPolicyRule if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticExportPolicyRule. + */ + public static ElasticExportPolicyRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticExportPolicyRule deserializedElasticExportPolicyRule = new ElasticExportPolicyRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleIndex".equals(fieldName)) { + deserializedElasticExportPolicyRule.ruleIndex = reader.getNullable(JsonReader::getInt); + } else if ("unixAccessRule".equals(fieldName)) { + deserializedElasticExportPolicyRule.unixAccessRule + = ElasticUnixAccessRule.fromString(reader.getString()); + } else if ("nfsv3".equals(fieldName)) { + deserializedElasticExportPolicyRule.nfsv3 = ElasticNfsv3Access.fromString(reader.getString()); + } else if ("nfsv4".equals(fieldName)) { + deserializedElasticExportPolicyRule.nfsv4 = ElasticNfsv4Access.fromString(reader.getString()); + } else if ("allowedClients".equals(fieldName)) { + List allowedClients = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticExportPolicyRule.allowedClients = allowedClients; + } else if ("rootAccess".equals(fieldName)) { + deserializedElasticExportPolicyRule.rootAccess = ElasticRootAccess.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticExportPolicyRule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java new file mode 100644 index 000000000000..e0b7f1ab7fcf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of key vault. + */ +@Fluent +public final class ElasticKeyVaultProperties implements JsonSerializable { + /* + * The Uri of KeyVault. + */ + private String keyVaultUri; + + /* + * The name of KeyVault key. + */ + private String keyName; + + /* + * The resource ID of KeyVault. + */ + private String keyVaultResourceId; + + /* + * Status of the KeyVault connection. + */ + private ElasticKeyVaultStatus status; + + /** + * Creates an instance of ElasticKeyVaultProperties class. + */ + public ElasticKeyVaultProperties() { + } + + /** + * Get the keyVaultUri property: The Uri of KeyVault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the keyName property: The name of KeyVault key. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The name of KeyVault key. + * + * @param keyName the keyName value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the keyVaultResourceId property: The resource ID of KeyVault. + * + * @return the keyVaultResourceId value. + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the keyVaultResourceId property: The resource ID of KeyVault. + * + * @param keyVaultResourceId the keyVaultResourceId value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Get the status property: Status of the KeyVault connection. + * + * @return the status value. + */ + public ElasticKeyVaultStatus status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("keyName", this.keyName); + jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticKeyVaultProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticKeyVaultProperties. + */ + public static ElasticKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticKeyVaultProperties deserializedElasticKeyVaultProperties = new ElasticKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("keyName".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyName = reader.getString(); + } else if ("keyVaultResourceId".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyVaultResourceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedElasticKeyVaultProperties.status = ElasticKeyVaultStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticKeyVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java new file mode 100644 index 000000000000..b03bf923133d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * KeyVault status. + */ +public final class ElasticKeyVaultStatus extends ExpandableStringEnum { + /** + * KeyVault connection created but not in use. + */ + public static final ElasticKeyVaultStatus CREATED = fromString("Created"); + + /** + * KeyVault connection in use by SMB Volume. + */ + public static final ElasticKeyVaultStatus IN_USE = fromString("InUse"); + + /** + * KeyVault connection Deleted. + */ + public static final ElasticKeyVaultStatus DELETED = fromString("Deleted"); + + /** + * Error with the KeyVault connection. + */ + public static final ElasticKeyVaultStatus ERROR = fromString("Error"); + + /** + * KeyVault connection Updating. + */ + public static final ElasticKeyVaultStatus UPDATING = fromString("Updating"); + + /** + * Creates a new instance of ElasticKeyVaultStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticKeyVaultStatus() { + } + + /** + * Creates or finds a ElasticKeyVaultStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticKeyVaultStatus. + */ + public static ElasticKeyVaultStatus fromString(String name) { + return fromString(name, ElasticKeyVaultStatus.class); + } + + /** + * Gets known ElasticKeyVaultStatus values. + * + * @return known ElasticKeyVaultStatus values. + */ + public static Collection values() { + return values(ElasticKeyVaultStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java new file mode 100644 index 000000000000..8cd6c9a184f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains all the information needed to mount an elastic volume. + */ +@Immutable +public final class ElasticMountTargetProperties implements JsonSerializable { + /* + * The mount target's IPv4 address, used to mount the volume + */ + private String ipAddress; + + /* + * The SMB server's Fully Qualified Domain Name, FQDN + */ + private String smbServerFqdn; + + /** + * Creates an instance of ElasticMountTargetProperties class. + */ + private ElasticMountTargetProperties() { + } + + /** + * Get the ipAddress property: The mount target's IPv4 address, used to mount the volume. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the smbServerFqdn property: The SMB server's Fully Qualified Domain Name, FQDN. + * + * @return the smbServerFqdn value. + */ + public String smbServerFqdn() { + return this.smbServerFqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticMountTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticMountTargetProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticMountTargetProperties. + */ + public static ElasticMountTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticMountTargetProperties deserializedElasticMountTargetProperties = new ElasticMountTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddress".equals(fieldName)) { + deserializedElasticMountTargetProperties.ipAddress = reader.getString(); + } else if ("smbServerFqdn".equals(fieldName)) { + deserializedElasticMountTargetProperties.smbServerFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticMountTargetProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java new file mode 100644 index 000000000000..5869cd66b457 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NFSv3 access. + */ +public final class ElasticNfsv3Access extends ExpandableStringEnum { + /** + * Clients can connect to the volume using the NFSv3 protocol. + */ + public static final ElasticNfsv3Access ENABLED = fromString("Enabled"); + + /** + * Clients can't connect to the volume using the NFSv3 protocol. + */ + public static final ElasticNfsv3Access DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticNfsv3Access value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticNfsv3Access() { + } + + /** + * Creates or finds a ElasticNfsv3Access from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticNfsv3Access. + */ + public static ElasticNfsv3Access fromString(String name) { + return fromString(name, ElasticNfsv3Access.class); + } + + /** + * Gets known ElasticNfsv3Access values. + * + * @return known ElasticNfsv3Access values. + */ + public static Collection values() { + return values(ElasticNfsv3Access.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java new file mode 100644 index 000000000000..189fde0509d6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NFSv4 access. + */ +public final class ElasticNfsv4Access extends ExpandableStringEnum { + /** + * Clients can connect to the volume using the NFSv4 protocol. + */ + public static final ElasticNfsv4Access ENABLED = fromString("Enabled"); + + /** + * Clients can't connect to the volume using the NFSv4 protocol. + */ + public static final ElasticNfsv4Access DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticNfsv4Access value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticNfsv4Access() { + } + + /** + * Creates or finds a ElasticNfsv4Access from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticNfsv4Access. + */ + public static ElasticNfsv4Access fromString(String name) { + return fromString(name, ElasticNfsv4Access.class); + } + + /** + * Gets known ElasticNfsv4Access values. + * + * @return known ElasticNfsv4Access values. + */ + public static Collection values() { + return values(ElasticNfsv4Access.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java new file mode 100644 index 000000000000..aa4cc4f721a7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Pool Encryption Key Source. + */ +public final class ElasticPoolEncryptionKeySource extends ExpandableStringEnum { + /** + * Represents the encryption key source of Elastic pool is Microsoft.NetApp. + */ + public static final ElasticPoolEncryptionKeySource NET_APP = fromString("NetApp"); + + /** + * Represents the encryption key source of Elastic pool is Microsoft.KeyVault. + */ + public static final ElasticPoolEncryptionKeySource KEY_VAULT = fromString("KeyVault"); + + /** + * Creates a new instance of ElasticPoolEncryptionKeySource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticPoolEncryptionKeySource() { + } + + /** + * Creates or finds a ElasticPoolEncryptionKeySource from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticPoolEncryptionKeySource. + */ + public static ElasticPoolEncryptionKeySource fromString(String name) { + return fromString(name, ElasticPoolEncryptionKeySource.class); + } + + /** + * Gets known ElasticPoolEncryptionKeySource values. + * + * @return known ElasticPoolEncryptionKeySource values. + */ + public static Collection values() { + return values(ElasticPoolEncryptionKeySource.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java new file mode 100644 index 000000000000..d6a30768d5f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protocol types for elastic volume. + */ +public final class ElasticProtocolType extends ExpandableStringEnum { + /** + * NFSv3 protocol type. + */ + public static final ElasticProtocolType NFSV3 = fromString("NFSv3"); + + /** + * NFSv4 protocol type. + */ + public static final ElasticProtocolType NFSV4 = fromString("NFSv4"); + + /** + * SMB/CIFS protocol type. + */ + public static final ElasticProtocolType SMB = fromString("SMB"); + + /** + * Creates a new instance of ElasticProtocolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticProtocolType() { + } + + /** + * Creates or finds a ElasticProtocolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticProtocolType. + */ + public static ElasticProtocolType fromString(String name) { + return fromString(name, ElasticProtocolType.class); + } + + /** + * Gets known ElasticProtocolType values. + * + * @return known ElasticProtocolType values. + */ + public static Collection values() { + return values(ElasticProtocolType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java new file mode 100644 index 000000000000..438fe0bd73b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Current availability status of the resource. + */ +public final class ElasticResourceAvailabilityStatus extends ExpandableStringEnum { + /** + * The resource is currently Online and accessible. + */ + public static final ElasticResourceAvailabilityStatus ONLINE = fromString("Online"); + + /** + * The resource is currently Offline and not accessible. + */ + public static final ElasticResourceAvailabilityStatus OFFLINE = fromString("Offline"); + + /** + * Creates a new instance of ElasticResourceAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticResourceAvailabilityStatus() { + } + + /** + * Creates or finds a ElasticResourceAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticResourceAvailabilityStatus. + */ + public static ElasticResourceAvailabilityStatus fromString(String name) { + return fromString(name, ElasticResourceAvailabilityStatus.class); + } + + /** + * Gets known ElasticResourceAvailabilityStatus values. + * + * @return known ElasticResourceAvailabilityStatus values. + */ + public static Collection values() { + return values(ElasticResourceAvailabilityStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java new file mode 100644 index 000000000000..72aeb2eb784d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Root access. + */ +public final class ElasticRootAccess extends ExpandableStringEnum { + /** + * Root user access is enabled for clients affected by this rule. + */ + public static final ElasticRootAccess ENABLED = fromString("Enabled"); + + /** + * Root user access is disabled for clients affected by this rule. + */ + public static final ElasticRootAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticRootAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticRootAccess() { + } + + /** + * Creates or finds a ElasticRootAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticRootAccess. + */ + public static ElasticRootAccess fromString(String name) { + return fromString(name, ElasticRootAccess.class); + } + + /** + * Gets known ElasticRootAccess values. + * + * @return known ElasticRootAccess values. + */ + public static Collection values() { + return values(ElasticRootAccess.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java new file mode 100644 index 000000000000..d7eba1c8da06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Service level for elastic capacity pool. + */ +public final class ElasticServiceLevel extends ExpandableStringEnum { + /** + * Zone redundant storage service level. + */ + public static final ElasticServiceLevel ZONE_REDUNDANT = fromString("ZoneRedundant"); + + /** + * Creates a new instance of ElasticServiceLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticServiceLevel() { + } + + /** + * Creates or finds a ElasticServiceLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticServiceLevel. + */ + public static ElasticServiceLevel fromString(String name) { + return fromString(name, ElasticServiceLevel.class); + } + + /** + * Gets known ElasticServiceLevel values. + * + * @return known ElasticServiceLevel values. + */ + public static Collection values() { + return values(ElasticServiceLevel.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java new file mode 100644 index 000000000000..8595a9bd4819 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * SMB encryption. + */ +public final class ElasticSmbEncryption extends ExpandableStringEnum { + /** + * Value indicating the SMB encryption is enabled. + */ + public static final ElasticSmbEncryption ENABLED = fromString("Enabled"); + + /** + * Value indicating the SMB encryption is disabled. + */ + public static final ElasticSmbEncryption DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticSmbEncryption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticSmbEncryption() { + } + + /** + * Creates or finds a ElasticSmbEncryption from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticSmbEncryption. + */ + public static ElasticSmbEncryption fromString(String name) { + return fromString(name, ElasticSmbEncryption.class); + } + + /** + * Gets known ElasticSmbEncryption values. + * + * @return known ElasticSmbEncryption values. + */ + public static Collection values() { + return values(ElasticSmbEncryption.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java new file mode 100644 index 000000000000..7766dfc4442c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB Patch Properties. + */ +@Fluent +public final class ElasticSmbPatchProperties implements JsonSerializable { + /* + * Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified during Elastic + * volume update operation as well. Only applicable for SMB protocol Elastic volumes. + */ + private ElasticSmbEncryption smbEncryption; + + /** + * Creates an instance of ElasticSmbPatchProperties class. + */ + public ElasticSmbPatchProperties() { + } + + /** + * Get the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @return the smbEncryption value. + */ + public ElasticSmbEncryption smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @param smbEncryption the smbEncryption value to set. + * @return the ElasticSmbPatchProperties object itself. + */ + public ElasticSmbPatchProperties withSmbEncryption(ElasticSmbEncryption smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSmbPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSmbPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSmbPatchProperties. + */ + public static ElasticSmbPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSmbPatchProperties deserializedElasticSmbPatchProperties = new ElasticSmbPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedElasticSmbPatchProperties.smbEncryption + = ElasticSmbEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSmbPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java new file mode 100644 index 000000000000..ce54c98ff0ed --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB Properties. + */ +@Fluent +public final class ElasticSmbProperties implements JsonSerializable { + /* + * Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified during Elastic + * volume update operation as well. Only applicable for SMB protocol Elastic volumes. + */ + private ElasticSmbEncryption smbEncryption; + + /** + * Creates an instance of ElasticSmbProperties class. + */ + public ElasticSmbProperties() { + } + + /** + * Get the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @return the smbEncryption value. + */ + public ElasticSmbEncryption smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @param smbEncryption the smbEncryption value to set. + * @return the ElasticSmbProperties object itself. + */ + public ElasticSmbProperties withSmbEncryption(ElasticSmbEncryption smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSmbProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSmbProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSmbProperties. + */ + public static ElasticSmbProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSmbProperties deserializedElasticSmbProperties = new ElasticSmbProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedElasticSmbProperties.smbEncryption + = ElasticSmbEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSmbProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java new file mode 100644 index 000000000000..9e1816bc2354 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotInner; + +/** + * An immutable client-side representation of ElasticSnapshot. + */ +public interface ElasticSnapshot { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticSnapshotProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticSnapshotInner object. + * + * @return the inner object. + */ + ElasticSnapshotInner innerModel(); + + /** + * The entirety of the ElasticSnapshot definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticSnapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticSnapshot definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ElasticSnapshot definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName, volumeName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @return the next definition stage. + */ + WithCreate withExistingElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + } + + /** + * The stage of the ElasticSnapshot 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticSnapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticSnapshot create(Context context); + } + + /** + * The stage of the ElasticSnapshot definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticSnapshotProperties properties); + } + } + + /** + * Begins update for the ElasticSnapshot resource. + * + * @return the stage of resource update. + */ + ElasticSnapshot.Update update(); + + /** + * The template for ElasticSnapshot update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticSnapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticSnapshot apply(Context context); + } + + /** + * The ElasticSnapshot update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticSnapshot update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticSnapshotProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticSnapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticSnapshot refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java new file mode 100644 index 000000000000..75aed519de08 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticSnapshotPolicies. + */ +public interface ElasticSnapshotPolicies { + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 a ElasticSnapshotPolicy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 a ElasticSnapshotPolicy. + */ + ElasticSnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 snapshotPolicyName, Context context); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @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 response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @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 elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @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 a ElasticSnapshotPolicy along with {@link Response}. + */ + ElasticSnapshotPolicy getById(String id); + + /** + * Get a ElasticSnapshotPolicy. + * + * @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 a ElasticSnapshotPolicy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @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 a ElasticSnapshotPolicy. + * + * @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 ElasticSnapshotPolicy resource. + * + * @param name resource name. + * @return the first stage of the new ElasticSnapshotPolicy definition. + */ + ElasticSnapshotPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java new file mode 100644 index 000000000000..a0a76305002d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticSnapshotPolicyInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticSnapshotPolicy. + */ +public interface ElasticSnapshotPolicy { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticSnapshotPolicyProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticSnapshotPolicyInner object. + * + * @return the inner object. + */ + ElasticSnapshotPolicyInner innerModel(); + + /** + * The entirety of the ElasticSnapshotPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticSnapshotPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticSnapshotPolicy definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticSnapshotPolicy 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 ElasticSnapshotPolicy 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 ElasticAccount. + * @return the next definition stage. + */ + WithCreate withExistingElasticAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the ElasticSnapshotPolicy 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticSnapshotPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticSnapshotPolicy create(Context context); + } + + /** + * The stage of the ElasticSnapshotPolicy 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); + } + + /** + * The stage of the ElasticSnapshotPolicy definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticSnapshotPolicyProperties properties); + } + } + + /** + * Begins update for the ElasticSnapshotPolicy resource. + * + * @return the stage of resource update. + */ + ElasticSnapshotPolicy.Update update(); + + /** + * The template for ElasticSnapshotPolicy update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticSnapshotPolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticSnapshotPolicy apply(Context context); + } + + /** + * The ElasticSnapshotPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticSnapshotPolicy 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); + } + + /** + * The stage of the ElasticSnapshotPolicy update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticSnapshotPolicyUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticSnapshotPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticSnapshotPolicy refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java new file mode 100644 index 000000000000..d21f63d3ca15 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Daily Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyDailySchedule implements JsonSerializable { + /* + * Daily snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyDailySchedule class. + */ + public ElasticSnapshotPolicyDailySchedule() { + } + + /** + * Get the snapshotsToKeep property: Daily snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Daily snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyDailySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyDailySchedule if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyDailySchedule. + */ + public static ElasticSnapshotPolicyDailySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyDailySchedule deserializedElasticSnapshotPolicyDailySchedule + = new ElasticSnapshotPolicyDailySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyDailySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java new file mode 100644 index 000000000000..bdec028a79b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Hourly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyHourlySchedule + implements JsonSerializable { + /* + * Hourly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyHourlySchedule class. + */ + public ElasticSnapshotPolicyHourlySchedule() { + } + + /** + * Get the snapshotsToKeep property: Hourly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Hourly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyHourlySchedule object itself. + */ + public ElasticSnapshotPolicyHourlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyHourlySchedule object itself. + */ + public ElasticSnapshotPolicyHourlySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyHourlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyHourlySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyHourlySchedule. + */ + public static ElasticSnapshotPolicyHourlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyHourlySchedule deserializedElasticSnapshotPolicyHourlySchedule + = new ElasticSnapshotPolicyHourlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyHourlySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyHourlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyHourlySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java new file mode 100644 index 000000000000..1cbac2277d20 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Monthly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyMonthlySchedule + implements JsonSerializable { + /* + * Monthly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers + */ + private List daysOfMonth; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyMonthlySchedule class. + */ + public ElasticSnapshotPolicyMonthlySchedule() { + } + + /** + * Get the snapshotsToKeep property: Monthly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Monthly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the daysOfMonth property: Indicates which days of the month snapshot (1-31) should be taken, accepts a list + * of integers. + * + * @return the daysOfMonth value. + */ + public List daysOfMonth() { + return this.daysOfMonth; + } + + /** + * Set the daysOfMonth property: Indicates which days of the month snapshot (1-31) should be taken, accepts a list + * of integers. + * + * @param daysOfMonth the daysOfMonth value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withDaysOfMonth(List daysOfMonth) { + this.daysOfMonth = daysOfMonth; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeArrayField("daysOfMonth", this.daysOfMonth, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyMonthlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyMonthlySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyMonthlySchedule. + */ + public static ElasticSnapshotPolicyMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyMonthlySchedule deserializedElasticSnapshotPolicyMonthlySchedule + = new ElasticSnapshotPolicyMonthlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("daysOfMonth".equals(fieldName)) { + List daysOfMonth = reader.readArray(reader1 -> reader1.getInt()); + deserializedElasticSnapshotPolicyMonthlySchedule.daysOfMonth = daysOfMonth; + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyMonthlySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java new file mode 100644 index 000000000000..e606a93f9402 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Snapshot policy properties. + */ +@Fluent +public final class ElasticSnapshotPolicyProperties implements JsonSerializable { + /* + * Schedule for hourly snapshots + */ + private ElasticSnapshotPolicyHourlySchedule hourlySchedule; + + /* + * Schedule for daily snapshots + */ + private ElasticSnapshotPolicyDailySchedule dailySchedule; + + /* + * Schedule for weekly snapshots + */ + private ElasticSnapshotPolicyWeeklySchedule weeklySchedule; + + /* + * Schedule for monthly snapshots + */ + private ElasticSnapshotPolicyMonthlySchedule monthlySchedule; + + /* + * Configures if the snapshot policy is enabled on the volumes connected to the policy. + */ + private PolicyStatus policyStatus; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticSnapshotPolicyProperties class. + */ + public ElasticSnapshotPolicyProperties() { + } + + /** + * Get the hourlySchedule property: Schedule for hourly snapshots. + * + * @return the hourlySchedule value. + */ + public ElasticSnapshotPolicyHourlySchedule hourlySchedule() { + return this.hourlySchedule; + } + + /** + * Set the hourlySchedule property: Schedule for hourly snapshots. + * + * @param hourlySchedule the hourlySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withHourlySchedule(ElasticSnapshotPolicyHourlySchedule hourlySchedule) { + this.hourlySchedule = hourlySchedule; + return this; + } + + /** + * Get the dailySchedule property: Schedule for daily snapshots. + * + * @return the dailySchedule value. + */ + public ElasticSnapshotPolicyDailySchedule dailySchedule() { + return this.dailySchedule; + } + + /** + * Set the dailySchedule property: Schedule for daily snapshots. + * + * @param dailySchedule the dailySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withDailySchedule(ElasticSnapshotPolicyDailySchedule dailySchedule) { + this.dailySchedule = dailySchedule; + return this; + } + + /** + * Get the weeklySchedule property: Schedule for weekly snapshots. + * + * @return the weeklySchedule value. + */ + public ElasticSnapshotPolicyWeeklySchedule weeklySchedule() { + return this.weeklySchedule; + } + + /** + * Set the weeklySchedule property: Schedule for weekly snapshots. + * + * @param weeklySchedule the weeklySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withWeeklySchedule(ElasticSnapshotPolicyWeeklySchedule weeklySchedule) { + this.weeklySchedule = weeklySchedule; + return this; + } + + /** + * Get the monthlySchedule property: Schedule for monthly snapshots. + * + * @return the monthlySchedule value. + */ + public ElasticSnapshotPolicyMonthlySchedule monthlySchedule() { + return this.monthlySchedule; + } + + /** + * Set the monthlySchedule property: Schedule for monthly snapshots. + * + * @param monthlySchedule the monthlySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withMonthlySchedule(ElasticSnapshotPolicyMonthlySchedule monthlySchedule) { + this.monthlySchedule = monthlySchedule; + return this; + } + + /** + * Get the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @return the policyStatus value. + */ + public PolicyStatus policyStatus() { + return this.policyStatus; + } + + /** + * Set the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @param policyStatus the policyStatus value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withPolicyStatus(PolicyStatus policyStatus) { + this.policyStatus = policyStatus; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hourlySchedule() != null) { + hourlySchedule().validate(); + } + if (dailySchedule() != null) { + dailySchedule().validate(); + } + if (weeklySchedule() != null) { + weeklySchedule().validate(); + } + if (monthlySchedule() != null) { + monthlySchedule().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("hourlySchedule", this.hourlySchedule); + jsonWriter.writeJsonField("dailySchedule", this.dailySchedule); + jsonWriter.writeJsonField("weeklySchedule", this.weeklySchedule); + jsonWriter.writeJsonField("monthlySchedule", this.monthlySchedule); + jsonWriter.writeStringField("policyStatus", this.policyStatus == null ? null : this.policyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyProperties. + */ + public static ElasticSnapshotPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyProperties deserializedElasticSnapshotPolicyProperties + = new ElasticSnapshotPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hourlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.hourlySchedule + = ElasticSnapshotPolicyHourlySchedule.fromJson(reader); + } else if ("dailySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.dailySchedule + = ElasticSnapshotPolicyDailySchedule.fromJson(reader); + } else if ("weeklySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.weeklySchedule + = ElasticSnapshotPolicyWeeklySchedule.fromJson(reader); + } else if ("monthlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.monthlySchedule + = ElasticSnapshotPolicyMonthlySchedule.fromJson(reader); + } else if ("policyStatus".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.policyStatus + = PolicyStatus.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java new file mode 100644 index 000000000000..c9224f647b39 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticSnapshotPolicy. + */ +@Fluent +public final class ElasticSnapshotPolicyUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotPolicyUpdateProperties properties; + + /** + * Creates an instance of ElasticSnapshotPolicyUpdate class. + */ + public ElasticSnapshotPolicyUpdate() { + } + + /** + * 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 ElasticSnapshotPolicyUpdate object itself. + */ + public ElasticSnapshotPolicyUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotPolicyUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotPolicyUpdate object itself. + */ + public ElasticSnapshotPolicyUpdate withProperties(ElasticSnapshotPolicyUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyUpdate if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyUpdate. + */ + public static ElasticSnapshotPolicyUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyUpdate deserializedElasticSnapshotPolicyUpdate = new ElasticSnapshotPolicyUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticSnapshotPolicyUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdate.properties + = ElasticSnapshotPolicyUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java new file mode 100644 index 000000000000..aeb1d8a2d1a3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticSnapshotPolicy. + */ +@Fluent +public final class ElasticSnapshotPolicyUpdateProperties + implements JsonSerializable { + /* + * Schedule for hourly snapshots + */ + private ElasticSnapshotPolicyHourlySchedule hourlySchedule; + + /* + * Schedule for daily snapshots + */ + private ElasticSnapshotPolicyDailySchedule dailySchedule; + + /* + * Schedule for weekly snapshots + */ + private ElasticSnapshotPolicyWeeklySchedule weeklySchedule; + + /* + * Schedule for monthly snapshots + */ + private ElasticSnapshotPolicyMonthlySchedule monthlySchedule; + + /* + * Configures if the snapshot policy is enabled on the volumes connected to the policy. + */ + private PolicyStatus policyStatus; + + /** + * Creates an instance of ElasticSnapshotPolicyUpdateProperties class. + */ + public ElasticSnapshotPolicyUpdateProperties() { + } + + /** + * Get the hourlySchedule property: Schedule for hourly snapshots. + * + * @return the hourlySchedule value. + */ + public ElasticSnapshotPolicyHourlySchedule hourlySchedule() { + return this.hourlySchedule; + } + + /** + * Set the hourlySchedule property: Schedule for hourly snapshots. + * + * @param hourlySchedule the hourlySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties + withHourlySchedule(ElasticSnapshotPolicyHourlySchedule hourlySchedule) { + this.hourlySchedule = hourlySchedule; + return this; + } + + /** + * Get the dailySchedule property: Schedule for daily snapshots. + * + * @return the dailySchedule value. + */ + public ElasticSnapshotPolicyDailySchedule dailySchedule() { + return this.dailySchedule; + } + + /** + * Set the dailySchedule property: Schedule for daily snapshots. + * + * @param dailySchedule the dailySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties withDailySchedule(ElasticSnapshotPolicyDailySchedule dailySchedule) { + this.dailySchedule = dailySchedule; + return this; + } + + /** + * Get the weeklySchedule property: Schedule for weekly snapshots. + * + * @return the weeklySchedule value. + */ + public ElasticSnapshotPolicyWeeklySchedule weeklySchedule() { + return this.weeklySchedule; + } + + /** + * Set the weeklySchedule property: Schedule for weekly snapshots. + * + * @param weeklySchedule the weeklySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties + withWeeklySchedule(ElasticSnapshotPolicyWeeklySchedule weeklySchedule) { + this.weeklySchedule = weeklySchedule; + return this; + } + + /** + * Get the monthlySchedule property: Schedule for monthly snapshots. + * + * @return the monthlySchedule value. + */ + public ElasticSnapshotPolicyMonthlySchedule monthlySchedule() { + return this.monthlySchedule; + } + + /** + * Set the monthlySchedule property: Schedule for monthly snapshots. + * + * @param monthlySchedule the monthlySchedule value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties + withMonthlySchedule(ElasticSnapshotPolicyMonthlySchedule monthlySchedule) { + this.monthlySchedule = monthlySchedule; + return this; + } + + /** + * Get the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @return the policyStatus value. + */ + public PolicyStatus policyStatus() { + return this.policyStatus; + } + + /** + * Set the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @param policyStatus the policyStatus value to set. + * @return the ElasticSnapshotPolicyUpdateProperties object itself. + */ + public ElasticSnapshotPolicyUpdateProperties withPolicyStatus(PolicyStatus policyStatus) { + this.policyStatus = policyStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hourlySchedule() != null) { + hourlySchedule().validate(); + } + if (dailySchedule() != null) { + dailySchedule().validate(); + } + if (weeklySchedule() != null) { + weeklySchedule().validate(); + } + if (monthlySchedule() != null) { + monthlySchedule().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("hourlySchedule", this.hourlySchedule); + jsonWriter.writeJsonField("dailySchedule", this.dailySchedule); + jsonWriter.writeJsonField("weeklySchedule", this.weeklySchedule); + jsonWriter.writeJsonField("monthlySchedule", this.monthlySchedule); + jsonWriter.writeStringField("policyStatus", this.policyStatus == null ? null : this.policyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyUpdateProperties. + */ + public static ElasticSnapshotPolicyUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyUpdateProperties deserializedElasticSnapshotPolicyUpdateProperties + = new ElasticSnapshotPolicyUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hourlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.hourlySchedule + = ElasticSnapshotPolicyHourlySchedule.fromJson(reader); + } else if ("dailySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.dailySchedule + = ElasticSnapshotPolicyDailySchedule.fromJson(reader); + } else if ("weeklySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.weeklySchedule + = ElasticSnapshotPolicyWeeklySchedule.fromJson(reader); + } else if ("monthlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.monthlySchedule + = ElasticSnapshotPolicyMonthlySchedule.fromJson(reader); + } else if ("policyStatus".equals(fieldName)) { + deserializedElasticSnapshotPolicyUpdateProperties.policyStatus + = PolicyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java new file mode 100644 index 000000000000..62a9b5ad9ac8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Weekly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyWeeklySchedule + implements JsonSerializable { + /* + * Weekly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in english + */ + private List days; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyWeeklySchedule class. + */ + public ElasticSnapshotPolicyWeeklySchedule() { + } + + /** + * Get the snapshotsToKeep property: Weekly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Weekly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the days property: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names + * in english. + * + * @return the days value. + */ + public List days() { + return this.days; + } + + /** + * Set the days property: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names + * in english. + * + * @param days the days value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withDays(List days) { + this.days = days; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeArrayField("days", this.days, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyWeeklySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyWeeklySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyWeeklySchedule. + */ + public static ElasticSnapshotPolicyWeeklySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyWeeklySchedule deserializedElasticSnapshotPolicyWeeklySchedule + = new ElasticSnapshotPolicyWeeklySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("days".equals(fieldName)) { + List days = reader.readArray(reader1 -> DayOfWeek.fromString(reader1.getString())); + deserializedElasticSnapshotPolicyWeeklySchedule.days = days; + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyWeeklySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java new file mode 100644 index 000000000000..92a3c2587f96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Snapshot properties. + */ +@Immutable +public final class ElasticSnapshotProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticSnapshotProperties class. + */ + public ElasticSnapshotProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotProperties. + */ + public static ElasticSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotProperties deserializedElasticSnapshotProperties = new ElasticSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticSnapshotProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java new file mode 100644 index 000000000000..aa698ce37da1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticSnapshots. + */ +public interface ElasticSnapshots { + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 a ElasticSnapshot along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 a ElasticSnapshot. + */ + ElasticSnapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @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 poolName, String volumeName, String snapshotName, + Context context); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @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 a ElasticSnapshot along with {@link Response}. + */ + ElasticSnapshot getById(String id); + + /** + * Get a ElasticSnapshot. + * + * @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 a ElasticSnapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @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 a ElasticSnapshot. + * + * @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 ElasticSnapshot resource. + * + * @param name resource name. + * @return the first stage of the new ElasticSnapshot definition. + */ + ElasticSnapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java new file mode 100644 index 000000000000..659566146864 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Unix access rule. + */ +public final class ElasticUnixAccessRule extends ExpandableStringEnum { + /** + * Clients connecting with this rule will only have read access to the volume. + */ + public static final ElasticUnixAccessRule READ_ONLY = fromString("ReadOnly"); + + /** + * Clients connecting with this rule will have full read and write access to the volume. + */ + public static final ElasticUnixAccessRule READ_WRITE = fromString("ReadWrite"); + + /** + * Clients connecting with this rule will have no access to the volume. + */ + public static final ElasticUnixAccessRule NO_ACCESS = fromString("NoAccess"); + + /** + * Creates a new instance of ElasticUnixAccessRule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticUnixAccessRule() { + } + + /** + * Creates or finds a ElasticUnixAccessRule from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticUnixAccessRule. + */ + public static ElasticUnixAccessRule fromString(String name) { + return fromString(name, ElasticUnixAccessRule.class); + } + + /** + * Gets known ElasticUnixAccessRule values. + * + * @return known ElasticUnixAccessRule values. + */ + public static Collection values() { + return values(ElasticUnixAccessRule.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java new file mode 100644 index 000000000000..554beba8f26a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.ElasticVolumeInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticVolume. + */ +public interface ElasticVolume { + /** + * 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 properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticVolumeProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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.ElasticVolumeInner object. + * + * @return the inner object. + */ + ElasticVolumeInner innerModel(); + + /** + * The entirety of the ElasticVolume definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticVolume definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticVolume definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticVolume 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 ElasticVolume definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @return the next definition stage. + */ + WithCreate withExistingElasticCapacityPool(String resourceGroupName, String accountName, String poolName); + } + + /** + * The stage of the ElasticVolume 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.WithProperties, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticVolume create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticVolume create(Context context); + } + + /** + * The stage of the ElasticVolume 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); + } + + /** + * The stage of the ElasticVolume definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticVolumeProperties properties); + } + + /** + * The stage of the ElasticVolume definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } + } + + /** + * Begins update for the ElasticVolume resource. + * + * @return the stage of resource update. + */ + ElasticVolume.Update update(); + + /** + * The template for ElasticVolume update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticVolume apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticVolume apply(Context context); + } + + /** + * The ElasticVolume update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticVolume 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); + } + + /** + * The stage of the ElasticVolume update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticVolumeUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticVolume refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticVolume refresh(Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + ElasticVolume revert(ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + ElasticVolume revert(ElasticVolumeRevert body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java new file mode 100644 index 000000000000..0ad6d3a993de --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Volume Backup Properties. + */ +@Fluent +public final class ElasticVolumeBackupProperties implements JsonSerializable { + /* + * ResourceId used to identify Elastic Backup Policy + */ + private String elasticBackupPolicyResourceId; + + /* + * The property to decide policy is enforced or not on the volume + */ + private ElasticVolumePolicyEnforcement policyEnforcement; + + /* + * ResourceId used to identify Elastic Backup Vault + */ + private String elasticBackupVaultResourceId; + + /** + * Creates an instance of ElasticVolumeBackupProperties class. + */ + public ElasticVolumeBackupProperties() { + } + + /** + * Get the elasticBackupPolicyResourceId property: ResourceId used to identify Elastic Backup Policy. + * + * @return the elasticBackupPolicyResourceId value. + */ + public String elasticBackupPolicyResourceId() { + return this.elasticBackupPolicyResourceId; + } + + /** + * Set the elasticBackupPolicyResourceId property: ResourceId used to identify Elastic Backup Policy. + * + * @param elasticBackupPolicyResourceId the elasticBackupPolicyResourceId value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withElasticBackupPolicyResourceId(String elasticBackupPolicyResourceId) { + this.elasticBackupPolicyResourceId = elasticBackupPolicyResourceId; + return this; + } + + /** + * Get the policyEnforcement property: The property to decide policy is enforced or not on the volume. + * + * @return the policyEnforcement value. + */ + public ElasticVolumePolicyEnforcement policyEnforcement() { + return this.policyEnforcement; + } + + /** + * Set the policyEnforcement property: The property to decide policy is enforced or not on the volume. + * + * @param policyEnforcement the policyEnforcement value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withPolicyEnforcement(ElasticVolumePolicyEnforcement policyEnforcement) { + this.policyEnforcement = policyEnforcement; + return this; + } + + /** + * Get the elasticBackupVaultResourceId property: ResourceId used to identify Elastic Backup Vault. + * + * @return the elasticBackupVaultResourceId value. + */ + public String elasticBackupVaultResourceId() { + return this.elasticBackupVaultResourceId; + } + + /** + * Set the elasticBackupVaultResourceId property: ResourceId used to identify Elastic Backup Vault. + * + * @param elasticBackupVaultResourceId the elasticBackupVaultResourceId value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withElasticBackupVaultResourceId(String elasticBackupVaultResourceId) { + this.elasticBackupVaultResourceId = elasticBackupVaultResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticBackupPolicyResourceId", this.elasticBackupPolicyResourceId); + jsonWriter.writeStringField("policyEnforcement", + this.policyEnforcement == null ? null : this.policyEnforcement.toString()); + jsonWriter.writeStringField("elasticBackupVaultResourceId", this.elasticBackupVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeBackupProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeBackupProperties. + */ + public static ElasticVolumeBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeBackupProperties deserializedElasticVolumeBackupProperties + = new ElasticVolumeBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticBackupPolicyResourceId".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.elasticBackupPolicyResourceId = reader.getString(); + } else if ("policyEnforcement".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.policyEnforcement + = ElasticVolumePolicyEnforcement.fromString(reader.getString()); + } else if ("elasticBackupVaultResourceId".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.elasticBackupVaultResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeBackupProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java new file mode 100644 index 000000000000..5bef7dd86892 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data protection configuration option for updating the volume, including snapshot policies and backup. + */ +@Fluent +public final class ElasticVolumeDataProtectionPatchProperties + implements JsonSerializable { + /* + * Used to apply a snapshot policy to a volume. + */ + private ElasticVolumeSnapshotProperties snapshot; + + /* + * Used to configure backups on an elastic volume. + */ + private ElasticVolumeBackupProperties backup; + + /** + * Creates an instance of ElasticVolumeDataProtectionPatchProperties class. + */ + public ElasticVolumeDataProtectionPatchProperties() { + } + + /** + * Get the snapshot property: Used to apply a snapshot policy to a volume. + * + * @return the snapshot value. + */ + public ElasticVolumeSnapshotProperties snapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: Used to apply a snapshot policy to a volume. + * + * @param snapshot the snapshot value to set. + * @return the ElasticVolumeDataProtectionPatchProperties object itself. + */ + public ElasticVolumeDataProtectionPatchProperties withSnapshot(ElasticVolumeSnapshotProperties snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the backup property: Used to configure backups on an elastic volume. + * + * @return the backup value. + */ + public ElasticVolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Used to configure backups on an elastic volume. + * + * @param backup the backup value to set. + * @return the ElasticVolumeDataProtectionPatchProperties object itself. + */ + public ElasticVolumeDataProtectionPatchProperties withBackup(ElasticVolumeBackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snapshot() != null) { + snapshot().validate(); + } + if (backup() != null) { + backup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("backup", this.backup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeDataProtectionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeDataProtectionPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeDataProtectionPatchProperties. + */ + public static ElasticVolumeDataProtectionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeDataProtectionPatchProperties deserializedElasticVolumeDataProtectionPatchProperties + = new ElasticVolumeDataProtectionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshot".equals(fieldName)) { + deserializedElasticVolumeDataProtectionPatchProperties.snapshot + = ElasticVolumeSnapshotProperties.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedElasticVolumeDataProtectionPatchProperties.backup + = ElasticVolumeBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeDataProtectionPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java new file mode 100644 index 000000000000..1275a92577bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data protection configuration option for the volume, including snapshot policies and backup. + */ +@Fluent +public final class ElasticVolumeDataProtectionProperties + implements JsonSerializable { + /* + * Used to apply a snapshot policy to a volume. + */ + private ElasticVolumeSnapshotProperties snapshot; + + /* + * Used to configure backups on an elastic volume. + */ + private ElasticVolumeBackupProperties backup; + + /** + * Creates an instance of ElasticVolumeDataProtectionProperties class. + */ + public ElasticVolumeDataProtectionProperties() { + } + + /** + * Get the snapshot property: Used to apply a snapshot policy to a volume. + * + * @return the snapshot value. + */ + public ElasticVolumeSnapshotProperties snapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: Used to apply a snapshot policy to a volume. + * + * @param snapshot the snapshot value to set. + * @return the ElasticVolumeDataProtectionProperties object itself. + */ + public ElasticVolumeDataProtectionProperties withSnapshot(ElasticVolumeSnapshotProperties snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the backup property: Used to configure backups on an elastic volume. + * + * @return the backup value. + */ + public ElasticVolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Used to configure backups on an elastic volume. + * + * @param backup the backup value to set. + * @return the ElasticVolumeDataProtectionProperties object itself. + */ + public ElasticVolumeDataProtectionProperties withBackup(ElasticVolumeBackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snapshot() != null) { + snapshot().validate(); + } + if (backup() != null) { + backup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("backup", this.backup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeDataProtectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeDataProtectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeDataProtectionProperties. + */ + public static ElasticVolumeDataProtectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeDataProtectionProperties deserializedElasticVolumeDataProtectionProperties + = new ElasticVolumeDataProtectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshot".equals(fieldName)) { + deserializedElasticVolumeDataProtectionProperties.snapshot + = ElasticVolumeSnapshotProperties.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedElasticVolumeDataProtectionProperties.backup + = ElasticVolumeBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeDataProtectionProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java new file mode 100644 index 000000000000..6a1bb984ee91 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy enforcement. + */ +public final class ElasticVolumePolicyEnforcement extends ExpandableStringEnum { + /** + * Value indicating the policy is enforced on the volume. + */ + public static final ElasticVolumePolicyEnforcement ENFORCED = fromString("Enforced"); + + /** + * Value indicating the policy is not enforced on the volume. + */ + public static final ElasticVolumePolicyEnforcement NOT_ENFORCED = fromString("NotEnforced"); + + /** + * Creates a new instance of ElasticVolumePolicyEnforcement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticVolumePolicyEnforcement() { + } + + /** + * Creates or finds a ElasticVolumePolicyEnforcement from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticVolumePolicyEnforcement. + */ + public static ElasticVolumePolicyEnforcement fromString(String name) { + return fromString(name, ElasticVolumePolicyEnforcement.class); + } + + /** + * Gets known ElasticVolumePolicyEnforcement values. + * + * @return known ElasticVolumePolicyEnforcement values. + */ + public static Collection values() { + return values(ElasticVolumePolicyEnforcement.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java new file mode 100644 index 000000000000..d4c03bb13886 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volume properties. + */ +@Fluent +public final class ElasticVolumeProperties implements JsonSerializable { + /* + * A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic + * capacity pool. + */ + private String filePath; + + /* + * Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values expressed in + * bytes as multiples of 1 GiB. + */ + private long size; + + /* + * Set of export policy rules + */ + private ElasticExportPolicy exportPolicy; + + /* + * Set of support protocol types for the elastic volume + */ + private List protocolTypes; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Current availability status of the resource. + */ + private ElasticResourceAvailabilityStatus availabilityStatus; + + /* + * Resource identifier used to identify the Elastic Snapshot. + */ + private String snapshotResourceId; + + /* + * List of mount targets that can be used to mount this volume + */ + private List mountTargets; + + /* + * Data protection configuration option for the volume, including snapshot policies and backup. + */ + private ElasticVolumeDataProtectionProperties dataProtection; + + /* + * Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ + private SnapshotDirectoryVisibility snapshotDirectoryVisibility; + + /* + * SMB Properties + */ + private ElasticSmbProperties smbProperties; + + /* + * Resource identifier used to identify the Elastic Backup. + */ + private String backupResourceId; + + /* + * The current state of the restoration process. + */ + private ElasticVolumeRestorationState restorationState; + + /** + * Creates an instance of ElasticVolumeProperties class. + */ + public ElasticVolumeProperties() { + } + + /** + * Get the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @param filePath the filePath value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @param size the size value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public ElasticExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withExportPolicy(ElasticExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of support protocol types for the elastic volume. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of support protocol types for the elastic volume. + * + * @param protocolTypes the protocolTypes value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the availabilityStatus property: Current availability status of the resource. + * + * @return the availabilityStatus value. + */ + public ElasticResourceAvailabilityStatus availabilityStatus() { + return this.availabilityStatus; + } + + /** + * Get the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @return the snapshotResourceId value. + */ + public String snapshotResourceId() { + return this.snapshotResourceId; + } + + /** + * Set the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @param snapshotResourceId the snapshotResourceId value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSnapshotResourceId(String snapshotResourceId) { + this.snapshotResourceId = snapshotResourceId; + return this; + } + + /** + * Get the mountTargets property: List of mount targets that can be used to mount this volume. + * + * @return the mountTargets value. + */ + public List mountTargets() { + return this.mountTargets; + } + + /** + * Get the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @return the dataProtection value. + */ + public ElasticVolumeDataProtectionProperties dataProtection() { + return this.dataProtection; + } + + /** + * Set the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @param dataProtection the dataProtection value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withDataProtection(ElasticVolumeDataProtectionProperties dataProtection) { + this.dataProtection = dataProtection; + return this; + } + + /** + * Get the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @return the snapshotDirectoryVisibility value. + */ + public SnapshotDirectoryVisibility snapshotDirectoryVisibility() { + return this.snapshotDirectoryVisibility; + } + + /** + * Set the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @param snapshotDirectoryVisibility the snapshotDirectoryVisibility value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties + withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility snapshotDirectoryVisibility) { + this.snapshotDirectoryVisibility = snapshotDirectoryVisibility; + return this; + } + + /** + * Get the smbProperties property: SMB Properties. + * + * @return the smbProperties value. + */ + public ElasticSmbProperties smbProperties() { + return this.smbProperties; + } + + /** + * Set the smbProperties property: SMB Properties. + * + * @param smbProperties the smbProperties value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSmbProperties(ElasticSmbProperties smbProperties) { + this.smbProperties = smbProperties; + return this; + } + + /** + * Get the backupResourceId property: Resource identifier used to identify the Elastic Backup. + * + * @return the backupResourceId value. + */ + public String backupResourceId() { + return this.backupResourceId; + } + + /** + * Set the backupResourceId property: Resource identifier used to identify the Elastic Backup. + * + * @param backupResourceId the backupResourceId value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withBackupResourceId(String backupResourceId) { + this.backupResourceId = backupResourceId; + return this; + } + + /** + * Get the restorationState property: The current state of the restoration process. + * + * @return the restorationState value. + */ + public ElasticVolumeRestorationState restorationState() { + return this.restorationState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property filePath in model ElasticVolumeProperties")); + } + if (exportPolicy() != null) { + exportPolicy().validate(); + } + if (protocolTypes() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property protocolTypes in model ElasticVolumeProperties")); + } + if (mountTargets() != null) { + mountTargets().forEach(e -> e.validate()); + } + if (dataProtection() != null) { + dataProtection().validate(); + } + if (smbProperties() != null) { + smbProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumeProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filePath", this.filePath); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeStringField("snapshotResourceId", this.snapshotResourceId); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeStringField("snapshotDirectoryVisibility", + this.snapshotDirectoryVisibility == null ? null : this.snapshotDirectoryVisibility.toString()); + jsonWriter.writeJsonField("smbProperties", this.smbProperties); + jsonWriter.writeStringField("backupResourceId", this.backupResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeProperties. + */ + public static ElasticVolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeProperties deserializedElasticVolumeProperties = new ElasticVolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePath".equals(fieldName)) { + deserializedElasticVolumeProperties.filePath = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedElasticVolumeProperties.size = reader.getLong(); + } else if ("protocolTypes".equals(fieldName)) { + List protocolTypes + = reader.readArray(reader1 -> ElasticProtocolType.fromString(reader1.getString())); + deserializedElasticVolumeProperties.protocolTypes = protocolTypes; + } else if ("exportPolicy".equals(fieldName)) { + deserializedElasticVolumeProperties.exportPolicy = ElasticExportPolicy.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticVolumeProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("availabilityStatus".equals(fieldName)) { + deserializedElasticVolumeProperties.availabilityStatus + = ElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("snapshotResourceId".equals(fieldName)) { + deserializedElasticVolumeProperties.snapshotResourceId = reader.getString(); + } else if ("mountTargets".equals(fieldName)) { + List mountTargets + = reader.readArray(reader1 -> ElasticMountTargetProperties.fromJson(reader1)); + deserializedElasticVolumeProperties.mountTargets = mountTargets; + } else if ("dataProtection".equals(fieldName)) { + deserializedElasticVolumeProperties.dataProtection + = ElasticVolumeDataProtectionProperties.fromJson(reader); + } else if ("snapshotDirectoryVisibility".equals(fieldName)) { + deserializedElasticVolumeProperties.snapshotDirectoryVisibility + = SnapshotDirectoryVisibility.fromString(reader.getString()); + } else if ("smbProperties".equals(fieldName)) { + deserializedElasticVolumeProperties.smbProperties = ElasticSmbProperties.fromJson(reader); + } else if ("backupResourceId".equals(fieldName)) { + deserializedElasticVolumeProperties.backupResourceId = reader.getString(); + } else if ("restorationState".equals(fieldName)) { + deserializedElasticVolumeProperties.restorationState + = ElasticVolumeRestorationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java new file mode 100644 index 000000000000..b6ff08208f5c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current state of the restoration process. + */ +public final class ElasticVolumeRestorationState extends ExpandableStringEnum { + /** + * Value indicating that the volume is currently restoring. + */ + public static final ElasticVolumeRestorationState RESTORING = fromString("Restoring"); + + /** + * Value indicating that the volume is restored. + */ + public static final ElasticVolumeRestorationState RESTORED = fromString("Restored"); + + /** + * Value indicating that the volume restore has failed. + */ + public static final ElasticVolumeRestorationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ElasticVolumeRestorationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticVolumeRestorationState() { + } + + /** + * Creates or finds a ElasticVolumeRestorationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticVolumeRestorationState. + */ + public static ElasticVolumeRestorationState fromString(String name) { + return fromString(name, ElasticVolumeRestorationState.class); + } + + /** + * Gets known ElasticVolumeRestorationState values. + * + * @return known ElasticVolumeRestorationState values. + */ + public static Collection values() { + return values(ElasticVolumeRestorationState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java new file mode 100644 index 000000000000..1f1ec4a9d78e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reverts the elastic volume to the specified snapshot. + */ +@Fluent +public final class ElasticVolumeRevert implements JsonSerializable { + /* + * Resource identifier used to identify the Elastic Snapshot. + */ + private String snapshotResourceId; + + /** + * Creates an instance of ElasticVolumeRevert class. + */ + public ElasticVolumeRevert() { + } + + /** + * Get the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @return the snapshotResourceId value. + */ + public String snapshotResourceId() { + return this.snapshotResourceId; + } + + /** + * Set the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @param snapshotResourceId the snapshotResourceId value to set. + * @return the ElasticVolumeRevert object itself. + */ + public ElasticVolumeRevert withSnapshotResourceId(String snapshotResourceId) { + this.snapshotResourceId = snapshotResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotResourceId", this.snapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeRevert from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeRevert if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeRevert. + */ + public static ElasticVolumeRevert fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeRevert deserializedElasticVolumeRevert = new ElasticVolumeRevert(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotResourceId".equals(fieldName)) { + deserializedElasticVolumeRevert.snapshotResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeRevert; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java new file mode 100644 index 000000000000..204f7885a30c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Volume Snapshot Properties. + */ +@Fluent +public final class ElasticVolumeSnapshotProperties implements JsonSerializable { + /* + * Snapshot Policy ResourceId + */ + private String snapshotPolicyResourceId; + + /** + * Creates an instance of ElasticVolumeSnapshotProperties class. + */ + public ElasticVolumeSnapshotProperties() { + } + + /** + * Get the snapshotPolicyResourceId property: Snapshot Policy ResourceId. + * + * @return the snapshotPolicyResourceId value. + */ + public String snapshotPolicyResourceId() { + return this.snapshotPolicyResourceId; + } + + /** + * Set the snapshotPolicyResourceId property: Snapshot Policy ResourceId. + * + * @param snapshotPolicyResourceId the snapshotPolicyResourceId value to set. + * @return the ElasticVolumeSnapshotProperties object itself. + */ + public ElasticVolumeSnapshotProperties withSnapshotPolicyResourceId(String snapshotPolicyResourceId) { + this.snapshotPolicyResourceId = snapshotPolicyResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotPolicyResourceId", this.snapshotPolicyResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeSnapshotProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeSnapshotProperties. + */ + public static ElasticVolumeSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeSnapshotProperties deserializedElasticVolumeSnapshotProperties + = new ElasticVolumeSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotPolicyResourceId".equals(fieldName)) { + deserializedElasticVolumeSnapshotProperties.snapshotPolicyResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeSnapshotProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java new file mode 100644 index 000000000000..047910d44201 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticVolume. + */ +@Fluent +public final class ElasticVolumeUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticVolumeUpdateProperties properties; + + /** + * Creates an instance of ElasticVolumeUpdate class. + */ + public ElasticVolumeUpdate() { + } + + /** + * 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 ElasticVolumeUpdate object itself. + */ + public ElasticVolumeUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticVolumeUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticVolumeUpdate object itself. + */ + public ElasticVolumeUpdate withProperties(ElasticVolumeUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeUpdate. + */ + public static ElasticVolumeUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeUpdate deserializedElasticVolumeUpdate = new ElasticVolumeUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticVolumeUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticVolumeUpdate.properties = ElasticVolumeUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java new file mode 100644 index 000000000000..49adf76f4df0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticVolume. + */ +@Fluent +public final class ElasticVolumeUpdateProperties implements JsonSerializable { + /* + * Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values expressed in + * bytes as multiples of 1 GiB. + */ + private Long size; + + /* + * Set of export policy rules + */ + private ElasticExportPolicy exportPolicy; + + /* + * Data protection configuration option for the volume, including snapshot policies and backup. + */ + private ElasticVolumeDataProtectionPatchProperties dataProtection; + + /* + * Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ + private SnapshotDirectoryVisibility snapshotDirectoryVisibility; + + /* + * SMB Properties + */ + private ElasticSmbPatchProperties smbProperties; + + /** + * Creates an instance of ElasticVolumeUpdateProperties class. + */ + public ElasticVolumeUpdateProperties() { + } + + /** + * Get the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @param size the size value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public ElasticExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withExportPolicy(ElasticExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @return the dataProtection value. + */ + public ElasticVolumeDataProtectionPatchProperties dataProtection() { + return this.dataProtection; + } + + /** + * Set the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @param dataProtection the dataProtection value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withDataProtection(ElasticVolumeDataProtectionPatchProperties dataProtection) { + this.dataProtection = dataProtection; + return this; + } + + /** + * Get the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @return the snapshotDirectoryVisibility value. + */ + public SnapshotDirectoryVisibility snapshotDirectoryVisibility() { + return this.snapshotDirectoryVisibility; + } + + /** + * Set the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @param snapshotDirectoryVisibility the snapshotDirectoryVisibility value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties + withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility snapshotDirectoryVisibility) { + this.snapshotDirectoryVisibility = snapshotDirectoryVisibility; + return this; + } + + /** + * Get the smbProperties property: SMB Properties. + * + * @return the smbProperties value. + */ + public ElasticSmbPatchProperties smbProperties() { + return this.smbProperties; + } + + /** + * Set the smbProperties property: SMB Properties. + * + * @param smbProperties the smbProperties value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withSmbProperties(ElasticSmbPatchProperties smbProperties) { + this.smbProperties = smbProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exportPolicy() != null) { + exportPolicy().validate(); + } + if (dataProtection() != null) { + dataProtection().validate(); + } + if (smbProperties() != null) { + smbProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeStringField("snapshotDirectoryVisibility", + this.snapshotDirectoryVisibility == null ? null : this.snapshotDirectoryVisibility.toString()); + jsonWriter.writeJsonField("smbProperties", this.smbProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeUpdateProperties. + */ + public static ElasticVolumeUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeUpdateProperties deserializedElasticVolumeUpdateProperties + = new ElasticVolumeUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("exportPolicy".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.exportPolicy = ElasticExportPolicy.fromJson(reader); + } else if ("dataProtection".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.dataProtection + = ElasticVolumeDataProtectionPatchProperties.fromJson(reader); + } else if ("snapshotDirectoryVisibility".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.snapshotDirectoryVisibility + = SnapshotDirectoryVisibility.fromString(reader.getString()); + } else if ("smbProperties".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.smbProperties + = ElasticSmbPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java new file mode 100644 index 000000000000..4d419b26fff6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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 ElasticVolumes. + */ +public interface ElasticVolumes { + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get the details of the specified volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 details of the specified volume. + */ + ElasticVolume get(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName); + + /** + * Delete the specified Elastic Volume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @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 poolName, String volumeName, Context context); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticPool(String resourceGroupName, String accountName, String poolName); + + /** + * List all Elastic Volumes within the Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @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 response of a ElasticVolume list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticPool(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body); + + /** + * Revert an Elastic Volume to the snapshot specified in the body. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param body The content of the action request. + * @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 netApp Elastic Volume resource. + */ + ElasticVolume revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context); + + /** + * Get the details of the specified volume. + * + * @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 details of the specified volume along with {@link Response}. + */ + ElasticVolume getById(String id); + + /** + * Get the details of the specified volume. + * + * @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 details of the specified volume along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Volume. + * + * @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 the specified Elastic Volume. + * + * @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 ElasticVolume resource. + * + * @param name resource name. + * @return the first stage of the new ElasticVolume definition. + */ + ElasticVolume.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfig.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfig.java new file mode 100644 index 000000000000..3c165fdacb65 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfig.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Using AKV config, certificate will be fetched, which will contain private key & public certificate, that + * correspond to the public certificate which is uploaded on the application created by customer. This will be used + * further for authentication. + */ +@Fluent +public final class EntraIdAkvConfig implements JsonSerializable { + /* + * The Azure Key Vault URI where the Entra ID credentials are stored. + */ + private String azureKeyVaultUri; + + /* + * The name of the certificate in Azure Key Vault. + */ + private String certificateName; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of EntraIdAkvConfig class. + */ + public EntraIdAkvConfig() { + } + + /** + * Get the azureKeyVaultUri property: The Azure Key Vault URI where the Entra ID credentials are stored. + * + * @return the azureKeyVaultUri value. + */ + public String azureKeyVaultUri() { + return this.azureKeyVaultUri; + } + + /** + * Set the azureKeyVaultUri property: The Azure Key Vault URI where the Entra ID credentials are stored. + * + * @param azureKeyVaultUri the azureKeyVaultUri value to set. + * @return the EntraIdAkvConfig object itself. + */ + public EntraIdAkvConfig withAzureKeyVaultUri(String azureKeyVaultUri) { + this.azureKeyVaultUri = azureKeyVaultUri; + return this; + } + + /** + * Get the certificateName property: The name of the certificate in Azure Key Vault. + * + * @return the certificateName value. + */ + public String certificateName() { + return this.certificateName; + } + + /** + * Set the certificateName property: The name of the certificate in Azure Key Vault. + * + * @param certificateName the certificateName value to set. + * @return the EntraIdAkvConfig object itself. + */ + public EntraIdAkvConfig withCertificateName(String certificateName) { + this.certificateName = certificateName; + return this; + } + + /** + * Get the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the EntraIdAkvConfig object itself. + */ + public EntraIdAkvConfig withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureKeyVaultUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property azureKeyVaultUri in model EntraIdAkvConfig")); + } + if (certificateName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property certificateName in model EntraIdAkvConfig")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EntraIdAkvConfig.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureKeyVaultUri", this.azureKeyVaultUri); + jsonWriter.writeStringField("certificateName", this.certificateName); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EntraIdAkvConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EntraIdAkvConfig if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EntraIdAkvConfig. + */ + public static EntraIdAkvConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EntraIdAkvConfig deserializedEntraIdAkvConfig = new EntraIdAkvConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureKeyVaultUri".equals(fieldName)) { + deserializedEntraIdAkvConfig.azureKeyVaultUri = reader.getString(); + } else if ("certificateName".equals(fieldName)) { + deserializedEntraIdAkvConfig.certificateName = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedEntraIdAkvConfig.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEntraIdAkvConfig; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfigPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfigPatch.java new file mode 100644 index 000000000000..2689c7d165b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfigPatch.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Entra ID Patch configuration for the account. + */ +@Fluent +public final class EntraIdAkvConfigPatch implements JsonSerializable { + /* + * The Azure Key Vault URI where the Entra ID credentials are stored. + */ + private String azureKeyVaultUri; + + /* + * The name of the certificate in Azure Key Vault. + */ + private String certificateName; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of EntraIdAkvConfigPatch class. + */ + public EntraIdAkvConfigPatch() { + } + + /** + * Get the azureKeyVaultUri property: The Azure Key Vault URI where the Entra ID credentials are stored. + * + * @return the azureKeyVaultUri value. + */ + public String azureKeyVaultUri() { + return this.azureKeyVaultUri; + } + + /** + * Set the azureKeyVaultUri property: The Azure Key Vault URI where the Entra ID credentials are stored. + * + * @param azureKeyVaultUri the azureKeyVaultUri value to set. + * @return the EntraIdAkvConfigPatch object itself. + */ + public EntraIdAkvConfigPatch withAzureKeyVaultUri(String azureKeyVaultUri) { + this.azureKeyVaultUri = azureKeyVaultUri; + return this; + } + + /** + * Get the certificateName property: The name of the certificate in Azure Key Vault. + * + * @return the certificateName value. + */ + public String certificateName() { + return this.certificateName; + } + + /** + * Set the certificateName property: The name of the certificate in Azure Key Vault. + * + * @param certificateName the certificateName value to set. + * @return the EntraIdAkvConfigPatch object itself. + */ + public EntraIdAkvConfigPatch withCertificateName(String certificateName) { + this.certificateName = certificateName; + return this; + } + + /** + * Get the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The ARM resource identifier of the user assigned identity used to + * authenticate with key vault. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the EntraIdAkvConfigPatch object itself. + */ + public EntraIdAkvConfigPatch withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureKeyVaultUri", this.azureKeyVaultUri); + jsonWriter.writeStringField("certificateName", this.certificateName); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EntraIdAkvConfigPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EntraIdAkvConfigPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the EntraIdAkvConfigPatch. + */ + public static EntraIdAkvConfigPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EntraIdAkvConfigPatch deserializedEntraIdAkvConfigPatch = new EntraIdAkvConfigPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureKeyVaultUri".equals(fieldName)) { + deserializedEntraIdAkvConfigPatch.azureKeyVaultUri = reader.getString(); + } else if ("certificateName".equals(fieldName)) { + deserializedEntraIdAkvConfigPatch.certificateName = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedEntraIdAkvConfigPatch.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEntraIdAkvConfigPatch; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfig.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfig.java new file mode 100644 index 000000000000..71777b63ff48 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfig.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Entra ID configuration for the account. + */ +@Fluent +public final class EntraIdConfig implements JsonSerializable { + /* + * ApplicationId of the app created by customer to provide authentication and required API permissions for Microsoft + * Graph endpoint. + */ + private String applicationId; + + /* + * Domain of the Active directory synced to Entra ID for hybrid identities. + */ + private String domain; + + /* + * Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated for SMB share, using this FQDN, SMB + * Share will be mounted on Entra Joined VM. + */ + private String serverNamePrefix; + + /* + * Using AKV config, certificate will be fetched, which will contain private key & public certificate, that + * correspond to the public certificate which is uploaded on the application created by customer. This will be used + * further for authentication. + */ + private EntraIdAkvConfig entraIdAkvConfig; + + /** + * Creates an instance of EntraIdConfig class. + */ + public EntraIdConfig() { + } + + /** + * Get the applicationId property: ApplicationId of the app created by customer to provide authentication and + * required API permissions for Microsoft Graph endpoint. + * + * @return the applicationId value. + */ + public String applicationId() { + return this.applicationId; + } + + /** + * Set the applicationId property: ApplicationId of the app created by customer to provide authentication and + * required API permissions for Microsoft Graph endpoint. + * + * @param applicationId the applicationId value to set. + * @return the EntraIdConfig object itself. + */ + public EntraIdConfig withApplicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Get the domain property: Domain of the Active directory synced to Entra ID for hybrid identities. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Domain of the Active directory synced to Entra ID for hybrid identities. + * + * @param domain the domain value to set. + * @return the EntraIdConfig object itself. + */ + public EntraIdConfig withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the serverNamePrefix property: Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated + * for SMB share, using this FQDN, SMB Share will be mounted on Entra Joined VM. + * + * @return the serverNamePrefix value. + */ + public String serverNamePrefix() { + return this.serverNamePrefix; + } + + /** + * Set the serverNamePrefix property: Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated + * for SMB share, using this FQDN, SMB Share will be mounted on Entra Joined VM. + * + * @param serverNamePrefix the serverNamePrefix value to set. + * @return the EntraIdConfig object itself. + */ + public EntraIdConfig withServerNamePrefix(String serverNamePrefix) { + this.serverNamePrefix = serverNamePrefix; + return this; + } + + /** + * Get the entraIdAkvConfig property: Using AKV config, certificate will be fetched, which will contain private key + * & public certificate, that correspond to the public certificate which is uploaded on the application created + * by customer. This will be used further for authentication. + * + * @return the entraIdAkvConfig value. + */ + public EntraIdAkvConfig entraIdAkvConfig() { + return this.entraIdAkvConfig; + } + + /** + * Set the entraIdAkvConfig property: Using AKV config, certificate will be fetched, which will contain private key + * & public certificate, that correspond to the public certificate which is uploaded on the application created + * by customer. This will be used further for authentication. + * + * @param entraIdAkvConfig the entraIdAkvConfig value to set. + * @return the EntraIdConfig object itself. + */ + public EntraIdConfig withEntraIdAkvConfig(EntraIdAkvConfig entraIdAkvConfig) { + this.entraIdAkvConfig = entraIdAkvConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (applicationId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property applicationId in model EntraIdConfig")); + } + if (domain() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property domain in model EntraIdConfig")); + } + if (serverNamePrefix() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property serverNamePrefix in model EntraIdConfig")); + } + if (entraIdAkvConfig() != null) { + entraIdAkvConfig().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EntraIdConfig.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("applicationId", this.applicationId); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeStringField("serverNamePrefix", this.serverNamePrefix); + jsonWriter.writeJsonField("entraIdAkvConfig", this.entraIdAkvConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EntraIdConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EntraIdConfig if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EntraIdConfig. + */ + public static EntraIdConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EntraIdConfig deserializedEntraIdConfig = new EntraIdConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("applicationId".equals(fieldName)) { + deserializedEntraIdConfig.applicationId = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedEntraIdConfig.domain = reader.getString(); + } else if ("serverNamePrefix".equals(fieldName)) { + deserializedEntraIdConfig.serverNamePrefix = reader.getString(); + } else if ("entraIdAkvConfig".equals(fieldName)) { + deserializedEntraIdConfig.entraIdAkvConfig = EntraIdAkvConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEntraIdConfig; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfigPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfigPatch.java new file mode 100644 index 000000000000..675657764f7d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfigPatch.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Entra ID Patch configuration for the account. + */ +@Fluent +public final class EntraIdConfigPatch implements JsonSerializable { + /* + * ApplicationId of the app created by customer to provide authentication and required API permissions for Microsoft + * Graph endpoint. + */ + private String applicationId; + + /* + * Domain of the Active directory synced to Entra ID for hybrid identities. + */ + private String domain; + + /* + * Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated for SMB share, using this FQDN, SMB + * Share will be mounted on Entra Joined VM. + */ + private String serverNamePrefix; + + /* + * Using AKV config, certificate will be fetched, which will contain private key & public certificate, that + * correspond to the public certificate which is uploaded on the application created by customer. This will be used + * further for authentication. + */ + private EntraIdAkvConfigPatch entraIdAkvConfig; + + /** + * Creates an instance of EntraIdConfigPatch class. + */ + public EntraIdConfigPatch() { + } + + /** + * Get the applicationId property: ApplicationId of the app created by customer to provide authentication and + * required API permissions for Microsoft Graph endpoint. + * + * @return the applicationId value. + */ + public String applicationId() { + return this.applicationId; + } + + /** + * Set the applicationId property: ApplicationId of the app created by customer to provide authentication and + * required API permissions for Microsoft Graph endpoint. + * + * @param applicationId the applicationId value to set. + * @return the EntraIdConfigPatch object itself. + */ + public EntraIdConfigPatch withApplicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Get the domain property: Domain of the Active directory synced to Entra ID for hybrid identities. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Domain of the Active directory synced to Entra ID for hybrid identities. + * + * @param domain the domain value to set. + * @return the EntraIdConfigPatch object itself. + */ + public EntraIdConfigPatch withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the serverNamePrefix property: Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated + * for SMB share, using this FQDN, SMB Share will be mounted on Entra Joined VM. + * + * @return the serverNamePrefix value. + */ + public String serverNamePrefix() { + return this.serverNamePrefix; + } + + /** + * Set the serverNamePrefix property: Using ServerNamePrefix, FQDN (Fully Qualified Domain Name) will be generated + * for SMB share, using this FQDN, SMB Share will be mounted on Entra Joined VM. + * + * @param serverNamePrefix the serverNamePrefix value to set. + * @return the EntraIdConfigPatch object itself. + */ + public EntraIdConfigPatch withServerNamePrefix(String serverNamePrefix) { + this.serverNamePrefix = serverNamePrefix; + return this; + } + + /** + * Get the entraIdAkvConfig property: Using AKV config, certificate will be fetched, which will contain private key + * & public certificate, that correspond to the public certificate which is uploaded on the application created + * by customer. This will be used further for authentication. + * + * @return the entraIdAkvConfig value. + */ + public EntraIdAkvConfigPatch entraIdAkvConfig() { + return this.entraIdAkvConfig; + } + + /** + * Set the entraIdAkvConfig property: Using AKV config, certificate will be fetched, which will contain private key + * & public certificate, that correspond to the public certificate which is uploaded on the application created + * by customer. This will be used further for authentication. + * + * @param entraIdAkvConfig the entraIdAkvConfig value to set. + * @return the EntraIdConfigPatch object itself. + */ + public EntraIdConfigPatch withEntraIdAkvConfig(EntraIdAkvConfigPatch entraIdAkvConfig) { + this.entraIdAkvConfig = entraIdAkvConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (entraIdAkvConfig() != null) { + entraIdAkvConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("applicationId", this.applicationId); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeStringField("serverNamePrefix", this.serverNamePrefix); + jsonWriter.writeJsonField("entraIdAkvConfig", this.entraIdAkvConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EntraIdConfigPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EntraIdConfigPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EntraIdConfigPatch. + */ + public static EntraIdConfigPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EntraIdConfigPatch deserializedEntraIdConfigPatch = new EntraIdConfigPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("applicationId".equals(fieldName)) { + deserializedEntraIdConfigPatch.applicationId = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedEntraIdConfigPatch.domain = reader.getString(); + } else if ("serverNamePrefix".equals(fieldName)) { + deserializedEntraIdConfigPatch.serverNamePrefix = reader.getString(); + } else if ("entraIdAkvConfig".equals(fieldName)) { + deserializedEntraIdConfigPatch.entraIdAkvConfig = EntraIdAkvConfigPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEntraIdConfigPatch; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java new file mode 100644 index 000000000000..7f151ae470b7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created with standard + * configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB with + * cool access enabled, + * delivering higher capacity limit with lower costs. + */ +public final class LargeVolumeType extends ExpandableStringEnum { + /** + * The large volume is created with standard configuration that provides standard performance and throughput. + */ + public static final LargeVolumeType LARGE_VOLUME = fromString("LargeVolume"); + + /** + * The extra large volume is created with higher volume capacity limit 7.2PiB with cool access enabled, delivering + * higher capacity limit with lower costs. + */ + public static final LargeVolumeType EXTRA_LARGE_VOLUME7DOT2PIB = fromString("PremExtraLargeVolume7Dot2PiB"); + + /** + * Creates a new instance of LargeVolumeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LargeVolumeType() { + } + + /** + * Creates or finds a LargeVolumeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LargeVolumeType. + */ + public static LargeVolumeType fromString(String name) { + return fromString(name, LargeVolumeType.class); + } + + /** + * Gets known LargeVolumeType values. + * + * @return known LargeVolumeType values. + */ + public static Collection values() { + return values(LargeVolumeType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java new file mode 100644 index 000000000000..a30c1be25f4a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java @@ -0,0 +1,456 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * LDAP configuration. + */ +@Fluent +public final class LdapConfiguration implements JsonSerializable { + /* + * Name of the LDAP configuration domain + */ + private String domain; + + /* + * List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + */ + private List ldapServers; + + /* + * Specifies whether or not the LDAP traffic needs to be secured via TLS. + */ + private Boolean ldapOverTLS; + + /* + * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA + * certificate. + */ + private String serverCACertificate; + + /* + * The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS + * host entry. + */ + private String certificateCNHost; + + /* + * List of DNS server IPv4 addresses for resolving the CN host certificate. This parameter is used when LDAP over + * TLS is enabled. + */ + private List dnsServers; + + /* + * Port number for LDAP communication. Default is 389 for LDAP. + */ + private Integer ldapPort; + + /* + * This specifies the user DN (Distinguished Name), which overrides the base DN for user lookups. + */ + private String userDN; + + /* + * This specifies the group DN (Distinguished Name), which overrides the base DN for group lookups. + */ + private String groupDN; + + /* + * This specifies the netgroup DN (Distinguished Name), which overrides the base DN for netgroup lookups. + */ + private String netGroupDN; + + /* + * The authentication level to use when binding to the LDAP server, defaults to Anonymous. + */ + private BindAuthenticationLevel bindAuthenticationLevel; + + /* + * The distinguished name (DN) to bind as when performing LDAP operations. + */ + private String bindDN; + + /* + * The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is stored. + */ + private BindPasswordAkvConfig bindPasswordAkvConfig; + + /** + * Creates an instance of LdapConfiguration class. + */ + public LdapConfiguration() { + } + + /** + * Get the domain property: Name of the LDAP configuration domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the LDAP configuration domain. + * + * @param domain the domain value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @return the ldapServers value. + */ + public List ldapServers() { + return this.ldapServers; + } + + /** + * Set the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @param ldapServers the ldapServers value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapServers(List ldapServers) { + this.ldapServers = ldapServers; + return this; + } + + /** + * Get the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @return the ldapOverTLS value. + */ + public Boolean ldapOverTLS() { + return this.ldapOverTLS; + } + + /** + * Set the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @param ldapOverTLS the ldapOverTLS value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapOverTLS(Boolean ldapOverTLS) { + this.ldapOverTLS = ldapOverTLS; + return this; + } + + /** + * Get the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @return the serverCACertificate value. + */ + public String serverCACertificate() { + return this.serverCACertificate; + } + + /** + * Set the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @param serverCACertificate the serverCACertificate value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withServerCACertificate(String serverCACertificate) { + this.serverCACertificate = serverCACertificate; + return this; + } + + /** + * Get the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @return the certificateCNHost value. + */ + public String certificateCNHost() { + return this.certificateCNHost; + } + + /** + * Set the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @param certificateCNHost the certificateCNHost value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withCertificateCNHost(String certificateCNHost) { + this.certificateCNHost = certificateCNHost; + return this; + } + + /** + * Get the dnsServers property: List of DNS server IPv4 addresses for resolving the CN host certificate. This + * parameter is used when LDAP over TLS is enabled. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: List of DNS server IPv4 addresses for resolving the CN host certificate. This + * parameter is used when LDAP over TLS is enabled. + * + * @param dnsServers the dnsServers value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get the ldapPort property: Port number for LDAP communication. Default is 389 for LDAP. + * + * @return the ldapPort value. + */ + public Integer ldapPort() { + return this.ldapPort; + } + + /** + * Set the ldapPort property: Port number for LDAP communication. Default is 389 for LDAP. + * + * @param ldapPort the ldapPort value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapPort(Integer ldapPort) { + this.ldapPort = ldapPort; + return this; + } + + /** + * Get the userDN property: This specifies the user DN (Distinguished Name), which overrides the base DN for user + * lookups. + * + * @return the userDN value. + */ + public String userDN() { + return this.userDN; + } + + /** + * Set the userDN property: This specifies the user DN (Distinguished Name), which overrides the base DN for user + * lookups. + * + * @param userDN the userDN value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withUserDN(String userDN) { + this.userDN = userDN; + return this; + } + + /** + * Get the groupDN property: This specifies the group DN (Distinguished Name), which overrides the base DN for group + * lookups. + * + * @return the groupDN value. + */ + public String groupDN() { + return this.groupDN; + } + + /** + * Set the groupDN property: This specifies the group DN (Distinguished Name), which overrides the base DN for group + * lookups. + * + * @param groupDN the groupDN value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withGroupDN(String groupDN) { + this.groupDN = groupDN; + return this; + } + + /** + * Get the netGroupDN property: This specifies the netgroup DN (Distinguished Name), which overrides the base DN for + * netgroup lookups. + * + * @return the netGroupDN value. + */ + public String netGroupDN() { + return this.netGroupDN; + } + + /** + * Set the netGroupDN property: This specifies the netgroup DN (Distinguished Name), which overrides the base DN for + * netgroup lookups. + * + * @param netGroupDN the netGroupDN value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withNetGroupDN(String netGroupDN) { + this.netGroupDN = netGroupDN; + return this; + } + + /** + * Get the bindAuthenticationLevel property: The authentication level to use when binding to the LDAP server, + * defaults to Anonymous. + * + * @return the bindAuthenticationLevel value. + */ + public BindAuthenticationLevel bindAuthenticationLevel() { + return this.bindAuthenticationLevel; + } + + /** + * Set the bindAuthenticationLevel property: The authentication level to use when binding to the LDAP server, + * defaults to Anonymous. + * + * @param bindAuthenticationLevel the bindAuthenticationLevel value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withBindAuthenticationLevel(BindAuthenticationLevel bindAuthenticationLevel) { + this.bindAuthenticationLevel = bindAuthenticationLevel; + return this; + } + + /** + * Get the bindDN property: The distinguished name (DN) to bind as when performing LDAP operations. + * + * @return the bindDN value. + */ + public String bindDN() { + return this.bindDN; + } + + /** + * Set the bindDN property: The distinguished name (DN) to bind as when performing LDAP operations. + * + * @param bindDN the bindDN value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withBindDN(String bindDN) { + this.bindDN = bindDN; + return this; + } + + /** + * Get the bindPasswordAkvConfig property: The Azure Key Vault configuration where the Bind DN (Distinguished Name) + * user password is stored. + * + * @return the bindPasswordAkvConfig value. + */ + public BindPasswordAkvConfig bindPasswordAkvConfig() { + return this.bindPasswordAkvConfig; + } + + /** + * Set the bindPasswordAkvConfig property: The Azure Key Vault configuration where the Bind DN (Distinguished Name) + * user password is stored. + * + * @param bindPasswordAkvConfig the bindPasswordAkvConfig value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withBindPasswordAkvConfig(BindPasswordAkvConfig bindPasswordAkvConfig) { + this.bindPasswordAkvConfig = bindPasswordAkvConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bindPasswordAkvConfig() != null) { + bindPasswordAkvConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeArrayField("ldapServers", this.ldapServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("ldapOverTLS", this.ldapOverTLS); + jsonWriter.writeStringField("serverCACertificate", this.serverCACertificate); + jsonWriter.writeStringField("certificateCNHost", this.certificateCNHost); + jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("ldapPort", this.ldapPort); + jsonWriter.writeStringField("userDN", this.userDN); + jsonWriter.writeStringField("groupDN", this.groupDN); + jsonWriter.writeStringField("netGroupDN", this.netGroupDN); + jsonWriter.writeStringField("bindAuthenticationLevel", + this.bindAuthenticationLevel == null ? null : this.bindAuthenticationLevel.toString()); + jsonWriter.writeStringField("bindDN", this.bindDN); + jsonWriter.writeJsonField("bindPasswordAkvConfig", this.bindPasswordAkvConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LdapConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LdapConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LdapConfiguration. + */ + public static LdapConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LdapConfiguration deserializedLdapConfiguration = new LdapConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domain".equals(fieldName)) { + deserializedLdapConfiguration.domain = reader.getString(); + } else if ("ldapServers".equals(fieldName)) { + List ldapServers = reader.readArray(reader1 -> reader1.getString()); + deserializedLdapConfiguration.ldapServers = ldapServers; + } else if ("ldapOverTLS".equals(fieldName)) { + deserializedLdapConfiguration.ldapOverTLS = reader.getNullable(JsonReader::getBoolean); + } else if ("serverCACertificate".equals(fieldName)) { + deserializedLdapConfiguration.serverCACertificate = reader.getString(); + } else if ("certificateCNHost".equals(fieldName)) { + deserializedLdapConfiguration.certificateCNHost = reader.getString(); + } else if ("dnsServers".equals(fieldName)) { + List dnsServers = reader.readArray(reader1 -> reader1.getString()); + deserializedLdapConfiguration.dnsServers = dnsServers; + } else if ("ldapPort".equals(fieldName)) { + deserializedLdapConfiguration.ldapPort = reader.getNullable(JsonReader::getInt); + } else if ("userDN".equals(fieldName)) { + deserializedLdapConfiguration.userDN = reader.getString(); + } else if ("groupDN".equals(fieldName)) { + deserializedLdapConfiguration.groupDN = reader.getString(); + } else if ("netGroupDN".equals(fieldName)) { + deserializedLdapConfiguration.netGroupDN = reader.getString(); + } else if ("bindAuthenticationLevel".equals(fieldName)) { + deserializedLdapConfiguration.bindAuthenticationLevel + = BindAuthenticationLevel.fromString(reader.getString()); + } else if ("bindDN".equals(fieldName)) { + deserializedLdapConfiguration.bindDN = reader.getString(); + } else if ("bindPasswordAkvConfig".equals(fieldName)) { + deserializedLdapConfiguration.bindPasswordAkvConfig = BindPasswordAkvConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLdapConfiguration; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfigurationPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfigurationPatch.java new file mode 100644 index 000000000000..a14ba4df349a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfigurationPatch.java @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * LDAP configuration for PATCH operations (no default values). + */ +@Fluent +public final class LdapConfigurationPatch implements JsonSerializable { + /* + * Name of the LDAP configuration domain + */ + private String domain; + + /* + * List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + */ + private List ldapServers; + + /* + * Specifies whether or not the LDAP traffic needs to be secured via TLS. + */ + private Boolean ldapOverTLS; + + /* + * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA + * certificate. + */ + private String serverCACertificate; + + /* + * The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS + * host entry. + */ + private String certificateCNHost; + + /* + * List of DNS server IPv4 addresses for resolving the CN host certificate. This parameter is used when LDAP over + * TLS is enabled. + */ + private List dnsServers; + + /* + * Port number for LDAP communication. Default is 389 for LDAP. + */ + private Integer ldapPort; + + /* + * This specifies the user DN (Distinguished Name), which overrides the base DN for user lookups. + */ + private String userDN; + + /* + * This specifies the group DN (Distinguished Name), which overrides the base DN for group lookups. + */ + private String groupDN; + + /* + * This specifies the netgroup DN (Distinguished Name), which overrides the base DN for netgroup lookups. + */ + private String netGroupDN; + + /* + * The authentication level to use when binding to the LDAP server, defaults to Anonymous. + */ + private BindAuthenticationLevel bindAuthenticationLevel; + + /* + * The distinguished name (DN) to bind as when performing LDAP operations. + */ + private String bindDN; + + /* + * The Azure Key Vault configuration where the Bind DN (Distinguished Name) user password is stored. + */ + private BindPasswordAkvConfigPatch bindPasswordAkvConfig; + + /** + * Creates an instance of LdapConfigurationPatch class. + */ + public LdapConfigurationPatch() { + } + + /** + * Get the domain property: Name of the LDAP configuration domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the LDAP configuration domain. + * + * @param domain the domain value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @return the ldapServers value. + */ + public List ldapServers() { + return this.ldapServers; + } + + /** + * Set the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @param ldapServers the ldapServers value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withLdapServers(List ldapServers) { + this.ldapServers = ldapServers; + return this; + } + + /** + * Get the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @return the ldapOverTLS value. + */ + public Boolean ldapOverTLS() { + return this.ldapOverTLS; + } + + /** + * Set the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @param ldapOverTLS the ldapOverTLS value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withLdapOverTLS(Boolean ldapOverTLS) { + this.ldapOverTLS = ldapOverTLS; + return this; + } + + /** + * Get the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @return the serverCACertificate value. + */ + public String serverCACertificate() { + return this.serverCACertificate; + } + + /** + * Set the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @param serverCACertificate the serverCACertificate value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withServerCACertificate(String serverCACertificate) { + this.serverCACertificate = serverCACertificate; + return this; + } + + /** + * Get the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @return the certificateCNHost value. + */ + public String certificateCNHost() { + return this.certificateCNHost; + } + + /** + * Set the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @param certificateCNHost the certificateCNHost value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withCertificateCNHost(String certificateCNHost) { + this.certificateCNHost = certificateCNHost; + return this; + } + + /** + * Get the dnsServers property: List of DNS server IPv4 addresses for resolving the CN host certificate. This + * parameter is used when LDAP over TLS is enabled. + * + * @return the dnsServers value. + */ + public List dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: List of DNS server IPv4 addresses for resolving the CN host certificate. This + * parameter is used when LDAP over TLS is enabled. + * + * @param dnsServers the dnsServers value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withDnsServers(List dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get the ldapPort property: Port number for LDAP communication. Default is 389 for LDAP. + * + * @return the ldapPort value. + */ + public Integer ldapPort() { + return this.ldapPort; + } + + /** + * Set the ldapPort property: Port number for LDAP communication. Default is 389 for LDAP. + * + * @param ldapPort the ldapPort value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withLdapPort(Integer ldapPort) { + this.ldapPort = ldapPort; + return this; + } + + /** + * Get the userDN property: This specifies the user DN (Distinguished Name), which overrides the base DN for user + * lookups. + * + * @return the userDN value. + */ + public String userDN() { + return this.userDN; + } + + /** + * Set the userDN property: This specifies the user DN (Distinguished Name), which overrides the base DN for user + * lookups. + * + * @param userDN the userDN value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withUserDN(String userDN) { + this.userDN = userDN; + return this; + } + + /** + * Get the groupDN property: This specifies the group DN (Distinguished Name), which overrides the base DN for group + * lookups. + * + * @return the groupDN value. + */ + public String groupDN() { + return this.groupDN; + } + + /** + * Set the groupDN property: This specifies the group DN (Distinguished Name), which overrides the base DN for group + * lookups. + * + * @param groupDN the groupDN value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withGroupDN(String groupDN) { + this.groupDN = groupDN; + return this; + } + + /** + * Get the netGroupDN property: This specifies the netgroup DN (Distinguished Name), which overrides the base DN for + * netgroup lookups. + * + * @return the netGroupDN value. + */ + public String netGroupDN() { + return this.netGroupDN; + } + + /** + * Set the netGroupDN property: This specifies the netgroup DN (Distinguished Name), which overrides the base DN for + * netgroup lookups. + * + * @param netGroupDN the netGroupDN value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withNetGroupDN(String netGroupDN) { + this.netGroupDN = netGroupDN; + return this; + } + + /** + * Get the bindAuthenticationLevel property: The authentication level to use when binding to the LDAP server, + * defaults to Anonymous. + * + * @return the bindAuthenticationLevel value. + */ + public BindAuthenticationLevel bindAuthenticationLevel() { + return this.bindAuthenticationLevel; + } + + /** + * Set the bindAuthenticationLevel property: The authentication level to use when binding to the LDAP server, + * defaults to Anonymous. + * + * @param bindAuthenticationLevel the bindAuthenticationLevel value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withBindAuthenticationLevel(BindAuthenticationLevel bindAuthenticationLevel) { + this.bindAuthenticationLevel = bindAuthenticationLevel; + return this; + } + + /** + * Get the bindDN property: The distinguished name (DN) to bind as when performing LDAP operations. + * + * @return the bindDN value. + */ + public String bindDN() { + return this.bindDN; + } + + /** + * Set the bindDN property: The distinguished name (DN) to bind as when performing LDAP operations. + * + * @param bindDN the bindDN value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withBindDN(String bindDN) { + this.bindDN = bindDN; + return this; + } + + /** + * Get the bindPasswordAkvConfig property: The Azure Key Vault configuration where the Bind DN (Distinguished Name) + * user password is stored. + * + * @return the bindPasswordAkvConfig value. + */ + public BindPasswordAkvConfigPatch bindPasswordAkvConfig() { + return this.bindPasswordAkvConfig; + } + + /** + * Set the bindPasswordAkvConfig property: The Azure Key Vault configuration where the Bind DN (Distinguished Name) + * user password is stored. + * + * @param bindPasswordAkvConfig the bindPasswordAkvConfig value to set. + * @return the LdapConfigurationPatch object itself. + */ + public LdapConfigurationPatch withBindPasswordAkvConfig(BindPasswordAkvConfigPatch bindPasswordAkvConfig) { + this.bindPasswordAkvConfig = bindPasswordAkvConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (bindPasswordAkvConfig() != null) { + bindPasswordAkvConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeArrayField("ldapServers", this.ldapServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("ldapOverTLS", this.ldapOverTLS); + jsonWriter.writeStringField("serverCACertificate", this.serverCACertificate); + jsonWriter.writeStringField("certificateCNHost", this.certificateCNHost); + jsonWriter.writeArrayField("dnsServers", this.dnsServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("ldapPort", this.ldapPort); + jsonWriter.writeStringField("userDN", this.userDN); + jsonWriter.writeStringField("groupDN", this.groupDN); + jsonWriter.writeStringField("netGroupDN", this.netGroupDN); + jsonWriter.writeStringField("bindAuthenticationLevel", + this.bindAuthenticationLevel == null ? null : this.bindAuthenticationLevel.toString()); + jsonWriter.writeStringField("bindDN", this.bindDN); + jsonWriter.writeJsonField("bindPasswordAkvConfig", this.bindPasswordAkvConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LdapConfigurationPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LdapConfigurationPatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the LdapConfigurationPatch. + */ + public static LdapConfigurationPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LdapConfigurationPatch deserializedLdapConfigurationPatch = new LdapConfigurationPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domain".equals(fieldName)) { + deserializedLdapConfigurationPatch.domain = reader.getString(); + } else if ("ldapServers".equals(fieldName)) { + List ldapServers = reader.readArray(reader1 -> reader1.getString()); + deserializedLdapConfigurationPatch.ldapServers = ldapServers; + } else if ("ldapOverTLS".equals(fieldName)) { + deserializedLdapConfigurationPatch.ldapOverTLS = reader.getNullable(JsonReader::getBoolean); + } else if ("serverCACertificate".equals(fieldName)) { + deserializedLdapConfigurationPatch.serverCACertificate = reader.getString(); + } else if ("certificateCNHost".equals(fieldName)) { + deserializedLdapConfigurationPatch.certificateCNHost = reader.getString(); + } else if ("dnsServers".equals(fieldName)) { + List dnsServers = reader.readArray(reader1 -> reader1.getString()); + deserializedLdapConfigurationPatch.dnsServers = dnsServers; + } else if ("ldapPort".equals(fieldName)) { + deserializedLdapConfigurationPatch.ldapPort = reader.getNullable(JsonReader::getInt); + } else if ("userDN".equals(fieldName)) { + deserializedLdapConfigurationPatch.userDN = reader.getString(); + } else if ("groupDN".equals(fieldName)) { + deserializedLdapConfigurationPatch.groupDN = reader.getString(); + } else if ("netGroupDN".equals(fieldName)) { + deserializedLdapConfigurationPatch.netGroupDN = reader.getString(); + } else if ("bindAuthenticationLevel".equals(fieldName)) { + deserializedLdapConfigurationPatch.bindAuthenticationLevel + = BindAuthenticationLevel.fromString(reader.getString()); + } else if ("bindDN".equals(fieldName)) { + deserializedLdapConfigurationPatch.bindDN = reader.getString(); + } else if ("bindPasswordAkvConfig".equals(fieldName)) { + deserializedLdapConfigurationPatch.bindPasswordAkvConfig + = BindPasswordAkvConfigPatch.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLdapConfigurationPatch; + }); + } +} 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 9f44d1a824dc..f409eec12429 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 @@ -88,6 +88,13 @@ public interface NetAppAccount { */ List activeDirectories(); + /** + * Gets the entraIdConfig property: Entra ID configuration for the account. + * + * @return the entraIdConfig value. + */ + EntraIdConfig entraIdConfig(); + /** * Gets the encryption property: Encryption settings. * @@ -118,6 +125,13 @@ public interface NetAppAccount { */ MultiAdStatus multiAdStatus(); + /** + * Gets the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + LdapConfiguration ldapConfiguration(); + /** * Gets the region of the resource. * @@ -201,9 +215,9 @@ 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.WithEntraIdConfig, DefinitionStages.WithEncryption, + DefinitionStages.WithNfsV4IdDomain, DefinitionStages.WithLdapConfiguration { /** * Executes the create request. * @@ -259,6 +273,19 @@ interface WithActiveDirectories { WithCreate withActiveDirectories(List activeDirectories); } + /** + * The stage of the NetAppAccount definition allowing to specify entraIdConfig. + */ + interface WithEntraIdConfig { + /** + * Specifies the entraIdConfig property: Entra ID configuration for the account.. + * + * @param entraIdConfig Entra ID configuration for the account. + * @return the next definition stage. + */ + WithCreate withEntraIdConfig(EntraIdConfig entraIdConfig); + } + /** * The stage of the NetAppAccount definition allowing to specify encryption. */ @@ -286,6 +313,19 @@ interface WithNfsV4IdDomain { */ WithCreate withNfsV4IdDomain(String nfsV4IdDomain); } + + /** + * The stage of the NetAppAccount definition allowing to specify ldapConfiguration. + */ + interface WithLdapConfiguration { + /** + * Specifies the ldapConfiguration property: LDAP Configuration for the account.. + * + * @param ldapConfiguration LDAP Configuration for the account. + * @return the next definition stage. + */ + WithCreate withLdapConfiguration(LdapConfiguration ldapConfiguration); + } } /** @@ -299,7 +339,8 @@ interface WithNfsV4IdDomain { * The template for NetAppAccount update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithActiveDirectories, - UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain { + UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain, UpdateStages.WithEntraIdConfig, + UpdateStages.WithLdapConfiguration { /** * Executes the update request. * @@ -325,7 +366,7 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags. + * Specifies the tags property: Resource tags.. * * @param tags Resource tags. * @return the next definition stage. @@ -338,9 +379,9 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity used for the resource.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity used for the resource. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ Update withIdentity(ManagedServiceIdentity identity); @@ -386,6 +427,32 @@ interface WithNfsV4IdDomain { */ Update withNfsV4IdDomain(String nfsV4IdDomain); } + + /** + * The stage of the NetAppAccount update allowing to specify entraIdConfig. + */ + interface WithEntraIdConfig { + /** + * Specifies the entraIdConfig property: Entra ID configuration for the account.. + * + * @param entraIdConfig Entra ID configuration for the account. + * @return the next definition stage. + */ + Update withEntraIdConfig(EntraIdConfigPatch entraIdConfig); + } + + /** + * The stage of the NetAppAccount update allowing to specify ldapConfiguration. + */ + interface WithLdapConfiguration { + /** + * Specifies the ldapConfiguration property: LDAP Configuration for the account.. + * + * @param ldapConfiguration LDAP Configuration for the account. + * @return the next definition stage. + */ + Update withLdapConfiguration(LdapConfigurationPatch ldapConfiguration); + } } /** @@ -488,4 +555,22 @@ interface WithNfsV4IdDomain { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void changeKeyVault(ChangeKeyVault body, Context context); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key Vault. + * + * @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 refreshLdapBindPassword(); + + /** + * Refresh LDAP Bind DN password by fetching the latest password from Azure Key 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 refreshLdapBindPassword(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 4759d24a74b2..1e6523ddda74 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 @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.netapp.fluent.models.AccountProperties; +import com.azure.resourcemanager.netapp.fluent.models.AccountPropertiesPatch; import java.io.IOException; import java.util.List; import java.util.Map; @@ -20,39 +20,19 @@ @Fluent public final class NetAppAccountPatch implements JsonSerializable { /* - * Resource location + * The managed service identities assigned to this resource. */ - private String location; - - /* - * Resource Id - */ - private String id; - - /* - * Resource name - */ - private String name; - - /* - * Resource type - */ - private String type; + private ManagedServiceIdentity identity; /* - * Resource tags + * Resource tags. */ private Map tags; /* * NetApp Account properties */ - private AccountProperties innerProperties; - - /* - * The identity used for the resource. - */ - private ManagedServiceIdentity identity; + private AccountPropertiesPatch innerProperties; /** * Creates an instance of NetAppAccountPatch class. @@ -61,52 +41,25 @@ public NetAppAccountPatch() { } /** - * Get the location property: Resource location. + * Get the identity property: The managed service identities assigned to this resource. * - * @return the location value. + * @return the identity value. */ - public String location() { - return this.location; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the location property: Resource location. + * Set the identity property: The managed service identities assigned to this resource. * - * @param location the location value to set. + * @param identity the identity value to set. * @return the NetAppAccountPatch object itself. */ - public NetAppAccountPatch withLocation(String location) { - this.location = location; + public NetAppAccountPatch withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } - /** - * Get the id property: Resource Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - /** * Get the tags property: Resource tags. * @@ -132,39 +85,10 @@ public NetAppAccountPatch withTags(Map tags) { * * @return the innerProperties value. */ - private AccountProperties innerProperties() { + private AccountPropertiesPatch innerProperties() { return this.innerProperties; } - /** - * Get the identity property: The identity used for the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity used for the resource. - * - * @param identity the identity value to set. - * @return the NetAppAccountPatch object itself. - */ - public NetAppAccountPatch withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the provisioningState property: Azure lifecycle management. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - /** * Get the activeDirectories property: Active Directories. * @@ -182,7 +106,7 @@ public List activeDirectories() { */ public NetAppAccountPatch withActiveDirectories(List activeDirectories) { if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); + this.innerProperties = new AccountPropertiesPatch(); } this.innerProperties().withActiveDirectories(activeDirectories); return this; @@ -205,22 +129,12 @@ public AccountEncryption encryption() { */ public NetAppAccountPatch withEncryption(AccountEncryption encryption) { if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); + this.innerProperties = new AccountPropertiesPatch(); } this.innerProperties().withEncryption(encryption); return this; } - /** - * Get the disableShowmount property: Shows the status of disableShowmount for all volumes under the subscription, - * null equals false. - * - * @return the disableShowmount value. - */ - 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. @@ -240,19 +154,56 @@ public String nfsV4IdDomain() { */ public NetAppAccountPatch withNfsV4IdDomain(String nfsV4IdDomain) { if (this.innerProperties() == null) { - this.innerProperties = new AccountProperties(); + this.innerProperties = new AccountPropertiesPatch(); } this.innerProperties().withNfsV4IdDomain(nfsV4IdDomain); return this; } /** - * Get the multiAdStatus property: MultiAD Status for the account. + * Get the entraIdConfig property: Entra ID configuration for the account. + * + * @return the entraIdConfig value. + */ + public EntraIdConfigPatch entraIdConfig() { + return this.innerProperties() == null ? null : this.innerProperties().entraIdConfig(); + } + + /** + * Set the entraIdConfig property: Entra ID configuration for the account. + * + * @param entraIdConfig the entraIdConfig value to set. + * @return the NetAppAccountPatch object itself. + */ + public NetAppAccountPatch withEntraIdConfig(EntraIdConfigPatch entraIdConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountPropertiesPatch(); + } + this.innerProperties().withEntraIdConfig(entraIdConfig); + return this; + } + + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfigurationPatch ldapConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().ldapConfiguration(); + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. * - * @return the multiAdStatus value. + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the NetAppAccountPatch object itself. */ - public MultiAdStatus multiAdStatus() { - return this.innerProperties() == null ? null : this.innerProperties().multiAdStatus(); + public NetAppAccountPatch withLdapConfiguration(LdapConfigurationPatch ldapConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountPropertiesPatch(); + } + this.innerProperties().withLdapConfiguration(ldapConfiguration); + return this; } /** @@ -261,12 +212,12 @@ public MultiAdStatus multiAdStatus() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } /** @@ -275,10 +226,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -297,21 +247,13 @@ public static NetAppAccountPatch fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("location".equals(fieldName)) { - deserializedNetAppAccountPatch.location = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedNetAppAccountPatch.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedNetAppAccountPatch.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNetAppAccountPatch.type = reader.getString(); + if ("identity".equals(fieldName)) { + deserializedNetAppAccountPatch.identity = ManagedServiceIdentity.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNetAppAccountPatch.tags = tags; } else if ("properties".equals(fieldName)) { - deserializedNetAppAccountPatch.innerProperties = AccountProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedNetAppAccountPatch.identity = ManagedServiceIdentity.fromJson(reader); + deserializedNetAppAccountPatch.innerProperties = AccountPropertiesPatch.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java new file mode 100644 index 000000000000..f787817200bd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy status. + */ +public final class PolicyStatus extends ExpandableStringEnum { + /** + * Value indicating the policy is enabled. + */ + public static final PolicyStatus ENABLED = fromString("Enabled"); + + /** + * Value indicating the policy is disabled. + */ + public static final PolicyStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PolicyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyStatus() { + } + + /** + * Creates or finds a PolicyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyStatus. + */ + public static PolicyStatus fromString(String name) { + return fromString(name, PolicyStatus.class); + } + + /** + * Gets known PolicyStatus values. + * + * @return known PolicyStatus values. + */ + public static Collection values() { + return values(PolicyStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java new file mode 100644 index 000000000000..c8074d6214cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Access password from Azure KeyVault Secrets to connect Active Directory. + */ +@Fluent +public final class SecretPassword implements JsonSerializable { + /* + * Properties provided by KeyVault. + */ + private SecretPasswordKeyVaultProperties keyVaultProperties; + + /* + * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private SecretPasswordIdentity identity; + + /** + * Creates an instance of SecretPassword class. + */ + public SecretPassword() { + } + + /** + * Get the keyVaultProperties property: Properties provided by KeyVault. + * + * @return the keyVaultProperties value. + */ + public SecretPasswordKeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Properties provided by KeyVault. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the SecretPassword object itself. + */ + public SecretPassword withKeyVaultProperties(SecretPasswordKeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the identity value. + */ + public SecretPasswordIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param identity the identity value to set. + * @return the SecretPassword object itself. + */ + public SecretPassword withIdentity(SecretPasswordIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPassword from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPassword if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretPassword. + */ + public static SecretPassword fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPassword deserializedSecretPassword = new SecretPassword(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultProperties".equals(fieldName)) { + deserializedSecretPassword.keyVaultProperties = SecretPasswordKeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedSecretPassword.identity = SecretPasswordIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPassword; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java new file mode 100644 index 000000000000..142d0abf11dd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identity used to authenticate with key vault. + */ +@Fluent +public final class SecretPasswordIdentity implements JsonSerializable { + /* + * The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + */ + private String principalId; + + /* + * The Azure resource identifier of the user assigned identity used to authenticate with key vault. Applicable if + * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of SecretPasswordIdentity class. + */ + public SecretPasswordIdentity() { + } + + /** + * Get the principalId property: The principal ID (object ID) of the identity used to authenticate with key vault. + * Read-only. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the userAssignedIdentity property: The Azure resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The Azure resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the SecretPasswordIdentity object itself. + */ + public SecretPasswordIdentity withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPasswordIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPasswordIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretPasswordIdentity. + */ + public static SecretPasswordIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPasswordIdentity deserializedSecretPasswordIdentity = new SecretPasswordIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedSecretPasswordIdentity.principalId = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedSecretPasswordIdentity.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPasswordIdentity; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java new file mode 100644 index 000000000000..d61ec62ff020 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of key vault to get the secrets for password. + */ +@Fluent +public final class SecretPasswordKeyVaultProperties implements JsonSerializable { + /* + * The Uri of KeyVault. + */ + private String keyVaultUri; + + /* + * The name of KeyVault password secret. + */ + private String secretName; + + /** + * Creates an instance of SecretPasswordKeyVaultProperties class. + */ + public SecretPasswordKeyVaultProperties() { + } + + /** + * Get the keyVaultUri property: The Uri of KeyVault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the SecretPasswordKeyVaultProperties object itself. + */ + public SecretPasswordKeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of KeyVault password secret. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of KeyVault password secret. + * + * @param secretName the secretName value to set. + * @return the SecretPasswordKeyVaultProperties object itself. + */ + public SecretPasswordKeyVaultProperties withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultUri in model SecretPasswordKeyVaultProperties")); + } + if (secretName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretName in model SecretPasswordKeyVaultProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecretPasswordKeyVaultProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPasswordKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPasswordKeyVaultProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecretPasswordKeyVaultProperties. + */ + public static SecretPasswordKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPasswordKeyVaultProperties deserializedSecretPasswordKeyVaultProperties + = new SecretPasswordKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedSecretPasswordKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedSecretPasswordKeyVaultProperties.secretName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPasswordKeyVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java new file mode 100644 index 000000000000..ea3a485321db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Controls the visibility of the Elastic Volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ +public final class SnapshotDirectoryVisibility extends ExpandableStringEnum { + /** + * Value indicating the read-only snapshot directory is not visible. + */ + public static final SnapshotDirectoryVisibility HIDDEN = fromString("Hidden"); + + /** + * Value indicating the read-only snapshot directory is visible. + */ + public static final SnapshotDirectoryVisibility VISIBLE = fromString("Visible"); + + /** + * Creates a new instance of SnapshotDirectoryVisibility value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotDirectoryVisibility() { + } + + /** + * Creates or finds a SnapshotDirectoryVisibility from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotDirectoryVisibility. + */ + public static SnapshotDirectoryVisibility fromString(String name) { + return fromString(name, SnapshotDirectoryVisibility.class); + } + + /** + * Gets known SnapshotDirectoryVisibility values. + * + * @return known SnapshotDirectoryVisibility values. + */ + public static Collection values() { + return values(SnapshotDirectoryVisibility.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java new file mode 100644 index 000000000000..54786c233ec7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Snapshot usage for backup. + */ +public final class SnapshotUsage extends ExpandableStringEnum { + /** + * Value indicating an existing snapshot is used. + */ + public static final SnapshotUsage USE_EXISTING_SNAPSHOT = fromString("UseExistingSnapshot"); + + /** + * Value indicating a new snapshot is created. + */ + public static final SnapshotUsage CREATE_NEW_SNAPSHOT = fromString("CreateNewSnapshot"); + + /** + * Creates a new instance of SnapshotUsage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotUsage() { + } + + /** + * Creates or finds a SnapshotUsage from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotUsage. + */ + public static SnapshotUsage fromString(String name) { + return fromString(name, SnapshotUsage.class); + } + + /** + * Gets known SnapshotUsage values. + * + * @return known SnapshotUsage values. + */ + public static Collection values() { + return values(SnapshotUsage.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java index 82c2437e474b..1ab529914f40 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java @@ -98,9 +98,11 @@ public interface Volume { /** * Gets the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -331,6 +333,13 @@ public interface Volume { */ Boolean ldapEnabled(); + /** + * Gets the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + LdapServerType ldapServerType(); + /** * Gets the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -518,6 +527,17 @@ public interface Volume { */ Boolean isLargeVolume(); + /** + * Gets the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + LargeVolumeType largeVolumeType(); + /** * Gets the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -532,6 +552,13 @@ public interface Volume { */ Long inheritedSizeInBytes(); + /** + * Gets the language property: Language supported for volume. + * + * @return the language value. + */ + VolumeLanguage language(); + /** * Gets the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. * @@ -643,12 +670,16 @@ interface WithUsageThreshold { * Specifies the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is * a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to - * 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.. + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB.. * * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used - * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. - * Values expressed in bytes as multiples of 1 GiB. + * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB. * @return the next definition stage. */ WithSubnetId withUsageThreshold(long usageThreshold); @@ -683,14 +714,15 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithZon DefinitionStages.WithSmbAccessBasedEnumeration, DefinitionStages.WithSmbNonBrowsable, DefinitionStages.WithSmbContinuouslyAvailable, DefinitionStages.WithThroughputMibps, DefinitionStages.WithEncryptionKeySource, DefinitionStages.WithKeyVaultPrivateEndpointResourceId, - DefinitionStages.WithLdapEnabled, DefinitionStages.WithCoolAccess, DefinitionStages.WithCoolnessPeriod, - DefinitionStages.WithCoolAccessRetrievalPolicy, DefinitionStages.WithCoolAccessTieringPolicy, - DefinitionStages.WithUnixPermissions, DefinitionStages.WithAvsDataStore, - DefinitionStages.WithIsDefaultQuotaEnabled, DefinitionStages.WithDefaultUserQuotaInKiBs, - DefinitionStages.WithDefaultGroupQuotaInKiBs, DefinitionStages.WithCapacityPoolResourceId, - DefinitionStages.WithProximityPlacementGroup, DefinitionStages.WithVolumeSpecName, - DefinitionStages.WithPlacementRules, DefinitionStages.WithEnableSubvolumes, - DefinitionStages.WithIsLargeVolume, DefinitionStages.WithBreakthroughMode { + DefinitionStages.WithLdapEnabled, DefinitionStages.WithLdapServerType, DefinitionStages.WithCoolAccess, + DefinitionStages.WithCoolnessPeriod, DefinitionStages.WithCoolAccessRetrievalPolicy, + DefinitionStages.WithCoolAccessTieringPolicy, DefinitionStages.WithUnixPermissions, + DefinitionStages.WithAvsDataStore, DefinitionStages.WithIsDefaultQuotaEnabled, + DefinitionStages.WithDefaultUserQuotaInKiBs, DefinitionStages.WithDefaultGroupQuotaInKiBs, + DefinitionStages.WithCapacityPoolResourceId, DefinitionStages.WithProximityPlacementGroup, + DefinitionStages.WithVolumeSpecName, DefinitionStages.WithPlacementRules, + DefinitionStages.WithEnableSubvolumes, DefinitionStages.WithIsLargeVolume, + DefinitionStages.WithLargeVolumeType, DefinitionStages.WithLanguage, DefinitionStages.WithBreakthroughMode { /** * Executes the create request. * @@ -1044,6 +1076,19 @@ interface WithLdapEnabled { WithCreate withLdapEnabled(Boolean ldapEnabled); } + /** + * The stage of the Volume definition allowing to specify ldapServerType. + */ + interface WithLdapServerType { + /** + * Specifies the ldapServerType property: Specifies the type of LDAP server for a given NFS volume.. + * + * @param ldapServerType Specifies the type of LDAP server for a given NFS volume. + * @return the next definition stage. + */ + WithCreate withLdapServerType(LdapServerType ldapServerType); + } + /** * The stage of the Volume definition allowing to specify coolAccess. */ @@ -1283,6 +1328,40 @@ interface WithIsLargeVolume { WithCreate withIsLargeVolume(Boolean isLargeVolume); } + /** + * The stage of the Volume definition allowing to specify largeVolumeType. + */ + interface WithLargeVolumeType { + /** + * Specifies the largeVolumeType property: Specifies the type of the Large Volume. When set to + * 'LargeVolume', the large volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit + * 7.2PiB with cool access enabled, + * delivering higher capacity limit with lower costs.. + * + * @param largeVolumeType Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit + * 7.2PiB with cool access enabled, + * delivering higher capacity limit with lower costs. + * @return the next definition stage. + */ + WithCreate withLargeVolumeType(LargeVolumeType largeVolumeType); + } + + /** + * The stage of the Volume definition allowing to specify language. + */ + interface WithLanguage { + /** + * Specifies the language property: Language supported for volume.. + * + * @param language Language supported for volume. + * @return the next definition stage. + */ + WithCreate withLanguage(VolumeLanguage language); + } + /** * The stage of the Volume definition allowing to specify breakthroughMode. */ @@ -1369,12 +1448,16 @@ interface WithUsageThreshold { * Specifies the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is * a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to - * 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.. + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB.. * * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used - * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. - * Values expressed in bytes as multiples of 1 GiB. + * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + * 2400GiB to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as + * multiples of 1 GiB. * @return the next definition stage. */ Update withUsageThreshold(Long usageThreshold); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java index 8c4be56eb53d..92e16c9c93b5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java @@ -200,9 +200,11 @@ public VolumeGroupVolumeProperties withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -212,9 +214,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -829,6 +833,29 @@ public VolumeGroupVolumeProperties withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.innerProperties() == null ? null : this.innerProperties().ldapServerType(); + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLdapServerType(LdapServerType ldapServerType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLdapServerType(ldapServerType); + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1291,6 +1318,37 @@ public VolumeGroupVolumeProperties withIsLargeVolume(Boolean isLargeVolume) { return this; } + /** + * Get the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @return the largeVolumeType value. + */ + public LargeVolumeType largeVolumeType() { + return this.innerProperties() == null ? null : this.innerProperties().largeVolumeType(); + } + + /** + * Set the largeVolumeType property: Specifies the type of the Large Volume. When set to 'LargeVolume', the large + * volume is created with standard configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB + * with cool access enabled, + * delivering higher capacity limit with lower costs. + * + * @param largeVolumeType the largeVolumeType value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLargeVolumeType(LargeVolumeType largeVolumeType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLargeVolumeType(largeVolumeType); + return this; + } + /** * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * @@ -1309,6 +1367,29 @@ public Long inheritedSizeInBytes() { return this.innerProperties() == null ? null : this.innerProperties().inheritedSizeInBytes(); } + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: Language supported for volume. + * + * @param language the language value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLanguage(VolumeLanguage language) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + /** * Get the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java index d9b8f7747497..1550c3dc8ec5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java @@ -156,9 +156,11 @@ public VolumePatch withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -168,9 +170,11 @@ public Long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumePatch object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java new file mode 100644 index 000000000000..be50c34ba00d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Volume size for backup. + */ +public final class VolumeSize extends ExpandableStringEnum { + /** + * Value indicating backup is for a large volume. + */ + public static final VolumeSize LARGE = fromString("Large"); + + /** + * Value indicating backup is not for a large volume. + */ + public static final VolumeSize REGULAR = fromString("Regular"); + + /** + * Creates a new instance of VolumeSize value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeSize() { + } + + /** + * Creates or finds a VolumeSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeSize. + */ + public static VolumeSize fromString(String name) { + return fromString(name, VolumeSize.class); + } + + /** + * Gets known VolumeSize values. + * + * @return known VolumeSize values. + */ + public static Collection values() { + return values(VolumeSize.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json index 684501117dbc..9c918bb4a914 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.NetApp":"2026-05-01"},"crossLanguagePackageId":"Microsoft.NetApp","crossLanguageVersion":"350e558187f3","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BucketsClient":"Microsoft.NetApp.Buckets","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginCreateOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginDelete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginGenerateAkvCredentials":"Microsoft.NetApp.Buckets.generateAkvCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginRefreshCertificate":"Microsoft.NetApp.Buckets.refreshCertificate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginUpdate":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.BucketsClient.createOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.delete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateAkvCredentials":"Microsoft.NetApp.Buckets.generateAkvCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentials":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentialsWithResponse":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.get":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.getWithResponse":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.list":"Microsoft.NetApp.Buckets.list","com.azure.resourcemanager.netapp.fluent.BucketsClient.refreshCertificate":"Microsoft.NetApp.Buckets.refreshCertificate","com.azure.resourcemanager.netapp.fluent.BucketsClient.update":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.CachesClient":"Microsoft.NetApp.Caches","com.azure.resourcemanager.netapp.fluent.CachesClient.beginCreateOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.beginDelete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.beginPoolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.beginResetSmbPassword":"Microsoft.NetApp.Caches.resetSmbPassword","com.azure.resourcemanager.netapp.fluent.CachesClient.beginUpdate":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.CachesClient.createOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.delete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.get":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.getWithResponse":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.list":"Microsoft.NetApp.Caches.list","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrases":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrasesWithResponse":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.poolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.resetSmbPassword":"Microsoft.NetApp.Caches.resetSmbPassword","com.azure.resourcemanager.netapp.fluent.CachesClient.update":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient":"Microsoft.NetApp.RansomwareReports","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list":"Microsoft.NetApp.RansomwareReports.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner":"Microsoft.NetApp.BucketGenerateCredentials","com.azure.resourcemanager.netapp.fluent.models.BucketInner":"Microsoft.NetApp.Bucket","com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties":"Microsoft.NetApp.BucketPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BucketProperties":"Microsoft.NetApp.BucketProperties","com.azure.resourcemanager.netapp.fluent.models.CacheInner":"Microsoft.NetApp.Cache","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResultInner":"Microsoft.NetApp.ListQuotaReportResult","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner":"Microsoft.NetApp.PeeringPassphrases","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner":"Microsoft.NetApp.RansomwareReport","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.BucketList":"Microsoft.NetApp.BucketList","com.azure.resourcemanager.netapp.implementation.models.CacheList":"Microsoft.NetApp.CacheList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList":"Microsoft.NetApp.RansomwareReportsList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState":"Microsoft.NetApp.ActualRansomwareProtectionState","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.AzureKeyVaultDetails":"Microsoft.NetApp.AzureKeyVaultDetails","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.BreakthroughMode":"Microsoft.NetApp.BreakthroughMode","com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry":"Microsoft.NetApp.BucketCredentialsExpiry","com.azure.resourcemanager.netapp.models.BucketPatch":"Microsoft.NetApp.BucketPatch","com.azure.resourcemanager.netapp.models.BucketPatchPermissions":"Microsoft.NetApp.BucketPatchPermissions","com.azure.resourcemanager.netapp.models.BucketPermissions":"Microsoft.NetApp.BucketPermissions","com.azure.resourcemanager.netapp.models.BucketServerPatchProperties":"Microsoft.NetApp.BucketServerPatchProperties","com.azure.resourcemanager.netapp.models.BucketServerProperties":"Microsoft.NetApp.BucketServerProperties","com.azure.resourcemanager.netapp.models.CacheFileAccessLogs":"Microsoft.NetApp.CacheFileAccessLogs","com.azure.resourcemanager.netapp.models.CacheLifeCycleState":"Microsoft.NetApp.CacheLifeCycleState","com.azure.resourcemanager.netapp.models.CacheMountTargetProperties":"Microsoft.NetApp.CacheMountTargetProperties","com.azure.resourcemanager.netapp.models.CacheProperties":"Microsoft.NetApp.CacheProperties","com.azure.resourcemanager.netapp.models.CachePropertiesExportPolicy":"Microsoft.NetApp.CachePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.CacheProvisioningState":"Microsoft.NetApp.CacheProvisioningState","com.azure.resourcemanager.netapp.models.CacheUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.CacheUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","com.azure.resourcemanager.netapp.models.CertificateAkvDetails":"Microsoft.NetApp.CertificateAkvDetails","com.azure.resourcemanager.netapp.models.ChangeKeyVault":"Microsoft.NetApp.ChangeKeyVault","com.azure.resourcemanager.netapp.models.CheckNameResourceTypes":"Microsoft.NetApp.CheckNameResourceTypes","com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes":"Microsoft.NetApp.CheckQuotaNameResourceTypes","com.azure.resourcemanager.netapp.models.ChownMode":"Microsoft.NetApp.ChownMode","com.azure.resourcemanager.netapp.models.CifsChangeNotifyState":"Microsoft.NetApp.CifsChangeNotifyState","com.azure.resourcemanager.netapp.models.CifsUser":"Microsoft.NetApp.CifsUser","com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponseProperties":"Microsoft.NetApp.ClusterPeerCommandResponseProperties","com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.CredentialsAkvDetails":"Microsoft.NetApp.CredentialsAkvDetails","com.azure.resourcemanager.netapp.models.CredentialsStatus":"Microsoft.NetApp.CredentialsStatus","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState":"Microsoft.NetApp.DesiredRansomwareProtectionState","com.azure.resourcemanager.netapp.models.DestinationReplication":"Microsoft.NetApp.DestinationReplication","com.azure.resourcemanager.netapp.models.Dimension":"Microsoft.NetApp.Dimension","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EnableWriteBackState":"Microsoft.NetApp.EnableWriteBackState","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionState":"Microsoft.NetApp.EncryptionState","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.FileSystemUser":"Microsoft.NetApp.FileSystemUser","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.GlobalFileLockingState":"Microsoft.NetApp.GlobalFileLockingState","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KerberosState":"Microsoft.NetApp.KerberosState","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.LdapServerType":"Microsoft.NetApp.LdapServerType","com.azure.resourcemanager.netapp.models.LdapState":"Microsoft.NetApp.LdapState","com.azure.resourcemanager.netapp.models.ListQuotaReportResponse":"Microsoft.NetApp.ListQuotaReportResponse","com.azure.resourcemanager.netapp.models.ListReplicationsRequest":"Microsoft.NetApp.ListReplicationsRequest","com.azure.resourcemanager.netapp.models.LogSpecification":"Microsoft.NetApp.LogSpecification","com.azure.resourcemanager.netapp.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.netapp.models.MetricAggregationType":"Microsoft.NetApp.MetricAggregationType","com.azure.resourcemanager.netapp.models.MetricSpecification":"Microsoft.NetApp.MetricSpecification","com.azure.resourcemanager.netapp.models.MirrorState":"Microsoft.NetApp.MirrorState","com.azure.resourcemanager.netapp.models.MonthlySchedule":"Microsoft.NetApp.MonthlySchedule","com.azure.resourcemanager.netapp.models.MountTargetProperties":"Microsoft.NetApp.MountTargetProperties","com.azure.resourcemanager.netapp.models.MultiAdStatus":"Microsoft.NetApp.MultiAdStatus","com.azure.resourcemanager.netapp.models.NetAppAccountPatch":"Microsoft.NetApp.NetAppAccountPatch","com.azure.resourcemanager.netapp.models.NetworkFeatures":"Microsoft.NetApp.NetworkFeatures","com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState":"Microsoft.NetApp.NetworkSiblingSetProvisioningState","com.azure.resourcemanager.netapp.models.NfsUser":"Microsoft.NetApp.NfsUser","com.azure.resourcemanager.netapp.models.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OnCertificateConflictAction":"Microsoft.NetApp.OnCertificateConflictAction","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.OriginClusterInformation":"Microsoft.NetApp.OriginClusterInformation","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProtocolTypes":"Microsoft.NetApp.ProtocolTypes","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.QuotaReport":"Microsoft.NetApp.QuotaReport","com.azure.resourcemanager.netapp.models.QuotaReportFilterRequest":"Microsoft.NetApp.QuotaReportFilterRequest","com.azure.resourcemanager.netapp.models.QuotaType":"Microsoft.NetApp.QuotaType","com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings":"Microsoft.NetApp.RansomwareProtectionPatchSettings","com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings":"Microsoft.NetApp.RansomwareProtectionSettings","com.azure.resourcemanager.netapp.models.RansomwareReportProperties":"Microsoft.NetApp.RansomwareReportProperties","com.azure.resourcemanager.netapp.models.RansomwareReportSeverity":"Microsoft.NetApp.RansomwareReportSeverity","com.azure.resourcemanager.netapp.models.RansomwareReportState":"Microsoft.NetApp.RansomwareReportState","com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution":"Microsoft.NetApp.RansomwareSuspectResolution","com.azure.resourcemanager.netapp.models.RansomwareSuspects":"Microsoft.NetApp.RansomwareSuspects","com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest":"Microsoft.NetApp.RansomwareSuspectsClearRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbEncryptionState":"Microsoft.NetApp.SmbEncryptionState","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SmbSettings":"Microsoft.NetApp.SmbSettings","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.SuspectFile":"Microsoft.NetApp.SuspectFile","com.azure.resourcemanager.netapp.models.SvmPeerCommandResponseProperties":"Microsoft.NetApp.SvmPeerCommandResponseProperties","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumeLanguage":"Microsoft.NetApp.VolumeLanguage","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/AzureKeyVaultDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java","src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java","src/main/java/com/azure/resourcemanager/netapp/models/Cache.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheFileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Caches.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/CertificateAkvDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsAkvDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/DestinationReplication.java","src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResult.java","src/main/java/com/azure/resourcemanager/netapp/models/ListReplicationsRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/MountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/MultiAdStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimitsAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceUsages.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/OnCertificateConflictAction.java","src/main/java/com/azure/resourcemanager/netapp/models/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReportFilterRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaType.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.NetApp":"2026-05-15-preview"},"crossLanguagePackageId":"Microsoft.NetApp","crossLanguageVersion":"350e558187f3","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRefreshLdapBindPassword":"Microsoft.NetApp.NetAppAccounts.refreshLdapBindPassword","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.refreshLdapBindPassword":"Microsoft.NetApp.NetAppAccounts.refreshLdapBindPassword","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient":"Microsoft.NetApp.ActiveDirectoryConfigs","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginCreateOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginDelete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.beginUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.createOrUpdate":"Microsoft.NetApp.ActiveDirectoryConfigs.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.delete":"Microsoft.NetApp.ActiveDirectoryConfigs.delete","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ActiveDirectoryConfigs.get","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.list":"Microsoft.NetApp.ActiveDirectoryConfigs.listBySubscription","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.listByResourceGroup":"Microsoft.NetApp.ActiveDirectoryConfigs.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient.update":"Microsoft.NetApp.ActiveDirectoryConfigs.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BucketsClient":"Microsoft.NetApp.Buckets","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginCreateOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginDelete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginGenerateAkvCredentials":"Microsoft.NetApp.Buckets.generateAkvCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginRefreshCertificate":"Microsoft.NetApp.Buckets.refreshCertificate","com.azure.resourcemanager.netapp.fluent.BucketsClient.beginUpdate":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.BucketsClient.createOrUpdate":"Microsoft.NetApp.Buckets.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BucketsClient.delete":"Microsoft.NetApp.Buckets.delete","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateAkvCredentials":"Microsoft.NetApp.Buckets.generateAkvCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentials":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.generateCredentialsWithResponse":"Microsoft.NetApp.Buckets.generateCredentials","com.azure.resourcemanager.netapp.fluent.BucketsClient.get":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.getWithResponse":"Microsoft.NetApp.Buckets.get","com.azure.resourcemanager.netapp.fluent.BucketsClient.list":"Microsoft.NetApp.Buckets.list","com.azure.resourcemanager.netapp.fluent.BucketsClient.refreshCertificate":"Microsoft.NetApp.Buckets.refreshCertificate","com.azure.resourcemanager.netapp.fluent.BucketsClient.update":"Microsoft.NetApp.Buckets.update","com.azure.resourcemanager.netapp.fluent.CachesClient":"Microsoft.NetApp.Caches","com.azure.resourcemanager.netapp.fluent.CachesClient.beginCreateOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.beginDelete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.beginPoolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.beginResetSmbPassword":"Microsoft.NetApp.Caches.resetSmbPassword","com.azure.resourcemanager.netapp.fluent.CachesClient.beginUpdate":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.CachesClient.createOrUpdate":"Microsoft.NetApp.Caches.createOrUpdate","com.azure.resourcemanager.netapp.fluent.CachesClient.delete":"Microsoft.NetApp.Caches.delete","com.azure.resourcemanager.netapp.fluent.CachesClient.get":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.getWithResponse":"Microsoft.NetApp.Caches.get","com.azure.resourcemanager.netapp.fluent.CachesClient.list":"Microsoft.NetApp.Caches.list","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrases":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.listPeeringPassphrasesWithResponse":"Microsoft.NetApp.Caches.listPeeringPassphrases","com.azure.resourcemanager.netapp.fluent.CachesClient.poolChange":"Microsoft.NetApp.Caches.poolChange","com.azure.resourcemanager.netapp.fluent.CachesClient.resetSmbPassword":"Microsoft.NetApp.Caches.resetSmbPassword","com.azure.resourcemanager.netapp.fluent.CachesClient.update":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient":"Microsoft.NetApp.ElasticAccounts","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list":"Microsoft.NetApp.ElasticAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup":"Microsoft.NetApp.ElasticAccounts.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient":"Microsoft.NetApp.ElasticBackupPolicies","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient":"Microsoft.NetApp.ElasticBackupVaults","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient":"Microsoft.NetApp.ElasticBackups","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault":"Microsoft.NetApp.ElasticBackups.listByVault","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient":"Microsoft.NetApp.ElasticCapacityPools","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount":"Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient":"Microsoft.NetApp.ElasticSnapshotPolicies","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes":"Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient":"Microsoft.NetApp.ElasticSnapshots","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume":"Microsoft.NetApp.ElasticSnapshots.listByElasticVolume","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient":"Microsoft.NetApp.ElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool":"Microsoft.NetApp.ElasticVolumes.listByElasticPool","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient":"Microsoft.NetApp.RansomwareReports","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list":"Microsoft.NetApp.RansomwareReports.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.AccountPropertiesPatch":"Microsoft.NetApp.AccountPropertiesPatch","com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner":"Microsoft.NetApp.ActiveDirectoryConfig","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner":"Microsoft.NetApp.BucketGenerateCredentials","com.azure.resourcemanager.netapp.fluent.models.BucketInner":"Microsoft.NetApp.Bucket","com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties":"Microsoft.NetApp.BucketPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BucketProperties":"Microsoft.NetApp.BucketProperties","com.azure.resourcemanager.netapp.fluent.models.CacheInner":"Microsoft.NetApp.Cache","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner":"Microsoft.NetApp.CheckElasticResourceAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner":"Microsoft.NetApp.ElasticAccount","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner":"Microsoft.NetApp.ElasticBackup","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner":"Microsoft.NetApp.ElasticBackupPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner":"Microsoft.NetApp.ElasticBackupVault","com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner":"Microsoft.NetApp.ElasticCapacityPool","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner":"Microsoft.NetApp.ElasticSnapshot","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner":"Microsoft.NetApp.ElasticSnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner":"Microsoft.NetApp.ElasticVolume","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResultInner":"Microsoft.NetApp.ListQuotaReportResult","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner":"Microsoft.NetApp.PeeringPassphrases","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner":"Microsoft.NetApp.RansomwareReport","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.BucketList":"Microsoft.NetApp.BucketList","com.azure.resourcemanager.netapp.implementation.models.CacheList":"Microsoft.NetApp.CacheList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList":"Microsoft.NetApp.ElasticSnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList":"Microsoft.NetApp.RansomwareReportsList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties":"Microsoft.NetApp.ActiveDirectoryConfigProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState":"Microsoft.NetApp.ActualRansomwareProtectionState","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.AzureKeyVaultDetails":"Microsoft.NetApp.AzureKeyVaultDetails","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BindAuthenticationLevel":"Microsoft.NetApp.BindAuthenticationLevel","com.azure.resourcemanager.netapp.models.BindPasswordAkvConfig":"Microsoft.NetApp.BindPasswordAkvConfig","com.azure.resourcemanager.netapp.models.BindPasswordAkvConfigPatch":"Microsoft.NetApp.BindPasswordAkvConfigPatch","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.BreakthroughMode":"Microsoft.NetApp.BreakthroughMode","com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry":"Microsoft.NetApp.BucketCredentialsExpiry","com.azure.resourcemanager.netapp.models.BucketPatch":"Microsoft.NetApp.BucketPatch","com.azure.resourcemanager.netapp.models.BucketPatchPermissions":"Microsoft.NetApp.BucketPatchPermissions","com.azure.resourcemanager.netapp.models.BucketPermissions":"Microsoft.NetApp.BucketPermissions","com.azure.resourcemanager.netapp.models.BucketServerPatchProperties":"Microsoft.NetApp.BucketServerPatchProperties","com.azure.resourcemanager.netapp.models.BucketServerProperties":"Microsoft.NetApp.BucketServerProperties","com.azure.resourcemanager.netapp.models.CacheFileAccessLogs":"Microsoft.NetApp.CacheFileAccessLogs","com.azure.resourcemanager.netapp.models.CacheLifeCycleState":"Microsoft.NetApp.CacheLifeCycleState","com.azure.resourcemanager.netapp.models.CacheMountTargetProperties":"Microsoft.NetApp.CacheMountTargetProperties","com.azure.resourcemanager.netapp.models.CacheProperties":"Microsoft.NetApp.CacheProperties","com.azure.resourcemanager.netapp.models.CachePropertiesExportPolicy":"Microsoft.NetApp.CachePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.CacheProvisioningState":"Microsoft.NetApp.CacheProvisioningState","com.azure.resourcemanager.netapp.models.CacheUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.CacheUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","com.azure.resourcemanager.netapp.models.CertificateAkvDetails":"Microsoft.NetApp.CertificateAkvDetails","com.azure.resourcemanager.netapp.models.ChangeKeyVault":"Microsoft.NetApp.ChangeKeyVault","com.azure.resourcemanager.netapp.models.ChangeZoneRequest":"Microsoft.NetApp.ChangeZoneRequest","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason":"Microsoft.NetApp.CheckElasticResourceAvailabilityReason","com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus":"Microsoft.NetApp.CheckElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest":"Microsoft.NetApp.CheckElasticVolumeFilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.CheckNameResourceTypes":"Microsoft.NetApp.CheckNameResourceTypes","com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes":"Microsoft.NetApp.CheckQuotaNameResourceTypes","com.azure.resourcemanager.netapp.models.ChownMode":"Microsoft.NetApp.ChownMode","com.azure.resourcemanager.netapp.models.CifsChangeNotifyState":"Microsoft.NetApp.CifsChangeNotifyState","com.azure.resourcemanager.netapp.models.CifsUser":"Microsoft.NetApp.CifsUser","com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponseProperties":"Microsoft.NetApp.ClusterPeerCommandResponseProperties","com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.CredentialsAkvDetails":"Microsoft.NetApp.CredentialsAkvDetails","com.azure.resourcemanager.netapp.models.CredentialsStatus":"Microsoft.NetApp.CredentialsStatus","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","com.azure.resourcemanager.netapp.models.DayOfWeek":"Microsoft.NetApp.DayOfWeek","com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState":"Microsoft.NetApp.DesiredRansomwareProtectionState","com.azure.resourcemanager.netapp.models.DestinationReplication":"Microsoft.NetApp.DestinationReplication","com.azure.resourcemanager.netapp.models.Dimension":"Microsoft.NetApp.Dimension","com.azure.resourcemanager.netapp.models.ElasticAccountProperties":"Microsoft.NetApp.ElasticAccountProperties","com.azure.resourcemanager.netapp.models.ElasticAccountUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties":"Microsoft.NetApp.ElasticBackupPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState":"Microsoft.NetApp.ElasticBackupPolicyState","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticBackupProperties":"Microsoft.NetApp.ElasticBackupProperties","com.azure.resourcemanager.netapp.models.ElasticBackupType":"Microsoft.NetApp.ElasticBackupType","com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties":"Microsoft.NetApp.ElasticBackupVaultProperties","com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties":"Microsoft.NetApp.ElasticCapacityPoolProperties","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticEncryption":"Microsoft.NetApp.ElasticEncryption","com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration":"Microsoft.NetApp.ElasticEncryptionConfiguration","com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity":"Microsoft.NetApp.ElasticEncryptionIdentity","com.azure.resourcemanager.netapp.models.ElasticExportPolicy":"Microsoft.NetApp.ElasticExportPolicy","com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule":"Microsoft.NetApp.ElasticExportPolicyRule","com.azure.resourcemanager.netapp.models.ElasticKeyVaultProperties":"Microsoft.NetApp.ElasticKeyVaultProperties","com.azure.resourcemanager.netapp.models.ElasticKeyVaultStatus":"Microsoft.NetApp.ElasticKeyVaultStatus","com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties":"Microsoft.NetApp.ElasticMountTargetProperties","com.azure.resourcemanager.netapp.models.ElasticNfsv3Access":"Microsoft.NetApp.ElasticNfsv3Access","com.azure.resourcemanager.netapp.models.ElasticNfsv4Access":"Microsoft.NetApp.ElasticNfsv4Access","com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource":"Microsoft.NetApp.ElasticPoolEncryptionKeySource","com.azure.resourcemanager.netapp.models.ElasticProtocolType":"Microsoft.NetApp.ElasticProtocolType","com.azure.resourcemanager.netapp.models.ElasticResourceAvailabilityStatus":"Microsoft.NetApp.ElasticResourceAvailabilityStatus","com.azure.resourcemanager.netapp.models.ElasticRootAccess":"Microsoft.NetApp.ElasticRootAccess","com.azure.resourcemanager.netapp.models.ElasticServiceLevel":"Microsoft.NetApp.ElasticServiceLevel","com.azure.resourcemanager.netapp.models.ElasticSmbEncryption":"Microsoft.NetApp.ElasticSmbEncryption","com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties":"Microsoft.NetApp.ElasticSmbPatchProperties","com.azure.resourcemanager.netapp.models.ElasticSmbProperties":"Microsoft.NetApp.ElasticSmbProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyDailySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyHourlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyMonthlySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties":"Microsoft.NetApp.ElasticSnapshotPolicyProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties":"Microsoft.NetApp.ElasticSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule":"Microsoft.NetApp.ElasticUnixAccessRule","com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties":"Microsoft.NetApp.ElasticVolumeBackupProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionProperties","com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement":"Microsoft.NetApp.ElasticVolumePolicyEnforcement","com.azure.resourcemanager.netapp.models.ElasticVolumeProperties":"Microsoft.NetApp.ElasticVolumeProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState":"Microsoft.NetApp.ElasticVolumeRestorationState","com.azure.resourcemanager.netapp.models.ElasticVolumeRevert":"Microsoft.NetApp.ElasticVolumeRevert","com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties":"Microsoft.NetApp.ElasticVolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EnableWriteBackState":"Microsoft.NetApp.EnableWriteBackState","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionState":"Microsoft.NetApp.EncryptionState","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.EntraIdAkvConfig":"Microsoft.NetApp.EntraIdAkvConfig","com.azure.resourcemanager.netapp.models.EntraIdAkvConfigPatch":"Microsoft.NetApp.EntraIdAkvConfigPatch","com.azure.resourcemanager.netapp.models.EntraIdConfig":"Microsoft.NetApp.EntraIdConfig","com.azure.resourcemanager.netapp.models.EntraIdConfigPatch":"Microsoft.NetApp.EntraIdConfigPatch","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.FileSystemUser":"Microsoft.NetApp.FileSystemUser","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.GlobalFileLockingState":"Microsoft.NetApp.GlobalFileLockingState","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KerberosState":"Microsoft.NetApp.KerberosState","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LargeVolumeType":"Microsoft.NetApp.LargeVolumeType","com.azure.resourcemanager.netapp.models.LdapConfiguration":"Microsoft.NetApp.LdapConfiguration","com.azure.resourcemanager.netapp.models.LdapConfigurationPatch":"Microsoft.NetApp.LdapConfigurationPatch","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.LdapServerType":"Microsoft.NetApp.LdapServerType","com.azure.resourcemanager.netapp.models.LdapState":"Microsoft.NetApp.LdapState","com.azure.resourcemanager.netapp.models.ListQuotaReportResponse":"Microsoft.NetApp.ListQuotaReportResponse","com.azure.resourcemanager.netapp.models.ListReplicationsRequest":"Microsoft.NetApp.ListReplicationsRequest","com.azure.resourcemanager.netapp.models.LogSpecification":"Microsoft.NetApp.LogSpecification","com.azure.resourcemanager.netapp.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.netapp.models.MetricAggregationType":"Microsoft.NetApp.MetricAggregationType","com.azure.resourcemanager.netapp.models.MetricSpecification":"Microsoft.NetApp.MetricSpecification","com.azure.resourcemanager.netapp.models.MirrorState":"Microsoft.NetApp.MirrorState","com.azure.resourcemanager.netapp.models.MonthlySchedule":"Microsoft.NetApp.MonthlySchedule","com.azure.resourcemanager.netapp.models.MountTargetProperties":"Microsoft.NetApp.MountTargetProperties","com.azure.resourcemanager.netapp.models.MultiAdStatus":"Microsoft.NetApp.MultiAdStatus","com.azure.resourcemanager.netapp.models.NetAppAccountPatch":"Microsoft.NetApp.NetAppAccountPatch","com.azure.resourcemanager.netapp.models.NetworkFeatures":"Microsoft.NetApp.NetworkFeatures","com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState":"Microsoft.NetApp.NetworkSiblingSetProvisioningState","com.azure.resourcemanager.netapp.models.NfsUser":"Microsoft.NetApp.NfsUser","com.azure.resourcemanager.netapp.models.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OnCertificateConflictAction":"Microsoft.NetApp.OnCertificateConflictAction","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.OriginClusterInformation":"Microsoft.NetApp.OriginClusterInformation","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PolicyStatus":"Microsoft.NetApp.PolicyStatus","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProtocolTypes":"Microsoft.NetApp.ProtocolTypes","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.QuotaReport":"Microsoft.NetApp.QuotaReport","com.azure.resourcemanager.netapp.models.QuotaReportFilterRequest":"Microsoft.NetApp.QuotaReportFilterRequest","com.azure.resourcemanager.netapp.models.QuotaType":"Microsoft.NetApp.QuotaType","com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings":"Microsoft.NetApp.RansomwareProtectionPatchSettings","com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings":"Microsoft.NetApp.RansomwareProtectionSettings","com.azure.resourcemanager.netapp.models.RansomwareReportProperties":"Microsoft.NetApp.RansomwareReportProperties","com.azure.resourcemanager.netapp.models.RansomwareReportSeverity":"Microsoft.NetApp.RansomwareReportSeverity","com.azure.resourcemanager.netapp.models.RansomwareReportState":"Microsoft.NetApp.RansomwareReportState","com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution":"Microsoft.NetApp.RansomwareSuspectResolution","com.azure.resourcemanager.netapp.models.RansomwareSuspects":"Microsoft.NetApp.RansomwareSuspects","com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest":"Microsoft.NetApp.RansomwareSuspectsClearRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecretPassword":"Microsoft.NetApp.SecretPassword","com.azure.resourcemanager.netapp.models.SecretPasswordIdentity":"Microsoft.NetApp.SecretPasswordIdentity","com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties":"Microsoft.NetApp.SecretPasswordKeyVaultProperties","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbEncryptionState":"Microsoft.NetApp.SmbEncryptionState","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SmbSettings":"Microsoft.NetApp.SmbSettings","com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility":"Microsoft.NetApp.SnapshotDirectoryVisibility","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SnapshotUsage":"Microsoft.NetApp.SnapshotUsage","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.SuspectFile":"Microsoft.NetApp.SuspectFile","com.azure.resourcemanager.netapp.models.SvmPeerCommandResponseProperties":"Microsoft.NetApp.SvmPeerCommandResponseProperties","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumeLanguage":"Microsoft.NetApp.VolumeLanguage","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSize":"Microsoft.NetApp.VolumeSize","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountPropertiesPatch.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/AzureKeyVaultDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BindAuthenticationLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/BindPasswordAkvConfigPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java","src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java","src/main/java/com/azure/resourcemanager/netapp/models/Cache.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheFileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CachePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Caches.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/CertificateAkvDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsAkvDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java","src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/DestinationReplication.java","src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/EntraIdAkvConfigPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/EntraIdConfigPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapConfigurationPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResult.java","src/main/java/com/azure/resourcemanager/netapp/models/ListReplicationsRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java","src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/MountTargetProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/MultiAdStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimits.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceQuotaLimitsAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceRegionInfos.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResourceUsages.java","src/main/java/com/azure/resourcemanager/netapp/models/NetAppResources.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java","src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/OnCertificateConflictAction.java","src/main/java/com/azure/resourcemanager/netapp/models/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReportFilterRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaType.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ 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/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 c411aa3bf0d7..fdbabe6bdace 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.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService"],["com.azure.resourcemanager.netapp.implementation.BucketsClientImpl$BucketsService"],["com.azure.resourcemanager.netapp.implementation.CachesClientImpl$CachesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsClientImpl$NetAppResourceQuotaLimitsAccountsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceUsagesClientImpl$NetAppResourceUsagesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService"],["com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.netapp.implementation.RansomwareReportsClientImpl$RansomwareReportsService"],["com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService"],["com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService"],["com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file +[["com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.netapp.implementation.ActiveDirectoryConfigsClientImpl$ActiveDirectoryConfigsService"],["com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService"],["com.azure.resourcemanager.netapp.implementation.BucketsClientImpl$BucketsService"],["com.azure.resourcemanager.netapp.implementation.CachesClientImpl$CachesService"],["com.azure.resourcemanager.netapp.implementation.ElasticAccountsClientImpl$ElasticAccountsService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupPoliciesClientImpl$ElasticBackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupVaultsClientImpl$ElasticBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupsClientImpl$ElasticBackupsService"],["com.azure.resourcemanager.netapp.implementation.ElasticCapacityPoolsClientImpl$ElasticCapacityPoolsService"],["com.azure.resourcemanager.netapp.implementation.ElasticSnapshotPoliciesClientImpl$ElasticSnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.ElasticSnapshotsClientImpl$ElasticSnapshotsService"],["com.azure.resourcemanager.netapp.implementation.ElasticVolumesClientImpl$ElasticVolumesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsClientImpl$NetAppResourceQuotaLimitsAccountsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceUsagesClientImpl$NetAppResourceUsagesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService"],["com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.netapp.implementation.RansomwareReportsClientImpl$RansomwareReportsService"],["com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService"],["com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService"],["com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java index c84bcf338fa0..0fe91d86e1dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java @@ -13,7 +13,7 @@ */ public final class AccountsChangeKeyVaultSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2026-05-15-preview/Accounts_ChangeKeyVault.json */ /** * Sample code: Accounts_ChangeKeyVault. 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 6191b1e4bf62..a7e2c15d3574 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 @@ -5,6 +5,9 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.resourcemanager.netapp.models.ActiveDirectory; +import com.azure.resourcemanager.netapp.models.BindAuthenticationLevel; +import com.azure.resourcemanager.netapp.models.BindPasswordAkvConfig; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import java.util.Arrays; /** @@ -12,7 +15,7 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -24,7 +27,7 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-05-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2026-05-15-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -49,4 +52,35 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp .withLdapOverTls(false))) .create(); } + + /* + * x-ms-original-file: 2026-05-15-preview/Accounts_CreateOrUpdateLdapConfig.json + */ + /** + * Sample code: Accounts_CreateOrUpdateLdapConfig. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void accountsCreateOrUpdateLdapConfig(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withLdapConfiguration(new LdapConfiguration().withDomain("example.com") + .withLdapServers(Arrays.asList("192.0.2.1", "192.0.2.2")) + .withLdapOverTLS(false) + .withServerCACertificate("") + .withCertificateCNHost("ldap.krypton.com") + .withLdapPort(636) + .withUserDN("OU=subdirectory,OU=directory,DC=example,DC=com") + .withGroupDN("OU=subdirectory,OU=directory,DC=example,DC=com") + .withNetGroupDN("OU=subdirectory,OU=directory,DC=example,DC=com") + .withBindAuthenticationLevel(BindAuthenticationLevel.SIMPLE) + .withBindDN("cn=user,dc=domain,dc=com") + .withBindPasswordAkvConfig(new BindPasswordAkvConfig().withAzureKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"))) + .create(); + } } 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 bbdc4166e852..7dc2b9a22a46 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 @@ -9,7 +9,7 @@ */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 6001006e04bd..0b9f443ee75f 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 @@ -9,7 +9,7 @@ */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_Get.json + * x-ms-original-file: 2026-05-15-preview/Accounts_Get.json */ /** * Sample code: Accounts_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java index 5efdaf5711f2..223b502304fe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetChangeKeyVaultInformationSamples.java @@ -9,7 +9,7 @@ */ public final class AccountsGetChangeKeyVaultInformationSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2026-05-15-preview/Accounts_GetChangeKeyVaultInformation.json */ /** * Sample code: Accounts_GetChangeKeyVaultInformation. 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 90fcf861c951..1cb74143d164 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 @@ -9,7 +9,7 @@ */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_List.json + * x-ms-original-file: 2026-05-15-preview/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 0948880cb43c..2efb0b873cfa 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 @@ -9,7 +9,7 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2026-05-15-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRefreshLdapBindPasswordSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRefreshLdapBindPasswordSamples.java new file mode 100644 index 000000000000..5e71d603e3f5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRefreshLdapBindPasswordSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for Accounts RefreshLdapBindPassword. + */ +public final class AccountsRefreshLdapBindPasswordSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Accounts_RefreshLdapBindPassword.json + */ + /** + * Sample code: NetAppAccounts_RefreshLdapBindPassword. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + netAppAccountsRefreshLdapBindPassword(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.accounts().refreshLdapBindPassword("myRG", "account1", 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 b9c96a50900e..fa1cf6636b4e 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,7 +9,7 @@ */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2026-05-15-preview/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java index c0e489a78a95..e35e1af4ee9f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsTransitionToCmkSamples.java @@ -11,7 +11,7 @@ */ public final class AccountsTransitionToCmkSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2026-05-15-preview/Accounts_TransitionEncryptionKey.json */ /** * Sample code: Accounts_MigrateEncryptionKey. 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 af10369da944..836946f7381f 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 @@ -13,7 +13,7 @@ */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Accounts_Update.json + * x-ms-original-file: 2026-05-15-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..677419f6f45c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.netapp.models.SecretPassword; +import com.azure.resourcemanager.netapp.models.SecretPasswordIdentity; +import com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties; +import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ActiveDirectoryConfigs CreateOrUpdate. + */ +public final class ActiveDirectoryConfigsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_CreateOrUpdate.json + */ + /** + * Sample code: ActiveDirectoryConfigs_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .define("adconfig1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "activeDirectoryConfig1")) + .withProperties(new ActiveDirectoryConfigProperties().withUserName("admin1") + .withDns(Arrays.asList("10.10.10.4", "10.10.10.5")) + .withSmbServerName("smbServer") + .withOrganizationalUnit("OU=Computers,DC=corp,DC=contoso,DC=com") + .withSite("Default-First-Site-Name") + .withBackupOperators(Arrays.asList("backupOp1")) + .withAdministrators(Arrays.asList("admin1")) + .withSecurityOperators(Arrays.asList("secOp1")) + .withDomain("example.net") + .withSecretPassword(new SecretPassword() + .withKeyVaultProperties( + new SecretPasswordKeyVaultProperties().withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder")) + .withIdentity(new SecretPasswordIdentity().withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1")))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1", + new UserAssignedIdentity()))) + .create(); + } + + // 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/ActiveDirectoryConfigsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java new file mode 100644 index 000000000000..0e8ae1bdfab2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs Delete. + */ +public final class ActiveDirectoryConfigsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_Delete.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().delete("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..1a24c1dbde5e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs GetByResourceGroup. + */ +public final class ActiveDirectoryConfigsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_Get.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java new file mode 100644 index 000000000000..2fd820e02039 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs ListByResourceGroup. + */ +public final class ActiveDirectoryConfigsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_ListByResourceGroup.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java new file mode 100644 index 000000000000..8530e6345898 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ActiveDirectoryConfigs List. + */ +public final class ActiveDirectoryConfigsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_ListBySubscription.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java new file mode 100644 index 000000000000..1e1c3eb77fb8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfig; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties; + +/** + * Samples for ActiveDirectoryConfigs Update. + */ +public final class ActiveDirectoryConfigsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ActiveDirectoryConfigs_Update.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ActiveDirectoryConfig resource = manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ActiveDirectoryConfigUpdateProperties().withSmbServerName("smbServer2")) + .apply(); + } +} 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 2770ff90552a..900a17167a8a 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 @@ -9,7 +9,7 @@ */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Create.json + * x-ms-original-file: 2026-05-15-preview/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 f80f95549d32..27418648d38a 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 @@ -9,7 +9,7 @@ */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Delete.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_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 b9714eb96df8..60b1a6b6ac60 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 @@ -9,7 +9,7 @@ */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Get.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_Get.json */ /** * Sample code: BackupPolicies_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 4a8e6e8f128d..1744bef7e385 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 @@ -9,7 +9,7 @@ */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_List.json + * x-ms-original-file: 2026-05-15-preview/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_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 f501183819a1..6f99955398a2 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 @@ -11,7 +11,7 @@ */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupPolicies_Update.json + * x-ms-original-file: 2026-05-15-preview/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 index a60a37c1bfed..49c9c8239bf3 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Create.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Create.json */ /** * Sample code: BackupVault_CreateOrUpdate. 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 index 1bf56c6eb54d..5ee9f542d298 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Delete.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Delete.json */ /** * Sample code: BackupVaults_Delete. 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 index e8a6a66c6070..694a8ac37880 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupVaultsGetSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Get.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Get.json */ /** * Sample code: BackupVaults_Get. 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 index 7199b691bcb8..46a19965effc 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_List.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_List.json */ /** * Sample code: BackupVaults_List. 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 index 1a1b699c46e2..14e29d10c2aa 100644 --- 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 @@ -13,7 +13,7 @@ */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupVaults_Update.json + * x-ms-original-file: 2026-05-15-preview/BackupVaults_Update.json */ /** * Sample code: BackupVaults_Update. 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 index 21040ffcc5b6..aab0f9f0c2d8 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupsCreateSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Create.json */ /** * Sample code: BackupsUnderBackupVault_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 index 388b01de11d3..6a4509ce022f 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Delete.json */ /** * Sample code: BackupsUnderBackupVault_Delete. 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 index 9bbd4f836ee4..8470b9814245 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupsGetLatestStatusSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2026-05-15-preview/Volumes_LatestBackupStatus.json */ /** * Sample code: Volumes_BackupStatus. 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 index b210b13facd3..75e119163a9d 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class BackupsGetSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Get.json */ /** * Sample code: BackupsUnderBackupVault_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java index 9dc13ec9afba..55f8ce16ae05 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java @@ -9,7 +9,7 @@ */ public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2026-05-15-preview/Volumes_LatestRestoreStatus.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 index 7c524f09a243..c09050e317f9 100644 --- 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 @@ -9,14 +9,14 @@ */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_List.json + * x-ms-original-file: 2026-05-15-preview/Backups_ListByVault.json */ /** - * Sample code: Backups_List. + * Sample code: Backups_ListByVault. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void backupsListByVault(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 index 430af6540c55..cfdfa3d910d9 100644 --- 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 @@ -11,7 +11,7 @@ */ public final class BackupsUnderAccountMigrateBackupsSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderAccount_Migrate.json */ /** * Sample code: BackupsUnderAccount_Migrate. 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 index ef2631f3b69b..12f360f48dd5 100644 --- 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 @@ -12,7 +12,7 @@ */ public final class BackupsUnderBackupVaultRestoreFilesSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_SingleFileRestore.json */ /** * Sample code: Backups_SingleFileRestore. 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 index 9fd11c4c3446..53827db96dde 100644 --- 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 @@ -11,7 +11,7 @@ */ public final class BackupsUnderVolumeMigrateBackupsSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderVolume_Migrate.json */ /** * Sample code: BackupsUnderVolume_Migrate. 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 index aa9eb9237301..d4a480b89a34 100644 --- 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 @@ -11,7 +11,7 @@ */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2026-05-15-preview/BackupsUnderBackupVault_Update.json */ /** * Sample code: BackupsUnderBackupVault_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java index cdf0b52376c4..6bb800b61803 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ */ public final class BucketsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Buckets_CreateOrUpdate.json */ /** * Sample code: Buckets_CreateOrUpdate. @@ -39,7 +39,7 @@ public static void bucketsCreateOrUpdate(com.azure.resourcemanager.netapp.NetApp } /* - * x-ms-original-file: 2026-05-01/Buckets_CreateOrUpdateWithAkv.json + * x-ms-original-file: 2026-05-15-preview/Buckets_CreateOrUpdateWithAkv.json */ /** * Sample code: Buckets_CreateOrUpdateWithAkv. @@ -55,13 +55,16 @@ public static void bucketsCreateOrUpdateWithAkv(com.azure.resourcemanager.netapp .withServer(new BucketServerProperties().withFqdn("fullyqualified.domainname.com") .withOnCertificateConflictAction(OnCertificateConflictAction.FAIL)) .withPermissions(BucketPermissions.READ_ONLY) - .withAkvDetails(new AzureKeyVaultDetails() - .withCertificateAkvDetails( - new CertificateAkvDetails().withCertificateKeyVaultUri("fakeTokenPlaceholder") - .withCertificateName("my-certificate")) - .withCredentialsAkvDetails( - new CredentialsAkvDetails().withCredentialsKeyVaultUri("fakeTokenPlaceholder") - .withSecretName("fakeTokenPlaceholder"))) + .withAkvDetails(new AzureKeyVaultDetails().withCertificateAkvDetails(new CertificateAkvDetails() + .withCertificateKeyVaultUri("fakeTokenPlaceholder") + .withCertificateName("my-certificate") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")) + .withCredentialsAkvDetails(new CredentialsAkvDetails() + .withCredentialsKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) .create(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java index 415136c1ce4f..16e92cb28daf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class BucketsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_Delete.json + * x-ms-original-file: 2026-05-15-preview/Buckets_Delete.json */ /** * Sample code: Buckets_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateAkvCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateAkvCredentialsSamples.java index 2d9c09ce1266..7b2316e2aa57 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateAkvCredentialsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateAkvCredentialsSamples.java @@ -11,7 +11,7 @@ */ public final class BucketsGenerateAkvCredentialsSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_GenerateAkvCredentials.json + * x-ms-original-file: 2026-05-15-preview/Buckets_GenerateAkvCredentials.json */ /** * Sample code: Buckets_GenerateAkvCredentials. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java index aceeb7c61110..e9e0c8744e72 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.java @@ -11,7 +11,7 @@ */ public final class BucketsGenerateCredentialsSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_GenerateCredentials.json + * x-ms-original-file: 2026-05-15-preview/Buckets_GenerateCredentials.json */ /** * Sample code: Buckets_GenerateCredentials. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java index 77698c6ace5c..b1389ad53008 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.java @@ -9,7 +9,7 @@ */ public final class BucketsGetSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_Get.json + * x-ms-original-file: 2026-05-15-preview/Buckets_Get.json */ /** * Sample code: Buckets_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java index cd5c5165177d..358ead906c06 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.java @@ -9,7 +9,7 @@ */ public final class BucketsListSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_List.json + * x-ms-original-file: 2026-05-15-preview/Buckets_List.json */ /** * Sample code: Buckets_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsRefreshCertificateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsRefreshCertificateSamples.java index ecca9ccc8655..6abddfcb68de 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsRefreshCertificateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsRefreshCertificateSamples.java @@ -9,7 +9,7 @@ */ public final class BucketsRefreshCertificateSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_RefreshCertificate.json + * x-ms-original-file: 2026-05-15-preview/Buckets_RefreshCertificate.json */ /** * Sample code: Buckets_RefreshCertificate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java index 82e3006cd577..d9ef1f98d1ac 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.java @@ -17,7 +17,7 @@ */ public final class BucketsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Buckets_Update.json + * x-ms-original-file: 2026-05-15-preview/Buckets_Update.json */ /** * Sample code: Buckets_Update. @@ -37,7 +37,7 @@ public static void bucketsUpdate(com.azure.resourcemanager.netapp.NetAppFilesMan } /* - * x-ms-original-file: 2026-05-01/Buckets_UpdateWithAkv.json + * x-ms-original-file: 2026-05-15-preview/Buckets_UpdateWithAkv.json */ /** * Sample code: Buckets_UpdateWithAkv. @@ -52,13 +52,16 @@ public static void bucketsUpdateWithAkv(com.azure.resourcemanager.netapp.NetAppF .withServer(new BucketServerPatchProperties().withFqdn("fullyqualified.domainname.com") .withOnCertificateConflictAction(OnCertificateConflictAction.FAIL)) .withPermissions(BucketPatchPermissions.READ_ONLY) - .withAkvDetails(new AzureKeyVaultDetails() - .withCertificateAkvDetails( - new CertificateAkvDetails().withCertificateKeyVaultUri("fakeTokenPlaceholder") - .withCertificateName("my-certificate")) - .withCredentialsAkvDetails( - new CredentialsAkvDetails().withCredentialsKeyVaultUri("fakeTokenPlaceholder") - .withSecretName("fakeTokenPlaceholder"))) + .withAkvDetails(new AzureKeyVaultDetails().withCertificateAkvDetails(new CertificateAkvDetails() + .withCertificateKeyVaultUri("fakeTokenPlaceholder") + .withCertificateName("my-certificate") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1")) + .withCredentialsAkvDetails(new CredentialsAkvDetails() + .withCredentialsKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) .apply(); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java index 56315a139cc5..ab83641da2eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Caches_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Caches_CreateOrUpdate.json */ /** * Sample code: Caches_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java index 38cdc49aba17..9a668b0df550 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class CachesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Caches_Delete.json + * x-ms-original-file: 2026-05-15-preview/Caches_Delete.json */ /** * Sample code: Caches_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java index f7809e5c6668..35685c20f2b4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.java @@ -9,7 +9,7 @@ */ public final class CachesGetSamples { /* - * x-ms-original-file: 2026-05-01/Caches_Get.json + * x-ms-original-file: 2026-05-15-preview/Caches_Get.json */ /** * Sample code: Caches_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java index fa547e6a4d9f..b79a6119aecb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java @@ -9,7 +9,7 @@ */ public final class CachesListPeeringPassphrasesSamples { /* - * x-ms-original-file: 2026-05-01/Caches_ListPeeringPassphrases.json + * x-ms-original-file: 2026-05-15-preview/Caches_ListPeeringPassphrases.json */ /** * Sample code: Caches_ListPeeringPassphrases. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListSamples.java index c985ee2c5b71..bb53d02aa084 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListSamples.java @@ -9,7 +9,7 @@ */ public final class CachesListSamples { /* - * x-ms-original-file: 2026-05-01/Caches_List.json + * x-ms-original-file: 2026-05-15-preview/Caches_List.json */ /** * Sample code: Caches_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java index acdad297b96a..cf475e22d8b7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.java @@ -11,7 +11,7 @@ */ public final class CachesPoolChangeSamples { /* - * x-ms-original-file: 2026-05-01/Caches_PoolChange.json + * x-ms-original-file: 2026-05-15-preview/Caches_PoolChange.json */ /** * Sample code: Caches_PoolChange. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesResetSmbPasswordSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesResetSmbPasswordSamples.java index b5b971c2d087..407c0f73e5bf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesResetSmbPasswordSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesResetSmbPasswordSamples.java @@ -9,7 +9,7 @@ */ public final class CachesResetSmbPasswordSamples { /* - * x-ms-original-file: 2026-05-01/Caches_ResetSmbPassword.json + * x-ms-original-file: 2026-05-15-preview/Caches_ResetSmbPassword.json */ /** * Sample code: Caches_ResetSmbPassword. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java index d164406aa6a4..421074f384ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class CachesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Caches_Update.json + * x-ms-original-file: 2026-05-15-preview/Caches_Update.json */ /** * Sample code: Caches_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..2284347a890c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticAccounts CreateOrUpdate. + */ +public final class ElasticAccountsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_CreateOrUpdate.json + */ + /** + * Sample code: ElasticAccounts_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "account1")) + .withProperties(new ElasticAccountProperties()) + .create(); + } + + // 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/ElasticAccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java new file mode 100644 index 000000000000..e0831f5667e0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts Delete. + */ +public final class ElasticAccountsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_Delete.json + */ + /** + * Sample code: ElasticAccounts_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().delete("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..74bcaee6ec34 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts GetByResourceGroup. + */ +public final class ElasticAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_Get.json + */ + /** + * Sample code: ElasticAccounts_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java new file mode 100644 index 000000000000..f243985c3dc6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts ListByResourceGroup. + */ +public final class ElasticAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_ListByResourceGroup.json + */ + /** + * Sample code: ElasticAccounts_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java new file mode 100644 index 000000000000..4a93458ec723 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticAccounts List. + */ +public final class ElasticAccountsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_ListBySubscription.json + */ + /** + * Sample code: ElasticAccounts_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java new file mode 100644 index 000000000000..1cb5a731b5bb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticAccounts Update. + */ +public final class ElasticAccountsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticAccounts_Update.json + */ + /** + * Sample code: ElasticAccounts_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticAccount resource = manager.elasticAccounts() + .getByResourceGroupWithResponse("myRG", "account1", 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/ElasticBackupPoliciesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d3421b1ffd63 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; + +/** + * Samples for ElasticBackupPolicies CreateOrUpdate. + */ +public final class ElasticBackupPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackupPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java new file mode 100644 index 000000000000..890e8ebeef81 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupPolicies Delete. + */ +public final class ElasticBackupPoliciesDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_Delete.json + */ + /** + * Sample code: ElasticBackupPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java new file mode 100644 index 000000000000..aad5d176ca99 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupPolicies Get. + */ +public final class ElasticBackupPoliciesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_Get.json + */ + /** + * Sample code: ElasticBackupPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java new file mode 100644 index 000000000000..eff163f2edce --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupPolicies ListByElasticAccount. + */ +public final class ElasticBackupPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_List.json + */ + /** + * Sample code: ElasticBackupPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java new file mode 100644 index 000000000000..c47a9c4e5ef3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; + +/** + * Samples for ElasticBackupPolicies Update. + */ +public final class ElasticBackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupPolicies_Update.json + */ + /** + * Sample code: ElasticBackupPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupPolicy resource = manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d942e7f9e654 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults CreateOrUpdate. + */ +public final class ElasticBackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Create.json + */ + /** + * Sample code: ElasticBackupVaults_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java new file mode 100644 index 000000000000..5719f302d026 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults Delete. + */ +public final class ElasticBackupVaultsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Delete.json + */ + /** + * Sample code: ElasticBackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .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/ElasticBackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java new file mode 100644 index 000000000000..25658dc1c17f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults Get. + */ +public final class ElasticBackupVaultsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Get.json + */ + /** + * Sample code: ElasticBackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .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/ElasticBackupVaultsListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java new file mode 100644 index 000000000000..02f7c8d88542 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackupVaults ListByElasticAccount. + */ +public final class ElasticBackupVaultsListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_ListByElasticAccount.json + */ + /** + * Sample code: ElasticBackupVaults_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupVaultsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java new file mode 100644 index 000000000000..d88475e85020 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ElasticBackupVaults Update. + */ +public final class ElasticBackupVaultsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackupVaults_Update.json + */ + /** + * Sample code: ElasticBackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupVault resource = manager.elasticBackupVaults() + .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/ElasticBackupsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..25ea3df4b32c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; + +/** + * Samples for ElasticBackups CreateOrUpdate. + */ +public final class ElasticBackupsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackups_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .define("backup1") + .withExistingElasticBackupVault("myRG", "account1", "backupVault1") + .withProperties(new ElasticBackupProperties().withLabel("myLabel") + .withElasticVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java new file mode 100644 index 000000000000..040e1fa307b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackups Delete. + */ +public final class ElasticBackupsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_Delete.json + */ + /** + * Sample code: ElasticBackups_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .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/ElasticBackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java new file mode 100644 index 000000000000..b7d850f7ef3f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackups Get. + */ +public final class ElasticBackupsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_Get.json + */ + /** + * Sample code: ElasticBackups_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .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/ElasticBackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java new file mode 100644 index 000000000000..10317248246c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticBackups ListByVault. + */ +public final class ElasticBackupsListByVaultSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_ListByVault.json + */ + /** + * Sample code: ElasticBackups_ListByVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups().listByVault("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/ElasticBackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java new file mode 100644 index 000000000000..656deb15b725 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticBackup; + +/** + * Samples for ElasticBackups Update. + */ +public final class ElasticBackupsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticBackups_Update.json + */ + /** + * Sample code: ElasticBackups_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackup resource = manager.elasticBackups() + .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/ElasticCapacityPoolsChangeZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java new file mode 100644 index 000000000000..f523f9fcf76b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; + +/** + * Samples for ElasticCapacityPools ChangeZone. + */ +public final class ElasticCapacityPoolsChangeZoneSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_ChangeZone.json + */ + /** + * Sample code: ElasticCapacityPools_ChangeZone. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsChangeZone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .changeZone("myRG", "account1", "pool1", new ChangeZoneRequest().withNewZone("3"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java new file mode 100644 index 000000000000..372eb8426632 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; + +/** + * Samples for ElasticCapacityPools CheckVolumeFilePathAvailability. + */ +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_CheckVolumeFilePathAvailability.json + */ + /** + * Sample code: ElasticCapacityPools_CheckVolumeFilePathAvailability. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCheckVolumeFilePathAvailability( + com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse("myRG", "account1", "pool1", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("my-exact-filepath"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..198720dfd87b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticEncryptionConfiguration; +import com.azure.resourcemanager.netapp.models.ElasticPoolEncryptionKeySource; +import com.azure.resourcemanager.netapp.models.ElasticServiceLevel; +import java.util.Arrays; + +/** + * Samples for ElasticCapacityPools CreateOrUpdate. + */ +public final class ElasticCapacityPoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_CreateOrUpdateCMK.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdateCMK. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsCreateOrUpdateCMK(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withEncryption(new ElasticEncryptionConfiguration() + .withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource.NET_APP) + .withKeyVaultPrivateEndpointResourceId("fakeTokenPlaceholder")) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_CreateOrUpdate.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java new file mode 100644 index 000000000000..e43f2d8ceb03 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticCapacityPools Delete. + */ +public final class ElasticCapacityPoolsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_Delete.json + */ + /** + * Sample code: ElasticCapacityPools_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java new file mode 100644 index 000000000000..3c0db525b58b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticCapacityPools Get. + */ +public final class ElasticCapacityPoolsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_Get.json + */ + /** + * Sample code: ElasticCapacityPools_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java new file mode 100644 index 000000000000..3793f634d3c1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticCapacityPools ListByElasticAccount. + */ +public final class ElasticCapacityPoolsListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_ListByElasticAccount.json + */ + /** + * Sample code: ElasticCapacityPools_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java new file mode 100644 index 000000000000..5e395496ea3c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; + +/** + * Samples for ElasticCapacityPools Update. + */ +public final class ElasticCapacityPoolsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticCapacityPools_Update.json + */ + /** + * Sample code: ElasticCapacityPools_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticCapacityPool resource = manager.elasticCapacityPools() + .getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticCapacityPoolUpdateProperties().withSize(4398046511104L) + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..6f46f77bf4ec --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; + +/** + * Samples for ElasticSnapshotPolicies CreateOrUpdate. + */ +public final class ElasticSnapshotPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshotPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java new file mode 100644 index 000000000000..757d5079873d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies Delete. + */ +public final class ElasticSnapshotPoliciesDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_Delete.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java new file mode 100644 index 000000000000..d14ae100a7e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies Get. + */ +public final class ElasticSnapshotPoliciesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_Get.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java new file mode 100644 index 000000000000..e2d176de928c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies ListByElasticAccount. + */ +public final class ElasticSnapshotPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_ListByElasticAccount.json + */ + /** + * Sample code: ElasticSnapshotPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java new file mode 100644 index 000000000000..c3b09d8f4e09 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshotPolicies ListElasticVolumes. + */ +public final class ElasticSnapshotPoliciesListElasticVolumesSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_ListElasticVolumes.json + */ + /** + * Sample code: ElasticSnapshotPolicies_ListElasticVolumes. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesListElasticVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .listElasticVolumes("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java new file mode 100644 index 000000000000..6ab59640d73a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; + +/** + * Samples for ElasticSnapshotPolicies Update. + */ +public final class ElasticSnapshotPoliciesUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshotPolicies_Update.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticSnapshotPolicy resource = manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..41aa6735ee7b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots CreateOrUpdate. + */ +public final class ElasticSnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshots_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .define("snapshot1") + .withExistingElasticVolume("myRG", "account1", "pool1", "volume1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java new file mode 100644 index 000000000000..935d440e6cd6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots Delete. + */ +public final class ElasticSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_Delete.json + */ + /** + * Sample code: ElasticSnapshots_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java new file mode 100644 index 000000000000..dbdd37efaa43 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots Get. + */ +public final class ElasticSnapshotsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_Get.json + */ + /** + * Sample code: ElasticSnapshots_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java new file mode 100644 index 000000000000..23bb297f4ba0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticSnapshots ListByElasticVolume. + */ +public final class ElasticSnapshotsListByElasticVolumeSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticSnapshots_ListByElasticVolume.json + */ + /** + * Sample code: ElasticSnapshots_ListByElasticVolume. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotsListByElasticVolume(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .listByElasticVolume("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/ElasticVolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..17da89c07132 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import java.util.Arrays; + +/** + * Samples for ElasticVolumes CreateOrUpdate. + */ +public final class ElasticVolumesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_CreateOrUpdate.json + */ + /** + * Sample code: ElasticVolumes_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .define("volume1") + .withRegion("eastus") + .withExistingElasticCapacityPool("myRG", "account1", "pool1") + .withProperties(new ElasticVolumeProperties().withFilePath("my-unique-file-path") + .withSize(107374182400L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1")))) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java new file mode 100644 index 000000000000..e1f3c1717757 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticVolumes Delete. + */ +public final class ElasticVolumesDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Delete.json + */ + /** + * Sample code: ElasticVolumes_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().delete("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/ElasticVolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java new file mode 100644 index 000000000000..90d67f5c8a12 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticVolumes Get. + */ +public final class ElasticVolumesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Get.json + */ + /** + * Sample code: ElasticVolumes_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .getWithResponse("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/ElasticVolumesListByElasticPoolSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java new file mode 100644 index 000000000000..f06e15dfdd45 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +/** + * Samples for ElasticVolumes ListByElasticPool. + */ +public final class ElasticVolumesListByElasticPoolSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_ListByElasticPool.json + */ + /** + * Sample code: ElasticVolumes_ListByElasticPool. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesListByElasticPool(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().listByElasticPool("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java new file mode 100644 index 000000000000..1ca5d8e67bbf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; + +/** + * Samples for ElasticVolumes Revert. + */ +public final class ElasticVolumesRevertSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Revert.json + */ + /** + * Sample code: ElasticVolumes_Revert. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .revert("myRG", "account1", "pool1", "volume1", new ElasticVolumeRevert().withSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java new file mode 100644 index 000000000000..24ecb8a15fe3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Arrays; + +/** + * Samples for ElasticVolumes Update. + */ +public final class ElasticVolumesUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ElasticVolumes_Update.json + */ + /** + * Sample code: ElasticVolumes_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticVolume resource = manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticVolumeUpdateProperties() + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")))) + .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 a18fe613dc12..50add746bcc8 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,7 +11,7 @@ */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: 2026-05-01/CheckFilePathAvailability.json + * x-ms-original-file: 2026-05-15-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -21,9 +21,9 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { manager.netAppResources() .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() - .withName("my-exact-filepth") + .withName("my-exact-filepath") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), com.azure.core.util.Context.NONE); } } 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 55d013cc7585..c015e9d0e553 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 @@ -12,7 +12,7 @@ */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2026-05-01/CheckNameAvailability.json + * x-ms-original-file: 2026-05-15-preview/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 b2fbba337786..9a305068aada 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 @@ -12,7 +12,7 @@ */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2026-05-01/CheckQuotaAvailability.json + * x-ms-original-file: 2026-05-15-preview/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 6370ac89eaba..9613fa16cb9f 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,7 +11,7 @@ */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: 2026-05-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2026-05-15-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -23,7 +23,7 @@ public static void networkSiblingSetQuery(com.azure.resourcemanager.netapp.NetAp .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"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), com.azure.core.util.Context.NONE); } } 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 d1c773ae191d..ff0eaf0d6471 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 @@ -9,7 +9,7 @@ */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: 2026-05-01/RegionInfo.json + * x-ms-original-file: 2026-05-15-preview/RegionInfo.json */ /** * Sample code: RegionInfo_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java index 19fdd6b52b5c..8b1a772aae88 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsAccountGetSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimitsAccount_Get.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java index 6b0dc0594772..29e72cadf111 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountListSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsAccountListSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimitsAccount_List.json */ /** * Sample code: QuotaLimits. 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 d0c26a450e37..25f53c1cd8a4 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 @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimits_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 3a41fddcb930..7044ad7ae21b 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 @@ -9,7 +9,7 @@ */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: 2026-05-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2026-05-15-preview/NetAppResourceQuotaLimits_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 index d2191498a13f..5d2b6ba2b36f 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: 2026-05-01/RegionInfos_Get.json + * x-ms-original-file: 2026-05-15-preview/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. 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 index 4bf8dff4c640..338191b45539 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: 2026-05-01/RegionInfos_List.json + * x-ms-original-file: 2026-05-15-preview/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. 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 034aa5e2d07d..a4c364ec385b 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,7 +12,7 @@ */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: 2026-05-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2026-05-15-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -24,7 +24,7 @@ public static void networkFeaturesUpdate(com.azure.resourcemanager.netapp.NetApp .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") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") .withNetworkSiblingSetStateId("12345_44420.8001578125") .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java index dcfbda96f6ee..9525547a35eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceUsagesGetSamples { /* - * x-ms-original-file: 2026-05-01/Usages_Get.json + * x-ms-original-file: 2026-05-15-preview/Usages_Get.json */ /** * Sample code: Usages_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java index 2df262370e32..c751a6b1168e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListSamples.java @@ -9,7 +9,7 @@ */ public final class NetAppResourceUsagesListSamples { /* - * x-ms-original-file: 2026-05-01/Usages_List.json + * x-ms-original-file: 2026-05-15-preview/Usages_List.json */ /** * Sample code: Usages_List. 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 501c36542642..c63b0efe995d 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 @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-05-01/OperationList.json + * x-ms-original-file: 2026-05-15-preview/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 f46b8bd26f40..78c43ff0e26a 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 @@ -12,7 +12,7 @@ */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -31,7 +31,7 @@ public static void poolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFi } /* - * x-ms-original-file: 2026-05-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2026-05-15-preview/Pools_CreateOrUpdate_CustomThroughput.json */ /** * Sample code: Pools_CreateOrUpdate_CustomThroughput. 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 6ede072181f9..92b4a5373130 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 @@ -9,7 +9,7 @@ */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 66b9415772e5..f774ec24f8a1 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 @@ -9,7 +9,7 @@ */ public final class PoolsGetSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2026-05-15-preview/Pools_Get_CustomThroughput.json */ /** * Sample code: Pools_Get_CustomThroughput. @@ -21,7 +21,7 @@ public static void poolsGetCustomThroughput(com.azure.resourcemanager.netapp.Net } /* - * x-ms-original-file: 2026-05-01/Pools_Get.json + * x-ms-original-file: 2026-05-15-preview/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 7c7ec3a77973..6f0363086d1a 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 @@ -9,7 +9,7 @@ */ public final class PoolsListSamples { /* - * x-ms-original-file: 2026-05-01/Pools_List.json + * x-ms-original-file: 2026-05-15-preview/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 079f075291fd..b268d37ae5de 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 @@ -11,7 +11,7 @@ */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Pools_Update.json + * x-ms-original-file: 2026-05-15-preview/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -25,7 +25,7 @@ public static void poolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManag } /* - * x-ms-original-file: 2026-05-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2026-05-15-preview/Pools_Update_CustomThroughput.json */ /** * Sample code: Pools_Update_CustomThroughput. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java index f45a2cae7f2b..d316ea60f8e0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.java @@ -13,7 +13,7 @@ */ public final class RansomwareReportsClearSuspectsSamples { /* - * x-ms-original-file: 2026-05-01/RansomwareReports_ClearSuspects.json + * x-ms-original-file: 2026-05-15-preview/RansomwareReports_ClearSuspects.json */ /** * Sample code: RansomwareReports_ClearSuspects. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java index d1c1b8f42dd8..91ab13bc1e6d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.java @@ -9,7 +9,7 @@ */ public final class RansomwareReportsGetSamples { /* - * x-ms-original-file: 2026-05-01/RansomwareReports_Get.json + * x-ms-original-file: 2026-05-15-preview/RansomwareReports_Get.json */ /** * Sample code: RansomwareReports_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java index e78272499d1e..7a6b6fa40dc3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.java @@ -9,7 +9,7 @@ */ public final class RansomwareReportsListSamples { /* - * x-ms-original-file: 2026-05-01/RansomwareReports_List.json + * x-ms-original-file: 2026-05-15-preview/RansomwareReports_List.json */ /** * Sample code: RansomwareReports_List. 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 1f0adc923847..d4c6d53196c3 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,7 +14,7 @@ */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2026-05-15-preview/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 db336c662445..23eecc3be6d8 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,7 +9,7 @@ */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 4e48de38372d..3f0ed5a35427 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 @@ -9,7 +9,7 @@ */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2026-05-15-preview/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 89656aa5fc11..866f684aa103 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 @@ -9,7 +9,7 @@ */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_List.json + * x-ms-original-file: 2026-05-15-preview/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 faab554362fe..e51b5233521a 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,7 +9,7 @@ */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2026-05-15-preview/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 ab34b1445c24..37a6328d6e20 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,7 +15,7 @@ */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2026-05-15-preview/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 b639268ab68d..32d53d7f9b24 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 @@ -9,7 +9,7 @@ */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_Create.json + * x-ms-original-file: 2026-05-15-preview/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 aec38a5a5be6..8dad32acd7dc 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 @@ -9,7 +9,7 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 9b1c7925c0b3..bab7b47331ca 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 @@ -9,7 +9,7 @@ */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_Get.json + * x-ms-original-file: 2026-05-15-preview/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 fc251b232712..846e6bf508e7 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 @@ -9,7 +9,7 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_List.json + * x-ms-original-file: 2026-05-15-preview/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 736133892a48..4c3e879fdb86 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,7 +12,7 @@ */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: 2026-05-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2026-05-15-preview/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. 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 5d580ab9c45b..b45baa15ccde 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 @@ -9,7 +9,7 @@ */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Create.json + * x-ms-original-file: 2026-05-15-preview/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 2afa73cda138..12c7062ef227 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 @@ -9,7 +9,7 @@ */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 b0af0f740774..889b86c68905 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 @@ -9,7 +9,7 @@ */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Metadata.json + * x-ms-original-file: 2026-05-15-preview/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 fbc8b8341d1c..eeb031c2975f 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 @@ -9,7 +9,7 @@ */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Get.json + * x-ms-original-file: 2026-05-15-preview/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 5ce77a1afcc8..23812f33acad 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 @@ -9,7 +9,7 @@ */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_List.json + * x-ms-original-file: 2026-05-15-preview/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 e2a6adb940b2..4dc302e11b34 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 @@ -11,7 +11,7 @@ */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Subvolumes_Update.json + * x-ms-original-file: 2026-05-15-preview/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 5d72d1250623..38ed45932bfa 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 @@ -5,8 +5,11 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.resourcemanager.netapp.models.ApplicationType; +import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.ExportPolicyRule; 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.VolumeGroupMetadata; import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; @@ -17,7 +20,7 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -177,7 +180,7 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -519,4 +522,571 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net .withVolumeSpecName("ora-backup"))) .create(); } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_Custom.json + */ + /** + * Sample code: VolumeGroups_Create_Custom. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsCreateCustom(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.fromString("CUSTOM")) + .withApplicationIdentifier("CU2")) + .withVolumes(Arrays.asList( + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data1"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data2"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data3"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data4"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data5"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data6"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data7"), + new VolumeGroupVolumeProperties().withName("test-cus-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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data8"), + new VolumeGroupVolumeProperties().withName("test-cus-data9") + .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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data9"), + new VolumeGroupVolumeProperties().withName("test-cus-data10") + .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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data10"), + new VolumeGroupVolumeProperties().withName("test-cus-data11") + .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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data11"), + new VolumeGroupVolumeProperties().withName("test-cus-data12") + .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/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withThroughputMibps(10.0F) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data12"))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Create_Custom_SMB.json + */ + /** + * Sample code: VolumeGroups_Create_Custom_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsCreateCustomSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups() + .define("group1") + .withExistingNetAppAccount("myRG", "account1") + .withRegion("westus") + .withGroupMetadata(new VolumeGroupMetadata().withGroupDescription("Volume group") + .withApplicationType(ApplicationType.fromString("CUSTOM")) + .withApplicationIdentifier("CU2")) + .withVolumes(Arrays.asList(new VolumeGroupVolumeProperties().withName("test-cus-data1") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data1"), + new VolumeGroupVolumeProperties().withName("test-cus-data2") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data2"), + new VolumeGroupVolumeProperties().withName("test-cus-data3") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data3"), + new VolumeGroupVolumeProperties().withName("test-cus-data4") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data4"), + new VolumeGroupVolumeProperties().withName("test-cus-data5") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data5"), + new VolumeGroupVolumeProperties().withName("test-cus-data6") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data6"), + new VolumeGroupVolumeProperties().withName("test-cus-data7") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data7"), + new VolumeGroupVolumeProperties().withName("test-cus-data8") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data8"), + new VolumeGroupVolumeProperties().withName("test-cus-data9") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data9"), + new VolumeGroupVolumeProperties().withName("test-cus-data10") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data10"), + new VolumeGroupVolumeProperties().withName("test-cus-data11") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data11"), + new VolumeGroupVolumeProperties().withName("test-cus-data12") + .withZones(Arrays.asList("1")) + .withCreationToken("fakeTokenPlaceholder") + .withServiceLevel(ServiceLevel.PREMIUM) + .withUsageThreshold(107374182400L) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withSmbEncryption(false) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED) + .withSmbContinuouslyAvailable(false) + .withThroughputMibps(10.0F) + .withAvsDataStore(AvsDataStore.DISABLED) + .withCapacityPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1") + .withVolumeSpecName("cus-data12"))) + .create(); + } } 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 7201ff79560d..1a9e07daa75f 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 @@ -9,7 +9,7 @@ */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 9a5d82c57825..cf410eb85f26 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,7 +9,19 @@ */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_Custom.json + */ + /** + * Sample code: VolumeGroups_Get_Custom. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsGetCustom(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups().getWithResponse("myRG", "account1", "group1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -21,7 +33,19 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-05-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_Get_Custom_SMB.json + */ + /** + * Sample code: VolumeGroups_Get_Custom_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsGetCustomSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups().getWithResponse("myRG", "account1", "group1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/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 dcb4308808ed..cb30245e84a2 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,7 +9,19 @@ */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-05-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_List_Custom.json + */ + /** + * Sample code: VolumeGroups_List_Custom. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumeGroupsListCustom(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumeGroups().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -21,7 +33,7 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-05-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2026-05-15-preview/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 078c18d53f51..7ad123db75db 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,7 +11,7 @@ */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2026-05-15-preview/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 b2dc9eb189b4..e24588b24584 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,7 +9,7 @@ */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2026-05-15-preview/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 db25aba9c2ca..4fcdb6f4ab60 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 @@ -9,7 +9,7 @@ */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2026-05-15-preview/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 71171a9a08b5..30c0310cdcfe 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 @@ -9,7 +9,7 @@ */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2026-05-15-preview/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 eae5b79e566c..42e6d3a06127 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,7 +11,7 @@ */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2026-05-15-preview/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java index e10bb96f32eb..ce911744f4d4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesAuthorizeExternalReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_AuthorizeExternalReplication.json */ /** * Sample code: Volumes_AuthorizeExternalReplication. 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 342e9110ebd6..31b5eadbc477 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,7 +11,7 @@ */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2026-05-15-preview/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 050534296591..ef8dffd5caef 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 @@ -11,7 +11,7 @@ */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2026-05-15-preview/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 bb8c093b91bf..0f2850d656cb 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,7 +11,7 @@ */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_BreakReplication.json + * x-ms-original-file: 2026-05-15-preview/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 7e2e9231b678..52bd4dea1441 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 @@ -11,7 +11,7 @@ */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -26,7 +26,7 @@ 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") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .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 b4c87f68f209..edac56bc9f09 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,7 +9,7 @@ */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2026-05-15-preview/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 806da0747388..4fce5bcfa492 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 @@ -9,7 +9,7 @@ */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Delete.json + * x-ms-original-file: 2026-05-15-preview/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java index 532caba845d0..1d717a1385f0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeExternalReplicationSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesFinalizeExternalReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2026-05-15-preview/Volumes_FinalizeExternalReplication.json */ /** * Sample code: Volumes_FinalizeExternalReplication. 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 ad3293ac6a01..7348b24d66a0 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,7 +9,7 @@ */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2026-05-15-preview/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 68ee2baf7ea9..bcfcdcbc0138 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 @@ -9,7 +9,19 @@ */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Get.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ExtraLargeVolumes_Get.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeGet. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/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 242bbdb76a0d..a77740ae282b 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 @@ -11,7 +11,7 @@ */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: 2026-05-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2026-05-15-preview/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java index 565f5caddec6..a92c75a1423c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesListQuotaReportSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ListQuotaReport.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ListQuotaReport.json */ /** * Sample code: ListQuotaReport. 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 6267a7dec23d..0fd8fed1d0e8 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 @@ -12,7 +12,7 @@ */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ListReplications.json + * x-ms-original-file: 2026-05-15-preview/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 054534dd850c..8f88c26beb9e 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 @@ -9,7 +9,19 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_List.json + * x-ms-original-file: 2026-05-15-preview/Volumes_ExtraLargeVolumes_List.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Volumes_List.json */ /** * Sample code: Volumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java index f10d08711d6a..56b1e19e89a5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterSamples.java @@ -12,7 +12,7 @@ */ public final class VolumesPeerExternalClusterSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PeerExternalCluster.json */ /** * Sample code: Volumes_PeerExternalCluster. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java index ccab6febcdb5..91db6d86fcdd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPerformReplicationTransferSamples.java @@ -9,7 +9,7 @@ */ public final class VolumesPerformReplicationTransferSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PerformReplicationTransfer.json */ /** * Sample code: Volumes_PerformReplicationTransfer. 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 b3dc83b7ac1b..52fb90b40bdb 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 @@ -11,7 +11,7 @@ */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_PoolChange.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_PoolChange. 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 c512098210a6..819c10cd4a34 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: 2026-05-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2026-05-15-preview/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. 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 fd839ac83ce6..0caea56a2ef1 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,7 +9,7 @@ */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2026-05-15-preview/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 87bacb568403..95a1e8204c1b 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,7 +11,7 @@ */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2026-05-15-preview/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 f2d437373511..e34f15eacc2d 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 @@ -11,7 +11,7 @@ */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Relocate.json + * x-ms-original-file: 2026-05-15-preview/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 d469c8856698..fc694a735140 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,7 +9,7 @@ */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2026-05-15-preview/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 90070851cebc..3b6e4dbb9604 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,7 +9,7 @@ */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2026-05-15-preview/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 c2613837fbd2..5233bbbf83c2 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,7 +9,7 @@ */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2026-05-15-preview/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 d6855f721afd..6aba862b04bf 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,7 +9,7 @@ */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2026-05-15-preview/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 4e023c072990..765e2607af6b 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 @@ -11,7 +11,7 @@ */ public final class VolumesRevertSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Revert.json + * x-ms-original-file: 2026-05-15-preview/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 index 5c38c683e9ea..f5f0ce626d4b 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class VolumesSplitCloneFromParentSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_SplitClone.json + * x-ms-original-file: 2026-05-15-preview/Volumes_SplitClone.json */ /** * Sample code: Volumes_SplitClone. 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 f062ad43467d..fee7f90edc3d 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 @@ -11,7 +11,7 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2026-05-01/Volumes_Update.json + * x-ms-original-file: 2026-05-15-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. 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 7d9d11813057..6fe93453f911 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 @@ -27,7 +27,7 @@ public void testRenewCredentials() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.accounts().renewCredentials("atvfuzkaftj", "vru", com.azure.core.util.Context.NONE); + manager.accounts().renewCredentials("rmvzti", "cwviqllukhk", com.azure.core.util.Context.NONE); } } 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 da5a239dcdab..b6468e0ef3df 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 @@ -23,7 +23,7 @@ public final class BackupPoliciesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupPolicyId\":\"otoihiqa\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1733569114,\"weeklyBackupsToKeep\":995984285,\"monthlyBackupsToKeep\":587303890,\"volumesAssigned\":1264970235,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"podaq\",\"volumeResourceId\":\"sipi\",\"backupsCount\":1379010451,\"policyEnabled\":false},{\"volumeName\":\"jfulbmoic\",\"volumeResourceId\":\"lpnfpubntnb\",\"backupsCount\":750535410,\"policyEnabled\":true},{\"volumeName\":\"sowsaael\",\"volumeResourceId\":\"ttcjuhplrvkmjc\",\"backupsCount\":1748299697,\"policyEnabled\":false}]},\"etag\":\"fggc\",\"location\":\"yylizrz\",\"tags\":{\"ztlvtmvagbwidqlv\":\"sfxsf\",\"rvjfnmjmvlw\":\"ukoveofi\"},\"id\":\"z\",\"name\":\"iblkujr\",\"type\":\"lfojuidjp\"}"; + = "{\"properties\":{\"backupPolicyId\":\"qqzlgcndhz\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":63585688,\"weeklyBackupsToKeep\":2141593626,\"monthlyBackupsToKeep\":1409559335,\"volumesAssigned\":678517721,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"pphefsbzx\",\"volumeResourceId\":\"zxomeikjclwz\",\"backupsCount\":1246929376,\"policyEnabled\":true},{\"volumeName\":\"fsuqtaazyqbxy\",\"volumeResourceId\":\"yfp\",\"backupsCount\":495775469,\"policyEnabled\":false},{\"volumeName\":\"zxlhdjzqdcadwv\",\"volumeResourceId\":\"ozjiihj\",\"backupsCount\":912203649,\"policyEnabled\":false}]},\"etag\":\"zo\",\"location\":\"nxwdvwnjkg\",\"tags\":{\"uyvpirf\":\"mxaursqftibtyi\"},\"id\":\"jpnqnoowsbeden\",\"name\":\"exkxbhx\",\"type\":\"ucnulgmnh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,22 +33,22 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .define("w") - .withRegion("vtrrmhwrbfdpyflu") - .withExistingNetAppAccount("xmycjimryvwgcw", "pbmz") - .withTags(mapOf("ocu", "jgl", "n", "zlwhhmemhooclu", "jk", "qmemc", "rryejylmbkzudnig", "mykyujxsglhs")) - .withDailyBackupsToKeep(2037485409) - .withWeeklyBackupsToKeep(1456843419) - .withMonthlyBackupsToKeep(189675517) + .define("uoqujlyeg") + .withRegion("yrsrziuctixgb") + .withExistingNetAppAccount("vop", "m") + .withTags(mapOf("apezkiswqjmdghs", "ifrevk")) + .withDailyBackupsToKeep(1010516946) + .withWeeklyBackupsToKeep(2054195365) + .withMonthlyBackupsToKeep(1755687285) .withEnabled(true) .create(); - Assertions.assertEquals("yylizrz", response.location()); - Assertions.assertEquals("sfxsf", response.tags().get("ztlvtmvagbwidqlv")); - Assertions.assertEquals(1733569114, response.dailyBackupsToKeep()); - Assertions.assertEquals(995984285, response.weeklyBackupsToKeep()); - Assertions.assertEquals(587303890, response.monthlyBackupsToKeep()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("nxwdvwnjkg", response.location()); + Assertions.assertEquals("mxaursqftibtyi", response.tags().get("uyvpirf")); + Assertions.assertEquals(63585688, response.dailyBackupsToKeep()); + Assertions.assertEquals(2141593626, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1409559335, response.monthlyBackupsToKeep()); + Assertions.assertFalse(response.enabled()); } // Use "Map.of" if available 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 a4751343cab1..fb2b6f3c916b 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 @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.backupPolicies() - .delete("ccrrvweyoxoyyu", "phaimmoi", "oqboshbragapyyr", com.azure.core.util.Context.NONE); + manager.backupPolicies().delete("zknxkv", "cxetyvkunmignoh", "k", 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 a2d847c92255..c62d0901fab8 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 @@ -21,7 +21,7 @@ public final class BackupPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupPolicyId\":\"tx\",\"provisioningState\":\"tznapxbannovv\",\"dailyBackupsToKeep\":1885263219,\"weeklyBackupsToKeep\":987390014,\"monthlyBackupsToKeep\":1798677883,\"volumesAssigned\":1728188290,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ev\",\"volumeResourceId\":\"lyokrrrou\",\"backupsCount\":1321738154,\"policyEnabled\":true},{\"volumeName\":\"sbcrymodizrxklo\",\"volumeResourceId\":\"xnazpmkml\",\"backupsCount\":1941979799,\"policyEnabled\":false}]},\"etag\":\"zopjhbzxliohr\",\"location\":\"dtfgxqbawpcbb\",\"tags\":{\"zb\":\"cyknapqofyuicd\"},\"id\":\"ybww\",\"name\":\"bdvibidmhmwffpl\",\"type\":\"muvapc\"}"; + = "{\"properties\":{\"backupPolicyId\":\"dltb\",\"provisioningState\":\"tqjfgxxsaet\",\"dailyBackupsToKeep\":1767785914,\"weeklyBackupsToKeep\":44057145,\"monthlyBackupsToKeep\":662744658,\"volumesAssigned\":137079065,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"lzdcduwjoedxng\",\"volumeResourceId\":\"aifpaurwwgil\",\"backupsCount\":797770967,\"policyEnabled\":false},{\"volumeName\":\"dmkxwxdcvjwcy\",\"volumeResourceId\":\"akeciqchx\",\"backupsCount\":1959579923,\"policyEnabled\":true}]},\"etag\":\"siw\",\"location\":\"m\",\"tags\":{\"grpxncakiqaondjr\":\"hzzwvywrgyngy\",\"ykglt\":\"clamgglvlmfejdoq\",\"tlgflwfgz\":\"gxhqfgqkayejs\"},\"id\":\"iucijjcea\",\"name\":\"lijjjrtvam\",\"type\":\"a\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .getWithResponse("ec", "qct", "xxdtddmflh", com.azure.core.util.Context.NONE) + .getWithResponse("ulhmzyq", "hdvafjrqpjiyrqjc", "gaxwmzwdfkbnrzo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dtfgxqbawpcbb", response.location()); - Assertions.assertEquals("cyknapqofyuicd", response.tags().get("zb")); - Assertions.assertEquals(1885263219, response.dailyBackupsToKeep()); - Assertions.assertEquals(987390014, response.weeklyBackupsToKeep()); - Assertions.assertEquals(1798677883, response.monthlyBackupsToKeep()); + Assertions.assertEquals("m", response.location()); + Assertions.assertEquals("hzzwvywrgyngy", response.tags().get("grpxncakiqaondjr")); + Assertions.assertEquals(1767785914, response.dailyBackupsToKeep()); + Assertions.assertEquals(44057145, response.weeklyBackupsToKeep()); + Assertions.assertEquals(662744658, response.monthlyBackupsToKeep()); Assertions.assertTrue(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 3e366ab2758e..7c1e55e6a5ba 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 @@ -22,7 +22,7 @@ public final class BackupPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"ppdbwnupgahxkum\",\"provisioningState\":\"jcaacfdmmcpugm\",\"dailyBackupsToKeep\":651798671,\"weeklyBackupsToKeep\":1894610701,\"monthlyBackupsToKeep\":36314711,\"volumesAssigned\":147186923,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"whoqhnlbqnbldxe\",\"volumeResourceId\":\"lgsc\",\"backupsCount\":292039412,\"policyEnabled\":true}]},\"etag\":\"rsrrmoucsofldp\",\"location\":\"iyfc\",\"tags\":{\"qi\":\"eolhbhlvbmx\",\"tkcudfbsfarfsiow\":\"s\"},\"id\":\"kjxnqpvwgfstmhq\",\"name\":\"kizmdksaoafclu\",\"type\":\"v\"}]}"; + = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"fcfxzirzzihvwy\",\"provisioningState\":\"suvjslcz\",\"dailyBackupsToKeep\":692238773,\"weeklyBackupsToKeep\":1630031536,\"monthlyBackupsToKeep\":1226572199,\"volumesAssigned\":1584534846,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"mvxad\",\"volumeResourceId\":\"cfrgnawbabgfbkt\",\"backupsCount\":1269868671,\"policyEnabled\":false},{\"volumeName\":\"l\",\"volumeResourceId\":\"yq\",\"backupsCount\":988633110,\"policyEnabled\":false},{\"volumeName\":\"owoxqmj\",\"volumeResourceId\":\"jcx\",\"backupsCount\":442050176,\"policyEnabled\":true}]},\"etag\":\"lusrv\",\"location\":\"simjceagbjqvlsu\",\"tags\":{\"shxgonoy\":\"z\"},\"id\":\"fq\",\"name\":\"puby\",\"type\":\"nclkfkeeb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,13 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.backupPolicies().list("fsv", "pavbo", com.azure.core.util.Context.NONE); + = manager.backupPolicies().list("gqogjwpindedva", "bxbhmedeilbj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iyfc", response.iterator().next().location()); - Assertions.assertEquals("eolhbhlvbmx", response.iterator().next().tags().get("qi")); - Assertions.assertEquals(651798671, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(1894610701, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(36314711, response.iterator().next().monthlyBackupsToKeep()); + Assertions.assertEquals("simjceagbjqvlsu", response.iterator().next().location()); + Assertions.assertEquals("z", response.iterator().next().tags().get("shxgonoy")); + Assertions.assertEquals(692238773, response.iterator().next().dailyBackupsToKeep()); + Assertions.assertEquals(1630031536, response.iterator().next().weeklyBackupsToKeep()); + Assertions.assertEquals(1226572199, response.iterator().next().monthlyBackupsToKeep()); Assertions.assertFalse(response.iterator().next().enabled()); } } 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 index 054c82eb5ca0..eba091f86a48 100644 --- 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 @@ -12,22 +12,23 @@ public final class BackupRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupRestoreFiles model = BinaryData.fromString( - "{\"fileList\":[\"dj\",\"syxkyxvxevblb\"],\"restoreFilePath\":\"dnlj\",\"destinationVolumeId\":\"age\"}") + BackupRestoreFiles model = BinaryData + .fromString( + "{\"fileList\":[\"wggahttzlswvaj\",\"fu\"],\"restoreFilePath\":\"x\",\"destinationVolumeId\":\"oqza\"}") .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("dj", model.fileList().get(0)); - Assertions.assertEquals("dnlj", model.restoreFilePath()); - Assertions.assertEquals("age", model.destinationVolumeId()); + Assertions.assertEquals("wggahttzlswvaj", model.fileList().get(0)); + Assertions.assertEquals("x", model.restoreFilePath()); + Assertions.assertEquals("oqza", model.destinationVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("dj", "syxkyxvxevblb")) - .withRestoreFilePath("dnlj") - .withDestinationVolumeId("age"); + BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("wggahttzlswvaj", "fu")) + .withRestoreFilePath("x") + .withDestinationVolumeId("oqza"); model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("dj", model.fileList().get(0)); - Assertions.assertEquals("dnlj", model.restoreFilePath()); - Assertions.assertEquals("age", model.destinationVolumeId()); + Assertions.assertEquals("wggahttzlswvaj", model.fileList().get(0)); + Assertions.assertEquals("x", model.restoreFilePath()); + Assertions.assertEquals("oqza", model.destinationVolumeId()); } } 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 index 103db67552ac..4a34d90bb0e6 100644 --- 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 @@ -23,7 +23,7 @@ public final class BackupVaultsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"ypxrx\",\"tags\":{\"m\":\"ihwuhvctafsrbxrb\",\"spnxwqagnepzw\":\"iowxi\"},\"id\":\"klsbsbqqqagw\",\"name\":\"rxaomzisglrrcze\",\"type\":\"k\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"xtminklogxsvtzar\",\"tags\":{\"wzzoslpk\":\"qnsqktcmb\",\"emqbmfuvqarwzxuq\":\"btglwkzpgajsqj\"},\"id\":\"ebluimmbwx\",\"name\":\"fgtdmbvx\",\"type\":\"kraokq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,14 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .define("xtwbta") - .withRegion("hpxycphdrwjjk") - .withExistingNetAppAccount("lzgaufcshhvnew", "nxkympqanxrjk") - .withTags(mapOf("qpd", "omacluzvxnqmhr", "ssffxuifmc", "wmkoisq", "zsylollgt", "ypobkdqzr", "vuaurk", - "czzydmxzjij")) + .define("hpcnabxzfsn") + .withRegion("wncknr") + .withExistingNetAppAccount("xv", "nzdpvoco") + .withTags(mapOf("yrth", "jlskzptjxulweu", "hokamvfej", "qlehmcgcjeinu", "abzfivf", "qnttmbq")) .create(); - Assertions.assertEquals("ypxrx", response.location()); - Assertions.assertEquals("ihwuhvctafsrbxrb", response.tags().get("m")); + Assertions.assertEquals("xtminklogxsvtzar", response.location()); + Assertions.assertEquals("qnsqktcmb", response.tags().get("wzzoslpk")); } // Use "Map.of" if available 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 index 8154226b959b..62a9c7c62bd1 100644 --- 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 @@ -21,7 +21,7 @@ public final class BackupVaultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"frdbiqmrjgeihf\"},\"location\":\"ggwfiwz\",\"tags\":{\"j\":\"jpbyephmgtv\"},\"id\":\"rc\",\"name\":\"yfqi\",\"type\":\"gxhnpomyqwcabv\"}"; + = "{\"properties\":{\"provisioningState\":\"shajqf\"},\"location\":\"peexpgeumilhwuit\",\"tags\":{\"ofninbdbz\":\"xyio\",\"bprt\":\"xcwqqrsmpc\",\"ivmfogdrtbf\":\"gavbzbcyk\",\"awvifdxke\":\"mkrftsjcwjjxsgm\"},\"id\":\"if\",\"name\":\"ocjxw\",\"type\":\"loozrvt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .getWithResponse("phavpmhbrb", "gvgovpbbttefjo", "nssqyzqed", com.azure.core.util.Context.NONE) + .getWithResponse("mtvtvegwqiukvzwy", "wtthaokgksk", "i", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ggwfiwz", response.location()); - Assertions.assertEquals("jpbyephmgtv", response.tags().get("j")); + Assertions.assertEquals("peexpgeumilhwuit", response.location()); + Assertions.assertEquals("xyio", response.tags().get("ofninbdbz")); } } 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 index cb00ffbbf61d..ae99068697d1 100644 --- 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 @@ -22,7 +22,7 @@ public final class BackupVaultsListByNetAppAccountMockTests { @Test public void testListByNetAppAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"gm\"},\"location\":\"fjlrxwtoauk\",\"tags\":{\"oaedsxjwuivedwcg\":\"vcisiz\"},\"id\":\"eewxeiqbpsmg\",\"name\":\"mguaml\",\"type\":\"dlrgms\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"gjgvr\"},\"location\":\"vpygglp\",\"tags\":{\"yarvsxzqbglcjk\":\"dcueljtiahxmfq\",\"btl\":\"yspthzod\",\"kfmkmfdjxyxgbk\":\"jtgblios\"},\"id\":\"qvjcteoe\",\"name\":\"l\",\"type\":\"slskkz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testListByNetAppAccount() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.backupVaults().listByNetAppAccount("ui", "eeyaswl", com.azure.core.util.Context.NONE); + = manager.backupVaults().listByNetAppAccount("vcmuf", "nlcpxxviry", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fjlrxwtoauk", response.iterator().next().location()); - Assertions.assertEquals("vcisiz", response.iterator().next().tags().get("oaedsxjwuivedwcg")); + Assertions.assertEquals("vpygglp", response.iterator().next().location()); + Assertions.assertEquals("dcueljtiahxmfq", response.iterator().next().tags().get("yarvsxzqbglcjk")); } } 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 index e482afb52d8d..262cfaa2c8a6 100644 --- 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 @@ -21,7 +21,7 @@ public final class BackupsCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"backupId\":\"gsxgnxfyqon\",\"creationDate\":\"2021-01-30T13:57:25Z\",\"snapshotCreationDate\":\"2021-05-25T17:04:08Z\",\"completionDate\":\"2021-08-14T04:57:20Z\",\"provisioningState\":\"Succeeded\",\"size\":6298866182092373777,\"label\":\"inheh\",\"backupType\":\"Manual\",\"failureReason\":\"fvwbcb\",\"volumeResourceId\":\"embnkbw\",\"useExistingSnapshot\":true,\"snapshotName\":\"kdi\",\"backupPolicyResourceId\":\"ihebwtsw\",\"isLargeVolume\":true},\"id\":\"fmd\",\"name\":\"ragegi\",\"type\":\"vcjfelisdjubggb\"}"; + = "{\"properties\":{\"backupId\":\"il\",\"creationDate\":\"2021-03-16T04:57:46Z\",\"snapshotCreationDate\":\"2021-11-10T20:56:07Z\",\"completionDate\":\"2021-08-21T08:40:36Z\",\"provisioningState\":\"Succeeded\",\"size\":7544525737640444485,\"label\":\"mgzvyfi\",\"backupType\":\"Scheduled\",\"failureReason\":\"uqnwsithu\",\"volumeResourceId\":\"olyahluqwqulsut\",\"useExistingSnapshot\":true,\"snapshotName\":\"xykfhyq\",\"backupPolicyResourceId\":\"vqqugdrftbcv\",\"isLargeVolume\":true},\"id\":\"uquowtljvfwhr\",\"name\":\"agk\",\"type\":\"yxvrqtvbczsul\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Backup response = manager.backups() - .define("zvcpopm") - .withExistingBackupVault("vigorqjbttzhragl", "afhonqj", "jeick") - .withVolumeResourceId("wakoihkn") - .withLabel("wabzxrvxcushsp") - .withUseExistingSnapshot(true) - .withSnapshotName("lmljhlnymzotq") + .define("az") + .withExistingBackupVault("jbx", "jybvit", "qkj") + .withVolumeResourceId("wxh") + .withLabel("izvoaiknaqlnuwi") + .withUseExistingSnapshot(false) + .withSnapshotName("tl") .create(); - Assertions.assertEquals("inheh", response.label()); - Assertions.assertEquals("embnkbw", response.volumeResourceId()); + Assertions.assertEquals("mgzvyfi", response.label()); + Assertions.assertEquals("olyahluqwqulsut", response.volumeResourceId()); Assertions.assertTrue(response.useExistingSnapshot()); - Assertions.assertEquals("kdi", response.snapshotName()); + Assertions.assertEquals("xykfhyq", 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 index 05841911790c..5b3ac07177fc 100644 --- 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 @@ -20,7 +20,7 @@ public final class BackupsGetLatestStatusWithResponseMockTests { @Test public void testGetLatestStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"nzrdpsovwxz\",\"errorMessage\":\"tgoe\",\"lastTransferSize\":4927977649510547079,\"lastTransferType\":\"bp\",\"totalTransferBytes\":2067611322394528178,\"transferProgressBytes\":3863385123536090602}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Uninitialized\",\"unhealthyReason\":\"bsfledynojpziu\",\"errorMessage\":\"bzkkd\",\"lastTransferSize\":2422586058764089090,\"lastTransferType\":\"ycljselpkpbaf\",\"totalTransferBytes\":2658808406766162563,\"transferProgressBytes\":2279051532558520266}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,8 @@ public void testGetLatestStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupStatus response = manager.backups() - .getLatestStatusWithResponse("bjwgnyfus", "zsvtuikzhajqgl", "fh", "l", com.azure.core.util.Context.NONE) + .getLatestStatusWithResponse("y", "suhbrnn", "jxsqwjhqkbiwetp", "zycyqiqyhg", + com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java index 39cf047ecd25..ce47d10fb461 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class BackupsGetVolumeLatestRestoreStatusWithResponseMockTests { @Test public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"xieixynllxec\",\"errorMessage\":\"rojphslhcawjutif\",\"totalTransferBytes\":6724347549696563054}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"hvhfnracw\",\"errorMessage\":\"qigtuujwouhdaws\",\"totalTransferBytes\":1782956154841144799}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RestoreStatus response = manager.backups() - .getVolumeLatestRestoreStatusWithResponse("vntjlrigjk", "kyrioovzid", "xwaabzmifrygznmm", "xrizkzobgop", - com.azure.core.util.Context.NONE) + .getVolumeLatestRestoreStatusWithResponse("lc", "bevxrhyzd", "wrso", "pl", 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 index 4ea136e7abf6..3ceda73fc290 100644 --- 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 @@ -21,7 +21,7 @@ public final class BackupsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupId\":\"d\",\"creationDate\":\"2021-10-26T21:49:23Z\",\"snapshotCreationDate\":\"2021-09-29T08:46:02Z\",\"completionDate\":\"2021-04-08T06:17:43Z\",\"provisioningState\":\"d\",\"size\":2317307583598027540,\"label\":\"hewjptmcgsbost\",\"backupType\":\"Manual\",\"failureReason\":\"dlat\",\"volumeResourceId\":\"tmzlbiojlv\",\"useExistingSnapshot\":true,\"snapshotName\":\"bpneqvcwwyyurm\",\"backupPolicyResourceId\":\"hppr\",\"isLargeVolume\":true},\"id\":\"mo\",\"name\":\"ayzejnhlbkpbz\",\"type\":\"cpilj\"}"; + = "{\"properties\":{\"backupId\":\"zatvfuzka\",\"creationDate\":\"2021-04-12T15:01:43Z\",\"snapshotCreationDate\":\"2021-03-25T16:42:15Z\",\"completionDate\":\"2021-09-01T14:42:15Z\",\"provisioningState\":\"wigsyeipqdsm\",\"size\":3167223347313894716,\"label\":\"gdgkki\",\"backupType\":\"Manual\",\"failureReason\":\"kcsmk\",\"volumeResourceId\":\"hwtbbaedorvvm\",\"useExistingSnapshot\":false,\"snapshotName\":\"ygbdgwumgxdgdhpa\",\"backupPolicyResourceId\":\"dexjddvjs\",\"isLargeVolume\":true},\"id\":\"tm\",\"name\":\"wllcolsr\",\"type\":\"xaptefhexcgjok\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Backup response = manager.backups() - .getWithResponse("vkzqk", "jeokbzefezrxccz", "rtle", "pqxbkwvzgnzvdf", com.azure.core.util.Context.NONE) + .getWithResponse("emxhzzy", "ev", "sxivzrrryvei", "ipsk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hewjptmcgsbost", response.label()); - Assertions.assertEquals("tmzlbiojlv", response.volumeResourceId()); - Assertions.assertTrue(response.useExistingSnapshot()); - Assertions.assertEquals("bpneqvcwwyyurm", response.snapshotName()); + Assertions.assertEquals("gdgkki", response.label()); + Assertions.assertEquals("hwtbbaedorvvm", response.volumeResourceId()); + Assertions.assertFalse(response.useExistingSnapshot()); + Assertions.assertEquals("ygbdgwumgxdgdhpa", 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 index 4993b9c4ca27..271dc5be6f69 100644 --- 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 @@ -22,7 +22,7 @@ public final class BackupsListByVaultMockTests { @Test public void testListByVault() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupId\":\"bwefqsfapaqtfer\",\"creationDate\":\"2021-03-29T04:36:42Z\",\"snapshotCreationDate\":\"2021-10-04T18:51:58Z\",\"completionDate\":\"2021-02-26T13:58:55Z\",\"provisioningState\":\"fxapjwogqqnobpu\",\"size\":7703831539492858115,\"label\":\"tqwpwya\",\"backupType\":\"Scheduled\",\"failureReason\":\"sqbuc\",\"volumeResourceId\":\"jg\",\"useExistingSnapshot\":false,\"snapshotName\":\"aoguyaipids\",\"backupPolicyResourceId\":\"ultxijjumfq\",\"isLargeVolume\":false},\"id\":\"nqnm\",\"name\":\"jng\",\"type\":\"qdqx\"}]}"; + = "{\"value\":[{\"properties\":{\"backupId\":\"nwqjwgokn\",\"creationDate\":\"2021-01-25T17:46:24Z\",\"snapshotCreationDate\":\"2021-03-31T15:58:55Z\",\"completionDate\":\"2021-06-22T17:36:36Z\",\"provisioningState\":\"b\",\"size\":9183686445747419798,\"label\":\"jbzten\",\"backupType\":\"Manual\",\"failureReason\":\"yk\",\"volumeResourceId\":\"tjknsxfwushcdp\",\"useExistingSnapshot\":false,\"snapshotName\":\"qrmgjfbpkuw\",\"backupPolicyResourceId\":\"oiojfizfavkjzwfb\",\"isLargeVolume\":false},\"id\":\"kmmfzsbf\",\"name\":\"xrzxmdewsrsxkrp\",\"type\":\"bjazejwwviy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testListByVault() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.backups().listByVault("a", "zv", "chndbnwie", "olewjwi", com.azure.core.util.Context.NONE); + PagedIterable response = manager.backups() + .listByVault("ljnhvlqj", "ek", "eeksnbksdqhjvyk", "xeslkhhustcpoqm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tqwpwya", response.iterator().next().label()); - Assertions.assertEquals("jg", response.iterator().next().volumeResourceId()); + Assertions.assertEquals("jbzten", response.iterator().next().label()); + Assertions.assertEquals("tjknsxfwushcdp", response.iterator().next().volumeResourceId()); Assertions.assertFalse(response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("aoguyaipids", response.iterator().next().snapshotName()); + Assertions.assertEquals("qrmgjfbpkuw", response.iterator().next().snapshotName()); } } 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 index f47a9804f370..9f88131c0688 100644 --- 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 @@ -12,14 +12,14 @@ public final class BackupsMigrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupsMigrationRequest model - = BinaryData.fromString("{\"backupVaultId\":\"jhlfzswpchwahf\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("jhlfzswpchwahf", model.backupVaultId()); + = BinaryData.fromString("{\"backupVaultId\":\"fypiv\"}").toObject(BackupsMigrationRequest.class); + Assertions.assertEquals("fypiv", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("jhlfzswpchwahf"); + BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("fypiv"); model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("jhlfzswpchwahf", model.backupVaultId()); + Assertions.assertEquals("fypiv", model.backupVaultId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java index 40dbea5ddc00..e355546cc655 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class CachesListPeeringPassphrasesWithResponseMockTests { @Test public void testListPeeringPassphrasesWithResponse() throws Exception { String responseStr - = "{\"clusterPeeringCommand\":\"qkyojwyvf\",\"clusterPeeringPassphrase\":\"mbtsuahxsg\",\"vserverPeeringCommand\":\"jcmmzrrscub\",\"criticalWarning\":\"sd\"}"; + = "{\"clusterPeeringCommand\":\"pglaoh\",\"clusterPeeringPassphrase\":\"qk\",\"vserverPeeringCommand\":\"jtnqjil\",\"criticalWarning\":\"wkdcwmqs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testListPeeringPassphrasesWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PeeringPassphrases response = manager.caches() - .listPeeringPassphrasesWithResponse("qb", "jhvefgwbmqjchnt", "sf", "ymxbulpzealb", + .listPeeringPassphrasesWithResponse("mjpddnyxf", "uvrzmzqmzjqrb", "pv", "mdyfoebojtj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qkyojwyvf", response.clusterPeeringCommand()); - Assertions.assertEquals("mbtsuahxsg", response.clusterPeeringPassphrase()); - Assertions.assertEquals("jcmmzrrscub", response.vserverPeeringCommand()); + Assertions.assertEquals("pglaoh", response.clusterPeeringCommand()); + Assertions.assertEquals("qk", response.clusterPeeringPassphrase()); + Assertions.assertEquals("jtnqjil", response.vserverPeeringCommand()); } } 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 3364d6ad5dde..2616358d6f9d 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,36 +17,36 @@ public final class CapacityPoolInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolInner model = BinaryData.fromString( - "{\"properties\":{\"poolId\":\"usnfepgfewet\",\"size\":690089407396712859,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"ncxykxhdjhlimm\",\"totalThroughputMibps\":2.8574824,\"utilizedThroughputMibps\":3.6473155,\"customThroughputMibps\":507931039,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"jzh\",\"location\":\"zxfpxtgqsc\",\"tags\":{\"qaz\":\"ftjuh\",\"pijrajcivmmghf\":\"mtggu\"},\"id\":\"fiwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"}") + "{\"properties\":{\"poolId\":\"bbjpmcubkmif\",\"size\":2658943647965790619,\"serviceLevel\":\"Premium\",\"provisioningState\":\"bvphavpm\",\"totalThroughputMibps\":45.600914,\"utilizedThroughputMibps\":64.13514,\"customThroughputMibps\":1770022216,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"tefjoknssqyzq\",\"location\":\"ik\",\"tags\":{\"qmrjg\":\"db\",\"mjpb\":\"ihfqlggwfiwzc\",\"pgxh\":\"ephmgtvljvrcmyfq\"},\"id\":\"pomyqwcabvnuile\",\"name\":\"yaswlpaugmr\",\"type\":\"fjlrxwtoauk\"}") .toObject(CapacityPoolInner.class); - Assertions.assertEquals("zxfpxtgqsc", model.location()); - Assertions.assertEquals("ftjuh", model.tags().get("qaz")); - Assertions.assertEquals(690089407396712859L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(507931039, model.customThroughputMibps()); + Assertions.assertEquals("ik", model.location()); + Assertions.assertEquals("db", model.tags().get("qmrjg")); + Assertions.assertEquals(2658943647965790619L, model.size()); + Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); + Assertions.assertEquals(1770022216, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("zxfpxtgqsc") - .withTags(mapOf("qaz", "ftjuh", "pijrajcivmmghf", "mtggu")) - .withSize(690089407396712859L) - .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(507931039) + CapacityPoolInner model = new CapacityPoolInner().withLocation("ik") + .withTags(mapOf("qmrjg", "db", "mjpb", "ihfqlggwfiwzc", "pgxh", "ephmgtvljvrcmyfq")) + .withSize(2658943647965790619L) + .withServiceLevel(ServiceLevel.PREMIUM) + .withCustomThroughputMibps(1770022216) .withQosType(QosType.MANUAL) - .withCoolAccess(false) + .withCoolAccess(true) .withEncryptionType(EncryptionType.DOUBLE); model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("zxfpxtgqsc", model.location()); - Assertions.assertEquals("ftjuh", model.tags().get("qaz")); - Assertions.assertEquals(690089407396712859L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(507931039, model.customThroughputMibps()); + Assertions.assertEquals("ik", model.location()); + Assertions.assertEquals("db", model.tags().get("qmrjg")); + Assertions.assertEquals(2658943647965790619L, model.size()); + Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); + Assertions.assertEquals(1770022216, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, 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 d6429ea38429..7427015faa29 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 @@ -15,16 +15,16 @@ public final class CapacityPoolListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"poolId\":\"y\",\"size\":9043452615401881021,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"gqdnfwqzd\",\"totalThroughputMibps\":36.99752,\"utilizedThroughputMibps\":8.435321,\"customThroughputMibps\":1958428525,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"vi\",\"location\":\"uwivkxoy\",\"tags\":{\"kvcpwpgclr\":\"bixxrt\",\"yefrpmpdnqqska\":\"ivtsoxfrkenxpm\"},\"id\":\"ao\",\"name\":\"vmm\",\"type\":\"npqfrtqlkzmeg\"},{\"properties\":{\"poolId\":\"tgvkxlzyqd\",\"size\":6287019732891771770,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"ealzxwhcansymoyq\",\"totalThroughputMibps\":30.94446,\"utilizedThroughputMibps\":53.61342,\"customThroughputMibps\":817771171,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"mf\",\"location\":\"uwasqvd\",\"tags\":{\"uxakjsqzhzbezk\":\"y\"},\"id\":\"imsidxasicddyvvj\",\"name\":\"kgfmocwahpq\",\"type\":\"atjeaahh\"}],\"nextLink\":\"hhnakzybbj\"}") + "{\"value\":[{\"properties\":{\"poolId\":\"jjkhvyomaclu\",\"size\":2509004453325276291,\"serviceLevel\":\"Standard\",\"provisioningState\":\"mhrpqpdfw\",\"totalThroughputMibps\":9.116411,\"utilizedThroughputMibps\":44.33386,\"customThroughputMibps\":785692524,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"fmcsypobkd\",\"location\":\"rdzsylollgtrczzy\",\"tags\":{\"defxrdc\":\"zjijpvuaurkihcir\"},\"id\":\"xnbkkj\",\"name\":\"nurnnq\",\"type\":\"nqbpi\"},{\"properties\":{\"poolId\":\"qltgrd\",\"size\":9009223800330831633,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"rxvbfihwuh\",\"totalThroughputMibps\":95.03055,\"utilizedThroughputMibps\":20.380814,\"customThroughputMibps\":2067540968,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"iowxi\",\"location\":\"p\",\"tags\":{\"bsbqqqag\":\"qagnepzwakl\",\"rrczezkhhltnj\":\"wrxaomzisg\",\"oyueayfbpcmsp\":\"dhqoawj\"},\"id\":\"byrrueqth\",\"name\":\"mg\",\"type\":\"mbscbbx\"},{\"properties\":{\"poolId\":\"dhxiidlopedbwd\",\"size\":3583879341611087717,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"bxubmdna\",\"totalThroughputMibps\":60.302387,\"utilizedThroughputMibps\":39.57759,\"customThroughputMibps\":106627491,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"cigeleohdbvqvw\",\"location\":\"jopwbeonrlkwz\",\"tags\":{\"xcptsoqfyiaseqc\":\"bxcea\"},\"id\":\"krtt\",\"name\":\"razisg\",\"type\":\"kiuemv\"},{\"properties\":{\"poolId\":\"bwzohmnrxxbs\",\"size\":6739218786805159474,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"nhmdptysprqs\",\"totalThroughputMibps\":54.778225,\"utilizedThroughputMibps\":91.27877,\"customThroughputMibps\":1747064559,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"liufiqwoyxq\",\"location\":\"pcohhoucqpqojx\",\"tags\":{\"tzqdd\":\"rzdcgdzbenribcaw\",\"mzwcjjncqt\":\"jwfljhznamtua\"},\"id\":\"z\",\"name\":\"izvg\",\"type\":\"gat\"}],\"nextLink\":\"uvbxngr\"}") .toObject(CapacityPoolList.class); - Assertions.assertEquals("uwivkxoy", model.value().get(0).location()); - Assertions.assertEquals("bixxrt", model.value().get(0).tags().get("kvcpwpgclr")); - Assertions.assertEquals(9043452615401881021L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.value().get(0).serviceLevel()); - Assertions.assertEquals(1958428525, model.value().get(0).customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.value().get(0).qosType()); - Assertions.assertFalse(model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("hhnakzybbj", model.nextLink()); + Assertions.assertEquals("rdzsylollgtrczzy", model.value().get(0).location()); + Assertions.assertEquals("zjijpvuaurkihcir", model.value().get(0).tags().get("defxrdc")); + Assertions.assertEquals(2509004453325276291L, model.value().get(0).size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.value().get(0).serviceLevel()); + Assertions.assertEquals(785692524, model.value().get(0).customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); + Assertions.assertTrue(model.value().get(0).coolAccess()); + Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); + Assertions.assertEquals("uvbxngr", model.nextLink()); } } 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 9340fad8d104..03a3659c9ad7 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,31 +15,31 @@ public final class CapacityPoolPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolPatch model = BinaryData.fromString( - "{\"location\":\"duy\",\"id\":\"uzhyrmewipmvekdx\",\"name\":\"uqgsj\",\"type\":\"undxgketw\",\"tags\":{\"uvgp\":\"zjhfjmhvv\",\"uzjyihsasbhudypo\":\"uneqsxvmhf\"},\"properties\":{\"size\":2798000155301001189,\"qosType\":\"Manual\",\"coolAccess\":true,\"customThroughputMibps\":968834448}}") + "{\"location\":\"yeew\",\"id\":\"iqbps\",\"name\":\"omguamlj\",\"type\":\"rgmsplzga\",\"tags\":{\"pqanxrjkix\":\"shhvnewgnxky\",\"yghs\":\"wbtaoyp\"},\"properties\":{\"size\":4157830624762350361,\"qosType\":\"Manual\",\"coolAccess\":true,\"customThroughputMibps\":1324330930}}") .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("duy", model.location()); - Assertions.assertEquals("zjhfjmhvv", model.tags().get("uvgp")); - Assertions.assertEquals(2798000155301001189L, model.size()); + Assertions.assertEquals("yeew", model.location()); + Assertions.assertEquals("shhvnewgnxky", model.tags().get("pqanxrjkix")); + Assertions.assertEquals(4157830624762350361L, model.size()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(968834448, model.customThroughputMibps()); + Assertions.assertEquals(1324330930, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("duy") - .withTags(mapOf("uvgp", "zjhfjmhvv", "uzjyihsasbhudypo", "uneqsxvmhf")) - .withSize(2798000155301001189L) + CapacityPoolPatch model = new CapacityPoolPatch().withLocation("yeew") + .withTags(mapOf("pqanxrjkix", "shhvnewgnxky", "yghs", "wbtaoyp")) + .withSize(4157830624762350361L) .withQosType(QosType.MANUAL) .withCoolAccess(true) - .withCustomThroughputMibps(968834448); + .withCustomThroughputMibps(1324330930); model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("duy", model.location()); - Assertions.assertEquals("zjhfjmhvv", model.tags().get("uvgp")); - Assertions.assertEquals(2798000155301001189L, model.size()); + Assertions.assertEquals("yeew", model.location()); + Assertions.assertEquals("shhvnewgnxky", model.tags().get("pqanxrjkix")); + Assertions.assertEquals(4157830624762350361L, model.size()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(968834448, model.customThroughputMibps()); + Assertions.assertEquals(1324330930, model.customThroughputMibps()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java new file mode 100644 index 000000000000..aed5f728d1b1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import org.junit.jupiter.api.Assertions; + +public final class ChangeZoneRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeZoneRequest model = BinaryData.fromString("{\"newZone\":\"gtltdhlf\"}").toObject(ChangeZoneRequest.class); + Assertions.assertEquals("gtltdhlf", model.newZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeZoneRequest model = new ChangeZoneRequest().withNewZone("gtltdhlf"); + model = BinaryData.fromObject(model).toObject(ChangeZoneRequest.class); + Assertions.assertEquals("gtltdhlf", model.newZone()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java index 03f4231f3a35..3707bed32540 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java @@ -13,10 +13,10 @@ public final class CheckAvailabilityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckAvailabilityResponseInner model - = BinaryData.fromString("{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"p\"}") + = BinaryData.fromString("{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"fehuwaoaguhi\"}") .toObject(CheckAvailabilityResponseInner.class); - Assertions.assertTrue(model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("p", model.message()); + Assertions.assertFalse(model.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, model.reason()); + Assertions.assertEquals("fehuwaoaguhi", model.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java new file mode 100644 index 000000000000..30756b8c1756 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import org.junit.jupiter.api.Assertions; + +public final class CheckElasticResourceAvailabilityResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckElasticResourceAvailabilityResponseInner model + = BinaryData.fromString("{\"isAvailable\":\"True\",\"reason\":\"AlreadyExists\",\"message\":\"cnifm\"}") + .toObject(CheckElasticResourceAvailabilityResponseInner.class); + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, model.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("cnifm", model.message()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java new file mode 100644 index 000000000000..cbab45af775d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import org.junit.jupiter.api.Assertions; + +public final class CheckElasticVolumeFilePathAvailabilityRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckElasticVolumeFilePathAvailabilityRequest model = BinaryData.fromString("{\"filePath\":\"qojpy\"}") + .toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("qojpy", model.filePath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckElasticVolumeFilePathAvailabilityRequest model + = new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("qojpy"); + model = BinaryData.fromObject(model).toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("qojpy", model.filePath()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java new file mode 100644 index 000000000000..93e0395a5485 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupInner model = BinaryData.fromString( + "{\"properties\":{\"creationDate\":\"2021-03-12T20:12:26Z\",\"snapshotCreationDate\":\"2021-09-16T21:13:37Z\",\"completionDate\":\"2021-05-10T03:21:21Z\",\"provisioningState\":\"Updating\",\"size\":8704016164056262603,\"label\":\"nulaiywzejywhsl\",\"backupType\":\"Scheduled\",\"failureReason\":\"pllndnp\",\"elasticVolumeResourceId\":\"wrpqafgfugsnnf\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"efy\",\"elasticBackupPolicyResourceId\":\"coc\",\"volumeSize\":\"Large\"},\"id\":\"tixr\",\"name\":\"vzuyturmlmu\",\"type\":\"wolba\"}") + .toObject(ElasticBackupInner.class); + Assertions.assertEquals("nulaiywzejywhsl", model.properties().label()); + Assertions.assertEquals("wrpqafgfugsnnf", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("efy", model.properties().elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupInner model + = new ElasticBackupInner().withProperties(new ElasticBackupProperties().withLabel("nulaiywzejywhsl") + .withElasticVolumeResourceId("wrpqafgfugsnnf") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("efy")); + model = BinaryData.fromObject(model).toObject(ElasticBackupInner.class); + Assertions.assertEquals("nulaiywzejywhsl", model.properties().label()); + Assertions.assertEquals("wrpqafgfugsnnf", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("efy", model.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java new file mode 100644 index 000000000000..7827c1da3840 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"creationDate\":\"2021-03-05T12:08:12Z\",\"snapshotCreationDate\":\"2021-02-03T20:51:35Z\",\"completionDate\":\"2021-07-14T10:52:31Z\",\"provisioningState\":\"Succeeded\",\"size\":2153193005537260833,\"label\":\"s\",\"backupType\":\"Manual\",\"failureReason\":\"sfuughtuqfecjx\",\"elasticVolumeResourceId\":\"ygtuhx\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"uewmrswnjlxuzrhw\",\"elasticBackupPolicyResourceId\":\"sxjb\",\"volumeSize\":\"Regular\"},\"id\":\"gpdohzj\",\"name\":\"atucoigebxncn\",\"type\":\"fepbnwgfmxjgc\"},{\"properties\":{\"creationDate\":\"2021-09-03T22:46:11Z\",\"snapshotCreationDate\":\"2021-05-02T03:25:22Z\",\"completionDate\":\"2021-05-07T12:13:37Z\",\"provisioningState\":\"Moving\",\"size\":900706865834950533,\"label\":\"aquflqbctqha\",\"backupType\":\"Manual\",\"failureReason\":\"wdkqzeqy\",\"elasticVolumeResourceId\":\"leziunjxdfzant\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"gyamlbnseqacjjv\",\"elasticBackupPolicyResourceId\":\"lguooqjagmd\",\"volumeSize\":\"Regular\"},\"id\":\"eiookjbsah\",\"name\":\"tdtpdelqacslmo\",\"type\":\"oebn\"}],\"nextLink\":\"o\"}") + .toObject(ElasticBackupListResult.class); + Assertions.assertEquals("s", model.value().get(0).properties().label()); + Assertions.assertEquals("ygtuhx", model.value().get(0).properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.value().get(0).properties().snapshotUsage()); + Assertions.assertEquals("uewmrswnjlxuzrhw", model.value().get(0).properties().elasticSnapshotResourceId()); + Assertions.assertEquals("o", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..7c5de1a49b9d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +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 reactor.core.publisher.Mono; + +public final class ElasticBackupPoliciesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1745458220,\"weeklyBackupsToKeep\":359733741,\"monthlyBackupsToKeep\":1950441788,\"assignedVolumesCount\":1818762005,\"policyState\":\"Enabled\"},\"eTag\":\"ajbk\",\"location\":\"lcyizyddcvxo\",\"tags\":{\"ydesqlvgec\":\"vfsxx\",\"mxsdobygoog\":\"wgoljtzx\",\"j\":\"qa\"},\"id\":\"vaz\",\"name\":\"jfucsaodjnosdkv\",\"type\":\"bfas\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupPolicy response = manager.elasticBackupPolicies() + .define("wpsyxjij") + .withRegion("cefeygzqpj") + .withExistingElasticAccount("ywjzebecuvlbefvw", "ljkxpylrwoxz") + .withTags(mapOf("ybdjnxumentq", "fmn", "towlhlsycoyb", "ntwhymxymulwiv", "j", "jasqubf", "htfxcpupuki", + "ywhjqwmchq")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(1965093458) + .withWeeklyBackupsToKeep(1290877670) + .withMonthlyBackupsToKeep(1998855152) + .withPolicyState(ElasticBackupPolicyState.DISABLED)) + .create(); + + Assertions.assertEquals("lcyizyddcvxo", response.location()); + Assertions.assertEquals("vfsxx", response.tags().get("ydesqlvgec")); + Assertions.assertEquals(1745458220, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(359733741, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1950441788, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, response.properties().policyState()); + } + + // 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/ElasticBackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..c89bf0d8c3fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Moving\",\"dailyBackupsToKeep\":833282883,\"weeklyBackupsToKeep\":1088510786,\"monthlyBackupsToKeep\":967504624,\"assignedVolumesCount\":1579537521,\"policyState\":\"Enabled\"},\"eTag\":\"vlrrskapbxwieexu\",\"location\":\"derltfokyksyim\",\"tags\":{\"rsejegprkj\":\"grvkcxzznnuif\",\"jmwvvbtuqkxxi\":\"uw\",\"ekotjgxi\":\"wgxql\",\"by\":\"qfkyfhiwvjaqu\"},\"id\":\"nvskpaj\",\"name\":\"mgeu\",\"type\":\"exmj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupPolicy response = manager.elasticBackupPolicies() + .getWithResponse("xslwhd", "cvhtbbzjhfvh", "wzbxpc", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("derltfokyksyim", response.location()); + Assertions.assertEquals("grvkcxzznnuif", response.tags().get("rsejegprkj")); + Assertions.assertEquals(833282883, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1088510786, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(967504624, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, response.properties().policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java new file mode 100644 index 000000000000..70c816ed38bd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicy; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupPoliciesListByElasticAccountMockTests { + @Test + public void testListByElasticAccount() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"dailyBackupsToKeep\":775523901,\"weeklyBackupsToKeep\":2123818408,\"monthlyBackupsToKeep\":1056872967,\"assignedVolumesCount\":2066006644,\"policyState\":\"Enabled\"},\"eTag\":\"m\",\"location\":\"ahlfxlmuifmuadj\",\"tags\":{\"skiioshjgczetybn\":\"n\"},\"id\":\"gztlcgc\",\"name\":\"j\",\"type\":\"hfjv\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.elasticBackupPolicies() + .listByElasticAccount("xcbccwkqmt", "apeqiscrpil", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ahlfxlmuifmuadj", response.iterator().next().location()); + Assertions.assertEquals("n", response.iterator().next().tags().get("skiioshjgczetybn")); + Assertions.assertEquals(775523901, response.iterator().next().properties().dailyBackupsToKeep()); + Assertions.assertEquals(2123818408, response.iterator().next().properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1056872967, response.iterator().next().properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, + response.iterator().next().properties().policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java new file mode 100644 index 000000000000..ee2554e2df5a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Creating\",\"dailyBackupsToKeep\":417013973,\"weeklyBackupsToKeep\":438034725,\"monthlyBackupsToKeep\":187127133,\"assignedVolumesCount\":1432603704,\"policyState\":\"Enabled\"},\"eTag\":\"kyjpmspbps\",\"location\":\"fppyogtieyujtvcz\",\"tags\":{\"xvglnkvxlxp\":\"yxrxmunj\"},\"id\":\"glqivbgkcv\",\"name\":\"hpzvuqdflvoniyp\",\"type\":\"pubcpzgpxtivhjk\"}") + .toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("fppyogtieyujtvcz", model.location()); + Assertions.assertEquals("yxrxmunj", model.tags().get("xvglnkvxlxp")); + Assertions.assertEquals(417013973, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(438034725, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(187127133, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.properties().policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyInner model = new ElasticBackupPolicyInner().withLocation("fppyogtieyujtvcz") + .withTags(mapOf("xvglnkvxlxp", "yxrxmunj")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(417013973) + .withWeeklyBackupsToKeep(438034725) + .withMonthlyBackupsToKeep(187127133) + .withPolicyState(ElasticBackupPolicyState.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("fppyogtieyujtvcz", model.location()); + Assertions.assertEquals("yxrxmunj", model.tags().get("xvglnkvxlxp")); + Assertions.assertEquals(417013973, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(438034725, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(187127133, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.properties().policyState()); + } + + // 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/ElasticBackupPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java new file mode 100644 index 000000000000..e972079d2dab --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"dailyBackupsToKeep\":1409620818,\"weeklyBackupsToKeep\":1972611629,\"monthlyBackupsToKeep\":13695929,\"assignedVolumesCount\":91533505,\"policyState\":\"Disabled\"},\"eTag\":\"cbfrm\",\"location\":\"dths\",\"tags\":{\"xousxauzl\":\"vriibakclacjfr\",\"wohqfzizvu\":\"vsg\",\"vmribiat\":\"mmkjsvthnwpztek\"},\"id\":\"gplucfotangcfhny\",\"name\":\"zcugswvxwlmzqw\",\"type\":\"vtxnjmxmcuqud\"},{\"properties\":{\"provisioningState\":\"Patching\",\"dailyBackupsToKeep\":21303775,\"weeklyBackupsToKeep\":1115734201,\"monthlyBackupsToKeep\":1944925015,\"assignedVolumesCount\":1087876109,\"policyState\":\"Disabled\"},\"eTag\":\"buiyji\",\"location\":\"zphdugneiknp\",\"tags\":{\"ipq\":\"gjiuqhibto\",\"tvqylkmqpzoyhlfb\":\"jedmurrxxgewp\"},\"id\":\"gwgcl\",\"name\":\"xoe\",\"type\":\"qinjipnwjf\"},{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":1724104669,\"weeklyBackupsToKeep\":1462565656,\"monthlyBackupsToKeep\":1454671377,\"assignedVolumesCount\":295372470,\"policyState\":\"Enabled\"},\"eTag\":\"foiyjwpfilk\",\"location\":\"kholvd\",\"tags\":{\"iukyefchnmna\":\"iauogphuartv\",\"xffi\":\"mnxhkxjqirwrweo\",\"rsnewmozqvbubqma\":\"hx\"},\"id\":\"hsycxhxzgaz\",\"name\":\"taboidvmf\",\"type\":\"hppubowsepdfgkmt\"}],\"nextLink\":\"erngbtcjuahokqto\"}") + .toObject(ElasticBackupPolicyListResult.class); + Assertions.assertEquals("dths", model.value().get(0).location()); + Assertions.assertEquals("vriibakclacjfr", model.value().get(0).tags().get("xousxauzl")); + Assertions.assertEquals(1409620818, model.value().get(0).properties().dailyBackupsToKeep()); + Assertions.assertEquals(1972611629, model.value().get(0).properties().weeklyBackupsToKeep()); + Assertions.assertEquals(13695929, model.value().get(0).properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.value().get(0).properties().policyState()); + Assertions.assertEquals("erngbtcjuahokqto", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java new file mode 100644 index 000000000000..95b0fc84787a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1003924316,\"weeklyBackupsToKeep\":1404757265,\"monthlyBackupsToKeep\":1339436767,\"assignedVolumesCount\":134630925,\"policyState\":\"Enabled\"}") + .toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(1003924316, model.dailyBackupsToKeep()); + Assertions.assertEquals(1404757265, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1339436767, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyProperties model = new ElasticBackupPolicyProperties().withDailyBackupsToKeep(1003924316) + .withWeeklyBackupsToKeep(1404757265) + .withMonthlyBackupsToKeep(1339436767) + .withPolicyState(ElasticBackupPolicyState.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(1003924316, model.dailyBackupsToKeep()); + Assertions.assertEquals(1404757265, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1339436767, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java new file mode 100644 index 000000000000..6da1b08481c3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdatePropertiesTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyUpdateProperties model = BinaryData.fromString( + "{\"dailyBackupsToKeep\":1438070602,\"weeklyBackupsToKeep\":1334509935,\"monthlyBackupsToKeep\":1857867991,\"policyState\":\"Enabled\"}") + .toObject(ElasticBackupPolicyUpdateProperties.class); + Assertions.assertEquals(1438070602, model.dailyBackupsToKeep()); + Assertions.assertEquals(1334509935, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1857867991, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyUpdateProperties model + = new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(1438070602) + .withWeeklyBackupsToKeep(1334509935) + .withMonthlyBackupsToKeep(1857867991) + .withPolicyState(ElasticBackupPolicyState.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdateProperties.class); + Assertions.assertEquals(1438070602, model.dailyBackupsToKeep()); + Assertions.assertEquals(1334509935, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1857867991, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java new file mode 100644 index 000000000000..35016b499124 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyUpdateTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyUpdateProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyUpdate model = BinaryData.fromString( + "{\"tags\":{\"gpikqmh\":\"ov\",\"jrmzvupor\":\"ao\",\"qpswokmvkhlggdhb\":\"zdfuydzvkfvxcnqm\",\"zu\":\"mzqkz\"},\"properties\":{\"dailyBackupsToKeep\":1115368168,\"weeklyBackupsToKeep\":1977172976,\"monthlyBackupsToKeep\":556178422,\"policyState\":\"Enabled\"}}") + .toObject(ElasticBackupPolicyUpdate.class); + Assertions.assertEquals("ov", model.tags().get("gpikqmh")); + Assertions.assertEquals(1115368168, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1977172976, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(556178422, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.properties().policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyUpdate model = new ElasticBackupPolicyUpdate() + .withTags(mapOf("gpikqmh", "ov", "jrmzvupor", "ao", "qpswokmvkhlggdhb", "zdfuydzvkfvxcnqm", "zu", "mzqkz")) + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(1115368168) + .withWeeklyBackupsToKeep(1977172976) + .withMonthlyBackupsToKeep(556178422) + .withPolicyState(ElasticBackupPolicyState.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdate.class); + Assertions.assertEquals("ov", model.tags().get("gpikqmh")); + Assertions.assertEquals(1115368168, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1977172976, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(556178422, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.properties().policyState()); + } + + // 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/ElasticBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java new file mode 100644 index 000000000000..3e0174fb09d4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupProperties model = BinaryData.fromString( + "{\"creationDate\":\"2021-07-06T06:01Z\",\"snapshotCreationDate\":\"2021-04-01T11:02:42Z\",\"completionDate\":\"2021-07-21T06:19:54Z\",\"provisioningState\":\"Failed\",\"size\":7439641289820148849,\"label\":\"pngajin\",\"backupType\":\"Manual\",\"failureReason\":\"awrtmjfjmyccxlz\",\"elasticVolumeResourceId\":\"coxovn\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"nlusfnrd\",\"elasticBackupPolicyResourceId\":\"xtxrdcqtjvidt\",\"volumeSize\":\"Large\"}") + .toObject(ElasticBackupProperties.class); + Assertions.assertEquals("pngajin", model.label()); + Assertions.assertEquals("coxovn", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("nlusfnrd", model.elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupProperties model = new ElasticBackupProperties().withLabel("pngajin") + .withElasticVolumeResourceId("coxovn") + .withSnapshotUsage(SnapshotUsage.CREATE_NEW_SNAPSHOT) + .withElasticSnapshotResourceId("nlusfnrd"); + model = BinaryData.fromObject(model).toObject(ElasticBackupProperties.class); + Assertions.assertEquals("pngajin", model.label()); + Assertions.assertEquals("coxovn", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("nlusfnrd", model.elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java new file mode 100644 index 000000000000..5ebcc5cd35dd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleting\"},\"eTag\":\"eudzqavbpd\",\"location\":\"jxlyyzglgouwtlm\",\"tags\":{\"baxk\":\"uojqt\",\"lbfjkwr\":\"eytu\",\"hsyrqunj\":\"snkq\"},\"id\":\"hdenxaulk\",\"name\":\"akdkifmjnnawtqab\",\"type\":\"xuckpggqoweyir\"}") + .toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("jxlyyzglgouwtlm", model.location()); + Assertions.assertEquals("uojqt", model.tags().get("baxk")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultInner model = new ElasticBackupVaultInner().withLocation("jxlyyzglgouwtlm") + .withTags(mapOf("baxk", "uojqt", "lbfjkwr", "eytu", "hsyrqunj", "snkq")) + .withProperties(new ElasticBackupVaultProperties()); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("jxlyyzglgouwtlm", model.location()); + Assertions.assertEquals("uojqt", model.tags().get("baxk")); + } + + // 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/ElasticBackupVaultListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java new file mode 100644 index 000000000000..50f42189c629 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"kzjv\",\"location\":\"iirhgfgrwsd\",\"tags\":{\"bglbyvict\":\"atzv\"},\"id\":\"tbrxkjz\",\"name\":\"rgxffmshkw\",\"type\":\"bkgozxwopdbydpi\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"napxbiygnug\",\"location\":\"nfsm\",\"tags\":{\"iquvrehm\":\"tuxuuyilflq\",\"ytqj\":\"njhvsujztc\",\"auunfprnjletlx\":\"w\",\"ddoui\":\"mr\"},\"id\":\"amowaziynknlqwzd\",\"name\":\"piwhxqs\",\"type\":\"dtmaa\"}],\"nextLink\":\"uhuxylrjvmtyg\"}") + .toObject(ElasticBackupVaultListResult.class); + Assertions.assertEquals("iirhgfgrwsd", model.value().get(0).location()); + Assertions.assertEquals("atzv", model.value().get(0).tags().get("bglbyvict")); + Assertions.assertEquals("uhuxylrjvmtyg", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java new file mode 100644 index 000000000000..45a54f96ef10 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; + +public final class ElasticBackupVaultPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultProperties model = BinaryData.fromString("{\"provisioningState\":\"Creating\"}") + .toObject(ElasticBackupVaultProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultProperties model = new ElasticBackupVaultProperties(); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java new file mode 100644 index 000000000000..bc7809e30e78 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultUpdate model = BinaryData.fromString("{\"tags\":{\"qxpxiwfcngjsaa\":\"ngwflqqmpizruwn\"}}") + .toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("ngwflqqmpizruwn", model.tags().get("qxpxiwfcngjsaa")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultUpdate model + = new ElasticBackupVaultUpdate().withTags(mapOf("qxpxiwfcngjsaa", "ngwflqqmpizruwn")); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("ngwflqqmpizruwn", model.tags().get("qxpxiwfcngjsaa")); + } + + // 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/ElasticBackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..98894d4fd44a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +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 reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"aombwiinjdl\",\"location\":\"ktl\",\"tags\":{\"kgfcfdruws\":\"wavvqxuajgcqwuly\",\"clhuulriqbyokv\":\"kxx\",\"fyhcdjw\":\"gbzsxebrslt\",\"agttpufpb\":\"uoard\"},\"id\":\"g\",\"name\":\"rholhujbfwxi\",\"type\":\"lkysolsyjp\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupVault response = manager.elasticBackupVaults() + .define("ixv") + .withRegion("qvzfj") + .withExistingElasticAccount("alapdlndbe", "qb") + .withTags(mapOf("mphfkyezolgjzm", "ugzfeuzjl")) + .withProperties(new ElasticBackupVaultProperties()) + .create(); + + Assertions.assertEquals("ktl", response.location()); + Assertions.assertEquals("wavvqxuajgcqwuly", response.tags().get("kgfcfdruws")); + } + + // 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/ElasticBackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java new file mode 100644 index 000000000000..45bd768fe343 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Moving\"},\"eTag\":\"cf\",\"location\":\"tga\",\"tags\":{\"aokctgkp\":\"qejg\",\"ixrhl\":\"gkqzkcyzmffngdyf\"},\"id\":\"qvhoej\",\"name\":\"oiutgwrmkahpq\",\"type\":\"azyntacihncogm\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackupVault response = manager.elasticBackupVaults() + .getWithResponse("razwzlpzbt", "uykykipfsd", "epfnoc", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("tga", response.location()); + Assertions.assertEquals("qejg", response.tags().get("aokctgkp")); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java new file mode 100644 index 000000000000..10ce2e1037eb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsListByElasticAccountMockTests { + @Test + public void testListByElasticAccount() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\"},\"eTag\":\"eaqgrvgpomxpupd\",\"location\":\"dfj\",\"tags\":{\"py\":\"socwiqbuout\",\"zvdajfwnncf\":\"gleofjsbgbw\",\"jjrlhiqlwix\":\"aciq\"},\"id\":\"tbouguxtnd\",\"name\":\"pg\",\"type\":\"ttbas\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.elasticBackupVaults().listByElasticAccount("pnmliq", "v", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dfj", response.iterator().next().location()); + Assertions.assertEquals("socwiqbuout", response.iterator().next().tags().get("py")); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..e32f8ca10a05 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"creationDate\":\"2021-07-23T02:32:47Z\",\"snapshotCreationDate\":\"2021-04-04T12:40:34Z\",\"completionDate\":\"2020-12-31T02:30:57Z\",\"provisioningState\":\"Succeeded\",\"size\":4835897365917994795,\"label\":\"ygxvha\",\"backupType\":\"Manual\",\"failureReason\":\"cxq\",\"elasticVolumeResourceId\":\"whscozawmv\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"pknpwirfljfewxq\",\"elasticBackupPolicyResourceId\":\"oxudnmckap\",\"volumeSize\":\"Large\"},\"id\":\"qiijgenc\",\"name\":\"g\",\"type\":\"oqueqihkkyowltj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackup response = manager.elasticBackups() + .define("qfqqdlcvmyolc") + .withExistingElasticBackupVault("dmdlgyqixokw", "jawh", "ag") + .withProperties(new ElasticBackupProperties().withLabel("dnzyzawatuwqko") + .withElasticVolumeResourceId("msn") + .withSnapshotUsage(SnapshotUsage.CREATE_NEW_SNAPSHOT) + .withElasticSnapshotResourceId("maanea")) + .create(); + + Assertions.assertEquals("ygxvha", response.properties().label()); + Assertions.assertEquals("whscozawmv", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("pknpwirfljfewxq", response.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java new file mode 100644 index 000000000000..4159cf803c55 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"creationDate\":\"2021-05-23T11:53:18Z\",\"snapshotCreationDate\":\"2021-04-22T18:10:53Z\",\"completionDate\":\"2021-02-26T23:50:28Z\",\"provisioningState\":\"Accepted\",\"size\":5435334654274462675,\"label\":\"uhznwhvuldbk\",\"backupType\":\"Manual\",\"failureReason\":\"kj\",\"elasticVolumeResourceId\":\"gawgazmxjqi\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"jsbcml\",\"elasticBackupPolicyResourceId\":\"ahz\",\"volumeSize\":\"Regular\"},\"id\":\"oolkolirhhm\",\"name\":\"jusuzgfjzc\",\"type\":\"aaxoialahfxwcc\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticBackup response = manager.elasticBackups() + .getWithResponse("matrnzpducd", "akt", "jktzboimyfpq", "owkppnwyytf", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("uhznwhvuldbk", response.properties().label()); + Assertions.assertEquals("gawgazmxjqi", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("jsbcml", response.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java new file mode 100644 index 000000000000..c6a93d50dfd4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.SnapshotUsage; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupsListByVaultMockTests { + @Test + public void testListByVault() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"creationDate\":\"2021-05-26T18:48:04Z\",\"snapshotCreationDate\":\"2021-07-13T10:24:08Z\",\"completionDate\":\"2020-12-23T19:05:54Z\",\"provisioningState\":\"Failed\",\"size\":1108455514030548539,\"label\":\"nkgzukwdr\",\"backupType\":\"Manual\",\"failureReason\":\"thfceyjncj\",\"elasticVolumeResourceId\":\"lfuyfjbpfiddhlr\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"qyjmqrfuioc\",\"elasticBackupPolicyResourceId\":\"el\",\"volumeSize\":\"Regular\"},\"id\":\"azrhxudd\",\"name\":\"mdtff\",\"type\":\"sjmrkkhm\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.elasticBackups().listByVault("kdxkuk", "kczynuhhoqeqsh", "vl", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("nkgzukwdr", response.iterator().next().properties().label()); + Assertions.assertEquals("lfuyfjbpfiddhlr", response.iterator().next().properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, + response.iterator().next().properties().snapshotUsage()); + Assertions.assertEquals("qyjmqrfuioc", response.iterator().next().properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java new file mode 100644 index 000000000000..c1679e8d8302 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests { + @Test + public void testCheckVolumeFilePathAvailabilityWithResponse() throws Exception { + String responseStr = "{\"isAvailable\":\"True\",\"reason\":\"Invalid\",\"message\":\"flecominxojjl\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + CheckElasticResourceAvailabilityResponse response = manager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse("bdl", "zgdyrcvuqbs", "zlrqhbjnqogdx", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("bsfp"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, response.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.INVALID, response.reason()); + Assertions.assertEquals("flecominxojjl", response.message()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java new file mode 100644 index 000000000000..2a311691414a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticEncryptionIdentity; +import org.junit.jupiter.api.Assertions; + +public final class ElasticEncryptionIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticEncryptionIdentity model = BinaryData + .fromString("{\"principalId\":\"zqadf\",\"userAssignedIdentity\":\"z\",\"federatedClientId\":\"iglaecx\"}") + .toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("z", model.userAssignedIdentity()); + Assertions.assertEquals("iglaecx", model.federatedClientId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticEncryptionIdentity model + = new ElasticEncryptionIdentity().withUserAssignedIdentity("z").withFederatedClientId("iglaecx"); + model = BinaryData.fromObject(model).toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("z", model.userAssignedIdentity()); + Assertions.assertEquals("iglaecx", model.federatedClientId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java new file mode 100644 index 000000000000..fbc4ad97d067 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticExportPolicyRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticExportPolicyRule model = BinaryData.fromString( + "{\"ruleIndex\":307378678,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hfbousnfepgfew\",\"twly\"],\"rootAccess\":\"Disabled\"}") + .toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(307378678, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); + Assertions.assertEquals("hfbousnfepgfew", model.allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticExportPolicyRule model = new ElasticExportPolicyRule().withRuleIndex(307378678) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hfbousnfepgfew", "twly")) + .withRootAccess(ElasticRootAccess.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(307378678, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); + Assertions.assertEquals("hfbousnfepgfew", model.allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java new file mode 100644 index 000000000000..78551545c1ae --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticExportPolicyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticExportPolicy model = BinaryData.fromString( + "{\"rules\":[{\"ruleIndex\":2060151419,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"oaimlnw\",\"aaomylweazu\",\"cse\",\"hwwn\"],\"rootAccess\":\"Enabled\"}]}") + .toObject(ElasticExportPolicy.class); + Assertions.assertEquals(2060151419, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.rules().get(0).nfsv4()); + Assertions.assertEquals("oaimlnw", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.rules().get(0).rootAccess()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticExportPolicy model + = new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(2060151419) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("oaimlnw", "aaomylweazu", "cse", "hwwn")) + .withRootAccess(ElasticRootAccess.ENABLED))); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicy.class); + Assertions.assertEquals(2060151419, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.rules().get(0).nfsv4()); + Assertions.assertEquals("oaimlnw", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.rules().get(0).rootAccess()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java new file mode 100644 index 000000000000..a1def875f06c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticMountTargetProperties; + +public final class ElasticMountTargetPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticMountTargetProperties model + = BinaryData.fromString("{\"ipAddress\":\"xykxhdj\",\"smbServerFqdn\":\"immbcx\"}") + .toObject(ElasticMountTargetProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java new file mode 100644 index 000000000000..830a6943d91f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSmbPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSmbPatchProperties model + = BinaryData.fromString("{\"smbEncryption\":\"Disabled\"}").toObject(ElasticSmbPatchProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbPatchProperties model + = new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbPatchProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java new file mode 100644 index 000000000000..d5aad72609b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSmbPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSmbProperties model + = BinaryData.fromString("{\"smbEncryption\":\"Disabled\"}").toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbProperties model = new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java new file mode 100644 index 000000000000..fc97fedc3dc8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"eyzihgrky\",\"name\":\"i\",\"type\":\"absnmfpp\"}") + .toObject(ElasticSnapshotInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotInner model = new ElasticSnapshotInner().withProperties(new ElasticSnapshotProperties()); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java new file mode 100644 index 000000000000..704a856e588c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\"},\"id\":\"yhsgz\",\"name\":\"czbgomfgbeg\",\"type\":\"qgleohibetnluank\"}],\"nextLink\":\"fxeeebtijvacvbm\"}") + .toObject(ElasticSnapshotListResult.class); + Assertions.assertEquals("fxeeebtijvacvbm", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..cd99711292eb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1504490636,\"minute\":604993754},\"dailySchedule\":{\"snapshotsToKeep\":20698732,\"hour\":921325580,\"minute\":1742146388},\"weeklySchedule\":{\"snapshotsToKeep\":212226572,\"days\":[\"Wednesday\"],\"hour\":284068421,\"minute\":1026580150},\"monthlySchedule\":{\"snapshotsToKeep\":1127791368,\"daysOfMonth\":[720846419,981924301,841837065],\"hour\":1820498592,\"minute\":274775952},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"mlccmetjscz\",\"location\":\"fqbqnasd\",\"tags\":{\"vdgxly\":\"nzsieuscplh\"},\"id\":\"kxitds\",\"name\":\"ezsvkolrupjov\",\"type\":\"ozsaye\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshotPolicy response = manager.elasticSnapshotPolicies() + .define("w") + .withRegion("soohutxlcsklte") + .withExistingElasticAccount("vdpwwobtdphti", "sffofwanmhksca") + .withTags(mapOf("lfb", "ggg", "srtmdylperpiltt", "rdcgu", "resrgvtshuvft", "zgczfcmfpfbode", + "muqkevzgjypanhx", "ai")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1334343181).withMinute(40629246)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1322828589) + .withHour(261934076) + .withMinute(2136673139)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1769252552) + .withDays(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.MONDAY)) + .withHour(790516190) + .withMinute(178671705)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1072563089) + .withDaysOfMonth(Arrays.asList(1896404054)) + .withHour(1333249965) + .withMinute(1738351440)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .create(); + + Assertions.assertEquals("fqbqnasd", response.location()); + Assertions.assertEquals("nzsieuscplh", response.tags().get("vdgxly")); + Assertions.assertEquals(1504490636, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(604993754, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(20698732, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(921325580, response.properties().dailySchedule().hour()); + Assertions.assertEquals(1742146388, response.properties().dailySchedule().minute()); + Assertions.assertEquals(212226572, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(284068421, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(1026580150, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1127791368, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(720846419, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1820498592, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(274775952, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + } + + // 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/ElasticSnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..a8e03966408b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":157710243,\"minute\":510414299},\"dailySchedule\":{\"snapshotsToKeep\":1490724435,\"hour\":861438766,\"minute\":740083660},\"weeklySchedule\":{\"snapshotsToKeep\":1329042658,\"days\":[\"Wednesday\",\"Thursday\",\"Tuesday\"],\"hour\":886562524,\"minute\":1757022788},\"monthlySchedule\":{\"snapshotsToKeep\":1940675746,\"daysOfMonth\":[216422946],\"hour\":574077072,\"minute\":2140503117},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"kb\",\"location\":\"mmgmqf\",\"tags\":{\"quxweyslandkd\":\"gvqcpdwj\",\"nquoxsotireimse\":\"djhunhghcgawnr\"},\"id\":\"bfsx\",\"name\":\"tcyilbvz\",\"type\":\"mxcjzlquzexokjx\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshotPolicy response = manager.elasticSnapshotPolicies() + .getWithResponse("uairaabmdlqjb", "dp", "ixlhupm", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("mmgmqf", response.location()); + Assertions.assertEquals("gvqcpdwj", response.tags().get("quxweyslandkd")); + Assertions.assertEquals(157710243, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(510414299, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(1490724435, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(861438766, response.properties().dailySchedule().hour()); + Assertions.assertEquals(740083660, response.properties().dailySchedule().minute()); + Assertions.assertEquals(1329042658, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(886562524, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(1757022788, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1940675746, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(216422946, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(574077072, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(2140503117, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java new file mode 100644 index 000000000000..61f61bc9018b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicy; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesListByElasticAccountMockTests { + @Test + public void testListByElasticAccount() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":387760911,\"minute\":669479528},\"dailySchedule\":{\"snapshotsToKeep\":1450032317,\"hour\":2139767173,\"minute\":316800252},\"weeklySchedule\":{\"snapshotsToKeep\":1300353346,\"days\":[\"Saturday\"],\"hour\":1532369371,\"minute\":888546688},\"monthlySchedule\":{\"snapshotsToKeep\":1019863501,\"daysOfMonth\":[1215780287,801948793,1859885382],\"hour\":1595592389,\"minute\":1288755704},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"dt\",\"location\":\"qnacyheq\",\"tags\":{\"cjubkhjozfymcwm\":\"qq\",\"ipsejbsvsia\":\"upyvqyvliq\"},\"id\":\"eswhd\",\"name\":\"zydisnuep\",\"type\":\"wyj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.elasticSnapshotPolicies() + .listByElasticAccount("bjvbzinzab", "mvoglj", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qnacyheq", response.iterator().next().location()); + Assertions.assertEquals("qq", response.iterator().next().tags().get("cjubkhjozfymcwm")); + Assertions.assertEquals(387760911, response.iterator().next().properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(669479528, response.iterator().next().properties().hourlySchedule().minute()); + Assertions.assertEquals(1450032317, response.iterator().next().properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2139767173, response.iterator().next().properties().dailySchedule().hour()); + Assertions.assertEquals(316800252, response.iterator().next().properties().dailySchedule().minute()); + Assertions.assertEquals(1300353346, response.iterator().next().properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, + response.iterator().next().properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1532369371, response.iterator().next().properties().weeklySchedule().hour()); + Assertions.assertEquals(888546688, response.iterator().next().properties().weeklySchedule().minute()); + Assertions.assertEquals(1019863501, + response.iterator().next().properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1215780287, + response.iterator().next().properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1595592389, response.iterator().next().properties().monthlySchedule().hour()); + Assertions.assertEquals(1288755704, response.iterator().next().properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, response.iterator().next().properties().policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java new file mode 100644 index 000000000000..5eb8e5f62588 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotPoliciesListElasticVolumesMockTests { + @Test + public void testListElasticVolumes() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"filePath\":\"hweebiph\",\"size\":1724186784361546665,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":19135096,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"dhzybsp\",\"jhfrzgdkkagv\",\"ukhsusmmorf\",\"zhwilzzh\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":807191945,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"yttlrcxiv\",\"bkut\",\"umltwjflu\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1341986183,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"y\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1981330264,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"gouarhwvixqq\",\"gljkybsj\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"bctbhp\",\"mountTargets\":[{\"ipAddress\":\"cvrdnyeitaneqady\",\"smbServerFqdn\":\"jahwriuomzczf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"evsaa\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"p\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"khfjqebglcxkx\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"ygysemtme\",\"restorationState\":\"Failed\"},\"eTag\":\"vpinkzpatqt\",\"zones\":[\"wxspvckojaz\",\"bgspf\",\"esubzpvpv\"],\"location\":\"lyt\",\"tags\":{\"lbmuos\":\"qseusrfjbdxzfxnx\",\"zlwhbwzjnufzrfgm\":\"kjmdihdcyy\"},\"id\":\"qgnnbz\",\"name\":\"tftedz\",\"type\":\"ubjtvgjsxmtyjjv\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.elasticSnapshotPolicies() + .listElasticVolumes("nldpxottd", "i", "ocqibz", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("lyt", response.iterator().next().location()); + Assertions.assertEquals("qseusrfjbdxzfxnx", response.iterator().next().tags().get("lbmuos")); + Assertions.assertEquals("hweebiph", response.iterator().next().properties().filePath()); + Assertions.assertEquals(1724186784361546665L, response.iterator().next().properties().size()); + Assertions.assertEquals(19135096, + response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("dhzybsp", + response.iterator().next().properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("bctbhp", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("evsaa", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("p", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("khfjqebglcxkx", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("ygysemtme", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("wxspvckojaz", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java new file mode 100644 index 000000000000..3f1b6e8ec2e6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyDailyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyDailySchedule model + = BinaryData.fromString("{\"snapshotsToKeep\":195751887,\"hour\":351038276,\"minute\":1244387227}") + .toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(195751887, model.snapshotsToKeep()); + Assertions.assertEquals(351038276, model.hour()); + Assertions.assertEquals(1244387227, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyDailySchedule model + = new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(195751887) + .withHour(351038276) + .withMinute(1244387227); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(195751887, model.snapshotsToKeep()); + Assertions.assertEquals(351038276, model.hour()); + Assertions.assertEquals(1244387227, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java new file mode 100644 index 000000000000..786a7777dd9f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyHourlyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyHourlySchedule model + = BinaryData.fromString("{\"snapshotsToKeep\":1679181375,\"minute\":284348485}") + .toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1679181375, model.snapshotsToKeep()); + Assertions.assertEquals(284348485, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyHourlySchedule model + = new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1679181375).withMinute(284348485); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1679181375, model.snapshotsToKeep()); + Assertions.assertEquals(284348485, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java new file mode 100644 index 000000000000..d9cbbed7f6cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyInner model = BinaryData.fromString( + "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":32108213,\"minute\":1374420811},\"dailySchedule\":{\"snapshotsToKeep\":2093325150,\"hour\":99469711,\"minute\":799727678},\"weeklySchedule\":{\"snapshotsToKeep\":648300753,\"days\":[\"Tuesday\"],\"hour\":1432643181,\"minute\":1322140273},\"monthlySchedule\":{\"snapshotsToKeep\":1175028140,\"daysOfMonth\":[1859068640,1682333045,517079921],\"hour\":955736847,\"minute\":543934665},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Accepted\"},\"eTag\":\"fgvxirpghriypoqe\",\"location\":\"lqhykprlpyz\",\"tags\":{\"smexiitdf\":\"iq\",\"nustgnljh\":\"xtyasiibmiyb\"},\"id\":\"mgixhcmavmqfou\",\"name\":\"or\",\"type\":\"cgyypro\"}") + .toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("lqhykprlpyz", model.location()); + Assertions.assertEquals("iq", model.tags().get("smexiitdf")); + Assertions.assertEquals(32108213, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1374420811, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(2093325150, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(99469711, model.properties().dailySchedule().hour()); + Assertions.assertEquals(799727678, model.properties().dailySchedule().minute()); + Assertions.assertEquals(648300753, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1432643181, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1322140273, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1175028140, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1859068640, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(955736847, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(543934665, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyInner model = new ElasticSnapshotPolicyInner().withLocation("lqhykprlpyz") + .withTags(mapOf("smexiitdf", "iq", "nustgnljh", "xtyasiibmiyb")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(32108213).withMinute(1374420811)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(2093325150) + .withHour(99469711) + .withMinute(799727678)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(648300753) + .withDays(Arrays.asList(DayOfWeek.TUESDAY)) + .withHour(1432643181) + .withMinute(1322140273)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1175028140) + .withDaysOfMonth(Arrays.asList(1859068640, 1682333045, 517079921)) + .withHour(955736847) + .withMinute(543934665)) + .withPolicyStatus(PolicyStatus.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("lqhykprlpyz", model.location()); + Assertions.assertEquals("iq", model.tags().get("smexiitdf")); + Assertions.assertEquals(32108213, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1374420811, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(2093325150, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(99469711, model.properties().dailySchedule().hour()); + Assertions.assertEquals(799727678, model.properties().dailySchedule().minute()); + Assertions.assertEquals(648300753, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1432643181, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1322140273, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1175028140, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1859068640, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(955736847, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(543934665, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); + } + + // 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/ElasticSnapshotPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java new file mode 100644 index 000000000000..4204c4bbc055 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyListResultTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1401279651,\"minute\":1236103657},\"dailySchedule\":{\"snapshotsToKeep\":512397755,\"hour\":204772746,\"minute\":1829804009},\"weeklySchedule\":{\"snapshotsToKeep\":488183187,\"days\":[\"Saturday\"],\"hour\":2056787,\"minute\":1402000127},\"monthlySchedule\":{\"snapshotsToKeep\":405825776,\"daysOfMonth\":[1320824273,765217570,51098214,429988434],\"hour\":2064090558,\"minute\":202407711},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"pnodawopqhe\",\"location\":\"ptmcgsbostzelnd\",\"tags\":{\"neqvcwwyyurmo\":\"utmzlbiojlvfhrbb\",\"rsnm\":\"hppr\"},\"id\":\"k\",\"name\":\"yzejnhlbk\",\"type\":\"bzpcpiljhahzvec\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":771946842,\"minute\":320038857},\"dailySchedule\":{\"snapshotsToKeep\":1717475306,\"hour\":36238226,\"minute\":1944558428},\"weeklySchedule\":{\"snapshotsToKeep\":848413713,\"days\":[\"Sunday\",\"Tuesday\",\"Thursday\",\"Saturday\"],\"hour\":47628840,\"minute\":659521357},\"monthlySchedule\":{\"snapshotsToKeep\":407191024,\"daysOfMonth\":[1895381601],\"hour\":53099782,\"minute\":334650465},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Failed\"},\"eTag\":\"xap\",\"location\":\"og\",\"tags\":{\"pud\":\"o\",\"yawbzasqbu\":\"dabtqwp\",\"oguyaip\":\"ljgkyex\",\"waz\":\"dsdaultxijjumf\"},\"id\":\"nqnm\",\"name\":\"jng\",\"type\":\"qdqx\"}],\"nextLink\":\"jw\"}") + .toObject(ElasticSnapshotPolicyListResult.class); + Assertions.assertEquals("ptmcgsbostzelnd", model.value().get(0).location()); + Assertions.assertEquals("utmzlbiojlvfhrbb", model.value().get(0).tags().get("neqvcwwyyurmo")); + Assertions.assertEquals(1401279651, model.value().get(0).properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1236103657, model.value().get(0).properties().hourlySchedule().minute()); + Assertions.assertEquals(512397755, model.value().get(0).properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(204772746, model.value().get(0).properties().dailySchedule().hour()); + Assertions.assertEquals(1829804009, model.value().get(0).properties().dailySchedule().minute()); + Assertions.assertEquals(488183187, model.value().get(0).properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.value().get(0).properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(2056787, model.value().get(0).properties().weeklySchedule().hour()); + Assertions.assertEquals(1402000127, model.value().get(0).properties().weeklySchedule().minute()); + Assertions.assertEquals(405825776, model.value().get(0).properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1320824273, model.value().get(0).properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2064090558, model.value().get(0).properties().monthlySchedule().hour()); + Assertions.assertEquals(202407711, model.value().get(0).properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.value().get(0).properties().policyStatus()); + Assertions.assertEquals("jw", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java new file mode 100644 index 000000000000..2e72c1e1e42d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyMonthlyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyMonthlySchedule model = BinaryData.fromString( + "{\"snapshotsToKeep\":1023774420,\"daysOfMonth\":[1410759489,975407039,952311189],\"hour\":2048724944,\"minute\":1770973346}") + .toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(1023774420, model.snapshotsToKeep()); + Assertions.assertEquals(1410759489, model.daysOfMonth().get(0)); + Assertions.assertEquals(2048724944, model.hour()); + Assertions.assertEquals(1770973346, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyMonthlySchedule model + = new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1023774420) + .withDaysOfMonth(Arrays.asList(1410759489, 975407039, 952311189)) + .withHour(2048724944) + .withMinute(1770973346); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(1023774420, model.snapshotsToKeep()); + Assertions.assertEquals(1410759489, model.daysOfMonth().get(0)); + Assertions.assertEquals(2048724944, model.hour()); + Assertions.assertEquals(1770973346, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java new file mode 100644 index 000000000000..e083c825e24c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyProperties model = BinaryData.fromString( + "{\"hourlySchedule\":{\"snapshotsToKeep\":495460912,\"minute\":677853893},\"dailySchedule\":{\"snapshotsToKeep\":2095396733,\"hour\":384308231,\"minute\":2095603265},\"weeklySchedule\":{\"snapshotsToKeep\":1106032172,\"days\":[\"Friday\"],\"hour\":90361491,\"minute\":519028408},\"monthlySchedule\":{\"snapshotsToKeep\":1220118900,\"daysOfMonth\":[1074216267,1138245525],\"hour\":1503356934,\"minute\":1649651263},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Updating\"}") + .toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(495460912, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(677853893, model.hourlySchedule().minute()); + Assertions.assertEquals(2095396733, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(384308231, model.dailySchedule().hour()); + Assertions.assertEquals(2095603265, model.dailySchedule().minute()); + Assertions.assertEquals(1106032172, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(90361491, model.weeklySchedule().hour()); + Assertions.assertEquals(519028408, model.weeklySchedule().minute()); + Assertions.assertEquals(1220118900, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1074216267, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1503356934, model.monthlySchedule().hour()); + Assertions.assertEquals(1649651263, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyProperties model = new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(495460912).withMinute(677853893)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(2095396733) + .withHour(384308231) + .withMinute(2095603265)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1106032172) + .withDays(Arrays.asList(DayOfWeek.FRIDAY)) + .withHour(90361491) + .withMinute(519028408)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1220118900) + .withDaysOfMonth(Arrays.asList(1074216267, 1138245525)) + .withHour(1503356934) + .withMinute(1649651263)) + .withPolicyStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(495460912, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(677853893, model.hourlySchedule().minute()); + Assertions.assertEquals(2095396733, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(384308231, model.dailySchedule().hour()); + Assertions.assertEquals(2095603265, model.dailySchedule().minute()); + Assertions.assertEquals(1106032172, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(90361491, model.weeklySchedule().hour()); + Assertions.assertEquals(519028408, model.weeklySchedule().minute()); + Assertions.assertEquals(1220118900, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1074216267, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1503356934, model.monthlySchedule().hour()); + Assertions.assertEquals(1649651263, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java new file mode 100644 index 000000000000..ddf86434c124 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdatePropertiesTests.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyUpdateProperties model = BinaryData.fromString( + "{\"hourlySchedule\":{\"snapshotsToKeep\":524378384,\"minute\":297502436},\"dailySchedule\":{\"snapshotsToKeep\":55870102,\"hour\":76576423,\"minute\":2010398263},\"weeklySchedule\":{\"snapshotsToKeep\":1582753325,\"days\":[\"Thursday\",\"Monday\",\"Friday\"],\"hour\":1298991349,\"minute\":815140204},\"monthlySchedule\":{\"snapshotsToKeep\":1971838421,\"daysOfMonth\":[250653832,1423111949,1084063720],\"hour\":1276136416,\"minute\":1965691709},\"policyStatus\":\"Disabled\"}") + .toObject(ElasticSnapshotPolicyUpdateProperties.class); + Assertions.assertEquals(524378384, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(297502436, model.hourlySchedule().minute()); + Assertions.assertEquals(55870102, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(76576423, model.dailySchedule().hour()); + Assertions.assertEquals(2010398263, model.dailySchedule().minute()); + Assertions.assertEquals(1582753325, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(1298991349, model.weeklySchedule().hour()); + Assertions.assertEquals(815140204, model.weeklySchedule().minute()); + Assertions.assertEquals(1971838421, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(250653832, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1276136416, model.monthlySchedule().hour()); + Assertions.assertEquals(1965691709, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyUpdateProperties model = new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(524378384).withMinute(297502436)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(55870102) + .withHour(76576423) + .withMinute(2010398263)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1582753325) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.MONDAY, DayOfWeek.FRIDAY)) + .withHour(1298991349) + .withMinute(815140204)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1971838421) + .withDaysOfMonth(Arrays.asList(250653832, 1423111949, 1084063720)) + .withHour(1276136416) + .withMinute(1965691709)) + .withPolicyStatus(PolicyStatus.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdateProperties.class); + Assertions.assertEquals(524378384, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(297502436, model.hourlySchedule().minute()); + Assertions.assertEquals(55870102, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(76576423, model.dailySchedule().hour()); + Assertions.assertEquals(2010398263, model.dailySchedule().minute()); + Assertions.assertEquals(1582753325, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(1298991349, model.weeklySchedule().hour()); + Assertions.assertEquals(815140204, model.weeklySchedule().minute()); + Assertions.assertEquals(1971838421, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(250653832, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1276136416, model.monthlySchedule().hour()); + Assertions.assertEquals(1965691709, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java new file mode 100644 index 000000000000..e28a25eb3ab6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyDailySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyHourlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyMonthlySchedule; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdate; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyUpdateProperties; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import com.azure.resourcemanager.netapp.models.PolicyStatus; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyUpdate model = BinaryData.fromString( + "{\"tags\":{\"ihsgq\":\"yibcy\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1889253771,\"minute\":1916069806},\"dailySchedule\":{\"snapshotsToKeep\":1436394090,\"hour\":1603035621,\"minute\":1235671059},\"weeklySchedule\":{\"snapshotsToKeep\":1084867898,\"days\":[\"Thursday\",\"Wednesday\"],\"hour\":1206774170,\"minute\":1817960219},\"monthlySchedule\":{\"snapshotsToKeep\":1679543424,\"daysOfMonth\":[879403543,923687836,1828890303,1303035802],\"hour\":1202963506,\"minute\":111762942},\"policyStatus\":\"Enabled\"}}") + .toObject(ElasticSnapshotPolicyUpdate.class); + Assertions.assertEquals("yibcy", model.tags().get("ihsgq")); + Assertions.assertEquals(1889253771, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1916069806, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1436394090, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1603035621, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1235671059, model.properties().dailySchedule().minute()); + Assertions.assertEquals(1084867898, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1206774170, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1817960219, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1679543424, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(879403543, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1202963506, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(111762942, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyUpdate model = new ElasticSnapshotPolicyUpdate().withTags(mapOf("ihsgq", "yibcy")) + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1889253771).withMinute(1916069806)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1436394090) + .withHour(1603035621) + .withMinute(1235671059)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1084867898) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.WEDNESDAY)) + .withHour(1206774170) + .withMinute(1817960219)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1679543424) + .withDaysOfMonth(Arrays.asList(879403543, 923687836, 1828890303, 1303035802)) + .withHour(1202963506) + .withMinute(111762942)) + .withPolicyStatus(PolicyStatus.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdate.class); + Assertions.assertEquals("yibcy", model.tags().get("ihsgq")); + Assertions.assertEquals(1889253771, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1916069806, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1436394090, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1603035621, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1235671059, model.properties().dailySchedule().minute()); + Assertions.assertEquals(1084867898, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1206774170, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1817960219, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1679543424, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(879403543, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1202963506, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(111762942, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.properties().policyStatus()); + } + + // 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/ElasticSnapshotPolicyVolumeListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java new file mode 100644 index 000000000000..b3f5552246dc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyVolumeListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyVolumeList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"filePath\":\"fusfzsvtuikzhajq\",\"size\":3788300585704298114,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"nqnzrd\",\"mountTargets\":[{\"ipAddress\":\"wxznptgoei\",\"smbServerFqdn\":\"b\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hv\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"kvntjlrigjkskyri\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"idsxwaabzmifry\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"ri\",\"restorationState\":\"Failed\"},\"eTag\":\"bgopxlhslnel\",\"zones\":[\"ixynllxecwcrojp\",\"slhcawjutifd\",\"fmvigorqjbttzh\",\"aglkafhon\"],\"location\":\"ujeickp\",\"tags\":{\"pmxelnwcltyje\":\"p\",\"mlfmkqs\":\"ex\"},\"id\":\"azuawx\",\"name\":\"z\",\"type\":\"puamwabzxr\"},{\"properties\":{\"filePath\":\"cush\",\"size\":4071060705023044970,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"SMB\",\"SMB\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"gzwywak\",\"mountTargets\":[{\"ipAddress\":\"nsmjbl\",\"smbServerFqdn\":\"jhlnymzotqyryu\"},{\"ipAddress\":\"bmqqvxmvw\",\"smbServerFqdn\":\"tayx\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"peujlzqn\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"sqltnzo\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"xgnxfyqonmpqoxwd\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"xeiiq\",\"restorationState\":\"Restored\"},\"eTag\":\"tmwwi\",\"zones\":[\"hfqpofv\",\"bcblemb\",\"kbwvqvxkdiv\"],\"location\":\"heb\",\"tags\":{\"izvcjfe\":\"wbzuwfmdurage\",\"ggbqi\":\"isdju\",\"m\":\"kxkbsazgakgacyr\",\"pv\":\"dmspof\"},\"id\":\"hryl\",\"name\":\"iofrzgbzjedmstk\",\"type\":\"nlvxbcuii\"},{\"properties\":{\"filePath\":\"ktwfa\",\"size\":250383910704724497,\"exportPolicy\":{\"rules\":[{},{},{},{}]},\"protocolTypes\":[\"SMB\",\"SMB\",\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"z\",\"mountTargets\":[{\"ipAddress\":\"buqny\",\"smbServerFqdn\":\"hzfylsgcrpfbc\"},{\"ipAddress\":\"ezzcez\",\"smbServerFqdn\":\"fwyfwlwxjwet\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hclafzvaylptrs\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ztcmwq\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"xwaxfewzjkj\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"hpsylkksh\",\"restorationState\":\"Restored\"},\"eTag\":\"mbmxzjrgywwpgj\",\"zones\":[\"ptfujgicgaaoept\",\"aqutdewemxswvruu\"],\"location\":\"zjgehkfkim\",\"tags\":{\"jqepqwhi\":\"xokffqyin\",\"fclduccbirdsv\":\"monstshiyxgve\",\"stmninwjizcilng\":\"wcobie\"},\"id\":\"gshejjtbxqmulux\",\"name\":\"xqzv\",\"type\":\"ers\"},{\"properties\":{\"filePath\":\"cucrwnamikze\",\"size\":1725483024927981139,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"SMB\",\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"hokzrusw\",\"mountTargets\":[{\"ipAddress\":\"zznvfbyc\",\"smbServerFqdn\":\"xjww\"},{\"ipAddress\":\"z\",\"smbServerFqdn\":\"mwmxqhndvnoamld\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ohdjhhflzok\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"xpelnjetagltsx\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"tgzpnpb\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"ccsrmozihmipgaw\",\"restorationState\":\"Failed\"},\"eTag\":\"ky\",\"zones\":[\"cjxgrytf\",\"pcycilrmcaykg\",\"noxuztrksx\",\"pndfcpfnznt\"],\"location\":\"twk\",\"tags\":{\"tcqiosmg\":\"srxuzvoam\",\"xqdlyrtltlapr\":\"zah\",\"atbhjmznn\":\"tz\"},\"id\":\"s\",\"name\":\"qeqala\",\"type\":\"vlagun\"}],\"nextLink\":\"gfebwlnb\"}") + .toObject(ElasticSnapshotPolicyVolumeList.class); + Assertions.assertEquals("ujeickp", model.value().get(0).location()); + Assertions.assertEquals("p", model.value().get(0).tags().get("pmxelnwcltyje")); + Assertions.assertEquals("fusfzsvtuikzhajq", model.value().get(0).properties().filePath()); + Assertions.assertEquals(3788300585704298114L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("nqnzrd", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("hv", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("kvntjlrigjkskyri", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("idsxwaabzmifry", + model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + model.value().get(0).properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, + model.value().get(0).properties().smbProperties().smbEncryption()); + Assertions.assertEquals("ri", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("ixynllxecwcrojp", model.value().get(0).zones().get(0)); + Assertions.assertEquals("gfebwlnb", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java new file mode 100644 index 000000000000..51982e378a8f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DayOfWeek; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyWeeklySchedule; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSnapshotPolicyWeeklyScheduleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotPolicyWeeklySchedule model = BinaryData.fromString( + "{\"snapshotsToKeep\":1964877049,\"days\":[\"Saturday\",\"Thursday\",\"Saturday\"],\"hour\":2096051855,\"minute\":1486108612}") + .toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(1964877049, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.days().get(0)); + Assertions.assertEquals(2096051855, model.hour()); + Assertions.assertEquals(1486108612, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyWeeklySchedule model + = new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1964877049) + .withDays(Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.THURSDAY, DayOfWeek.SATURDAY)) + .withHour(2096051855) + .withMinute(1486108612); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(1964877049, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.days().get(0)); + Assertions.assertEquals(2096051855, model.hour()); + Assertions.assertEquals(1486108612, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java new file mode 100644 index 000000000000..d502127a3fb2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotProperties model + = BinaryData.fromString("{\"provisioningState\":\"Creating\"}").toObject(ElasticSnapshotProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotProperties model = new ElasticSnapshotProperties(); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..4fe5b65f3c75 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"cbi\",\"name\":\"wcdgzsez\",\"type\":\"uxk\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshot response = manager.elasticSnapshots() + .define("xjoezlqxrkdknko") + .withExistingElasticVolume("pjhgejkb", "hhdau", "ghoox", "exbkhx") + .withProperties(new ElasticSnapshotProperties()) + .create(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java new file mode 100644 index 000000000000..137631e27e4c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Patching\"},\"id\":\"ulwempdc\",\"name\":\"frhjulrsulwzp\",\"type\":\"lusnawmhhgzotfr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticSnapshot response = manager.elasticSnapshots() + .getWithResponse("ufgjblcdr", "yfcemftz", "yykyalu", "ekdfqnhttwd", "wrczfjjnnuxxrk", + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java new file mode 100644 index 000000000000..58c8fa7f030f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsListByElasticVolumeMockTests { + @Test + public void testListByElasticVolume() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"zikgqabooh\",\"name\":\"bmsgycqsxrmdv\",\"type\":\"wuyqaeo\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.elasticSnapshots() + .listByElasticVolume("yrgkoekv", "wxxyxhighctx", "xmolpcqydeyk", "skiczd", + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java new file mode 100644 index 000000000000..852f7bc20672 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeBackupPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeBackupProperties model = BinaryData.fromString( + "{\"elasticBackupPolicyResourceId\":\"r\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"vmmghfcfiwrxgk\"}") + .toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("r", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("vmmghfcfiwrxgk", model.elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeBackupProperties model = new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("r") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("vmmghfcfiwrxgk"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("r", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("vmmghfcfiwrxgk", model.elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java new file mode 100644 index 000000000000..9ac1640c8b8e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeDataProtectionPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeDataProtectionPatchProperties model = BinaryData.fromString( + "{\"snapshot\":{\"snapshotPolicyResourceId\":\"ppxynenls\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"izzgwkln\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"feycxcktp\"}}") + .toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("ppxynenls", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("izzgwkln", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("feycxcktp", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionPatchProperties model = new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("ppxynenls")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("izzgwkln") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("feycxcktp")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("ppxynenls", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("izzgwkln", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("feycxcktp", model.backup().elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java new file mode 100644 index 000000000000..68aeaea2e06b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeDataProtectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeDataProtectionProperties model = BinaryData.fromString( + "{\"snapshot\":{\"snapshotPolicyResourceId\":\"cporxvxcjz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zxfpxtgqsc\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"t\"}}") + .toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("cporxvxcjz", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zxfpxtgqsc", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("t", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionProperties model = new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("cporxvxcjz")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("zxfpxtgqsc") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("t")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("cporxvxcjz", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zxfpxtgqsc", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("t", model.backup().elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java new file mode 100644 index 000000000000..0bb9e59a8490 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeInner model = BinaryData.fromString( + "{\"properties\":{\"filePath\":\"sdymbrn\",\"size\":8491416597848790528,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":214541271,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"xvd\",\"ffwafq\",\"oudaspavehhrvk\",\"unzo\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1288828831,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"dyuib\",\"mfdn\",\"zydvfvf\",\"jnaeois\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1029711720,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"cvwmzhwplefa\",\"vxilcbt\",\"nhnzeyqxt\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv3\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"vodggxdbee\",\"mountTargets\":[{\"ipAddress\":\"knlrariaawiuagy\",\"smbServerFqdn\":\"qfby\"},{\"ipAddress\":\"rfgi\",\"smbServerFqdn\":\"tcojocqwo\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"jvusfzldmozux\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"sbtkadpysownbtgk\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"jqctojcmisofie\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qdhcu\",\"restorationState\":\"Restored\"},\"eTag\":\"lcwkhihihlhz\",\"zones\":[\"tzbsrgnowcjhf\"],\"location\":\"vecactx\",\"tags\":{\"ovekqvgqouwi\":\"teyowclu\",\"ikf\":\"zmpjwyiv\"},\"id\":\"cvhrfsp\",\"name\":\"uagrttikteusqc\",\"type\":\"kvyklxubyjaffmm\"}") + .toObject(ElasticVolumeInner.class); + Assertions.assertEquals("vecactx", model.location()); + Assertions.assertEquals("teyowclu", model.tags().get("ovekqvgqouwi")); + Assertions.assertEquals("sdymbrn", model.properties().filePath()); + Assertions.assertEquals(8491416597848790528L, model.properties().size()); + Assertions.assertEquals(214541271, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xvd", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("vodggxdbee", model.properties().snapshotResourceId()); + Assertions.assertEquals("jvusfzldmozux", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("sbtkadpysownbtgk", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("jqctojcmisofie", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("qdhcu", model.properties().backupResourceId()); + Assertions.assertEquals("tzbsrgnowcjhf", model.zones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeInner model + = new ElasticVolumeInner().withLocation("vecactx") + .withTags(mapOf("ovekqvgqouwi", "teyowclu", "ikf", "zmpjwyiv")) + .withProperties( + new ElasticVolumeProperties().withFilePath("sdymbrn") + .withSize(8491416597848790528L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(214541271) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients( + Arrays.asList("xvd", "ffwafq", "oudaspavehhrvk", "unzo")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(1288828831) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("dyuib", "mfdn", "zydvfvf", "jnaeois")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(1029711720) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("cvwmzhwplefa", "vxilcbt", "nhnzeyqxt")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.NFSV3)) + .withSnapshotResourceId("vodggxdbee") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot( + new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("jvusfzldmozux")) + .withBackup(new ElasticVolumeBackupProperties() + .withElasticBackupPolicyResourceId("sbtkadpysownbtgk") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("jqctojcmisofie"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("qdhcu")) + .withZones(Arrays.asList("tzbsrgnowcjhf")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeInner.class); + Assertions.assertEquals("vecactx", model.location()); + Assertions.assertEquals("teyowclu", model.tags().get("ovekqvgqouwi")); + Assertions.assertEquals("sdymbrn", model.properties().filePath()); + Assertions.assertEquals(8491416597848790528L, model.properties().size()); + Assertions.assertEquals(214541271, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xvd", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("vodggxdbee", model.properties().snapshotResourceId()); + Assertions.assertEquals("jvusfzldmozux", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("sbtkadpysownbtgk", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("jqctojcmisofie", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("qdhcu", model.properties().backupResourceId()); + Assertions.assertEquals("tzbsrgnowcjhf", model.zones().get(0)); + } + + // 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/ElasticVolumeListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java new file mode 100644 index 000000000000..05b5dd1c7157 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"filePath\":\"teeammxqiekkkzd\",\"size\":8657211280309706558,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"SMB\",\"NFSv3\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"refdee\",\"mountTargets\":[{\"ipAddress\":\"uij\",\"smbServerFqdn\":\"txsu\"},{\"ipAddress\":\"rtujwsawddjibab\",\"smbServerFqdn\":\"ititvtzeexavoxt\"},{\"ipAddress\":\"lecdmdqbw\",\"smbServerFqdn\":\"pqtgsfjac\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hxudbxvodht\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"rudhzmmesckdl\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"rcxfailcfxwmdb\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"tufqobrjlnacgc\",\"restorationState\":\"Restored\"},\"eTag\":\"hxkizvytnrzv\",\"zones\":[\"r\",\"aeranokqgukkjqnv\",\"roylaxxu\",\"cdisd\"],\"location\":\"fj\",\"tags\":{\"vyc\":\"vgjrwhr\",\"c\":\"t\",\"btmvpdvjdhttza\":\"xgccknfnw\"},\"id\":\"fedxihchrphkm\",\"name\":\"rjdqnsdfzp\",\"type\":\"gtgkylkdghr\"},{\"properties\":{\"filePath\":\"uutlwxezwzhok\",\"size\":8527101122757684159,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ipifhpfeoajvg\",\"mountTargets\":[{\"ipAddress\":\"jcsheafid\",\"smbServerFqdn\":\"ugsresmkssjhoi\"},{\"ipAddress\":\"xfkfwegprhptill\",\"smbServerFqdn\":\"biqtgdq\"},{\"ipAddress\":\"mcwsldrizetpwb\",\"smbServerFqdn\":\"lllibph\"},{\"ipAddress\":\"zmizakakan\",\"smbServerFqdn\":\"p\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ha\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"lhjlmuoyxprimr\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"eecjmeis\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lwxdzaum\",\"restorationState\":\"Failed\"},\"eTag\":\"hguuf\",\"zones\":[\"oyjathwtzol\",\"a\",\"mwmdxmebwjscjpa\"],\"location\":\"xveabf\",\"tags\":{\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\",\"pibudqwyxebeybpm\":\"zaapmudqmeqwi\"},\"id\":\"znrtffyaqit\",\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\"},{\"properties\":{\"filePath\":\"cgq\",\"size\":3611057572336675908,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"SMB\",\"NFSv4\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"quhiosrsjuivf\",\"mountTargets\":[{\"ipAddress\":\"yirnxzhcz\",\"smbServerFqdn\":\"rxzbujr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vwrevkhgnlnzon\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"piqywnc\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"z\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"tdhgbjkvrelj\",\"restorationState\":\"Restoring\"},\"eTag\":\"rvzmlovuana\",\"zones\":[\"xlpm\",\"erbdk\",\"lvidizozs\"],\"location\":\"ccxjm\",\"tags\":{\"uqj\":\"dgnwncypuuwwlt\",\"if\":\"tzenk\",\"xcudchxgsr\":\"zhmkdasvflyh\",\"lvizb\":\"oldforobw\"},\"id\":\"hfovvacqpbtu\",\"name\":\"dxe\",\"type\":\"zab\"},{\"properties\":{\"filePath\":\"l\",\"size\":741706840028604356,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"SMB\",\"SMB\",\"NFSv3\",\"NFSv3\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"cqucwyhahnom\",\"mountTargets\":[{\"ipAddress\":\"wuhpsvfuur\",\"smbServerFqdn\":\"lwexxwl\"},{\"ipAddress\":\"niexzsrzpgepq\",\"smbServerFqdn\":\"bb\"},{\"ipAddress\":\"pgdakchzyvli\",\"smbServerFqdn\":\"nrkcxkj\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"mysu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"qrntv\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"psttexoq\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"fmhruncuwm\",\"restorationState\":\"Restoring\"},\"eTag\":\"cdqzhlctddu\",\"zones\":[\"dyfpchrqbnj\"],\"location\":\"cgegydcwbo\",\"tags\":{\"raiouaubrjtl\":\"mvqqolih\"},\"id\":\"qxfuojrngif\",\"name\":\"rzpasccbiuimzdly\",\"type\":\"dfqwmkyoq\"}],\"nextLink\":\"dvruzslzojhpctf\"}") + .toObject(ElasticVolumeListResult.class); + Assertions.assertEquals("fj", model.value().get(0).location()); + Assertions.assertEquals("vgjrwhr", model.value().get(0).tags().get("vyc")); + Assertions.assertEquals("teeammxqiekkkzd", model.value().get(0).properties().filePath()); + Assertions.assertEquals(8657211280309706558L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("refdee", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("hxudbxvodht", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("rudhzmmesckdl", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("rcxfailcfxwmdb", + model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + model.value().get(0).properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + model.value().get(0).properties().smbProperties().smbEncryption()); + Assertions.assertEquals("tufqobrjlnacgc", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("r", model.value().get(0).zones().get(0)); + Assertions.assertEquals("dvruzslzojhpctf", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java new file mode 100644 index 000000000000..dce018d0407c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeProperties model = BinaryData.fromString( + "{\"filePath\":\"bl\",\"size\":3886221221388785508,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":193875748,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"tttwgdslqxih\",\"rmooizqse\",\"pxiutc\",\"apzhyrpetoge\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"NFSv3\",\"SMB\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"rqnkkzjcjbtr\",\"mountTargets\":[{\"ipAddress\":\"vvib\",\"smbServerFqdn\":\"jj\"},{\"ipAddress\":\"oqbeitpkxzt\",\"smbServerFqdn\":\"ob\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"idgfc\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"pimaqxzhemjyh\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"swtwkozzwc\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"fajnjwltlwtjjguk\",\"restorationState\":\"Restoring\"}") + .toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("bl", model.filePath()); + Assertions.assertEquals(3886221221388785508L, model.size()); + Assertions.assertEquals(193875748, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("tttwgdslqxih", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, model.protocolTypes().get(0)); + Assertions.assertEquals("rqnkkzjcjbtr", model.snapshotResourceId()); + Assertions.assertEquals("idgfc", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("pimaqxzhemjyh", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("swtwkozzwc", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("fajnjwltlwtjjguk", model.backupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeProperties model = new ElasticVolumeProperties().withFilePath("bl") + .withSize(3886221221388785508L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(193875748) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("tttwgdslqxih", "rmooizqse", "pxiutc", "apzhyrpetoge")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3, ElasticProtocolType.SMB, + ElasticProtocolType.NFSV3, ElasticProtocolType.SMB)) + .withSnapshotResourceId("rqnkkzjcjbtr") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("idgfc")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("pimaqxzhemjyh") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("swtwkozzwc"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("fajnjwltlwtjjguk"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("bl", model.filePath()); + Assertions.assertEquals(3886221221388785508L, model.size()); + Assertions.assertEquals(193875748, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("tttwgdslqxih", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, model.protocolTypes().get(0)); + Assertions.assertEquals("rqnkkzjcjbtr", model.snapshotResourceId()); + Assertions.assertEquals("idgfc", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("pimaqxzhemjyh", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("swtwkozzwc", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("fajnjwltlwtjjguk", model.backupResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java new file mode 100644 index 000000000000..8fdabb3d79d3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeRevertTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeRevert model + = BinaryData.fromString("{\"snapshotResourceId\":\"dxotng\"}").toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("dxotng", model.snapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeRevert model = new ElasticVolumeRevert().withSnapshotResourceId("dxotng"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("dxotng", model.snapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java new file mode 100644 index 000000000000..29fbbf58ca6f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeSnapshotPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeSnapshotProperties model + = BinaryData.fromString("{\"snapshotPolicyResourceId\":\"hdqazkmtgguwp\"}") + .toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("hdqazkmtgguwp", model.snapshotPolicyResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeSnapshotProperties model + = new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("hdqazkmtgguwp"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("hdqazkmtgguwp", model.snapshotPolicyResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java new file mode 100644 index 000000000000..7e1e9908222d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeUpdateProperties model = BinaryData.fromString( + "{\"size\":5321233656835013647,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1800110701,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"bkbxgomfa\",\"uwasqvd\",\"e\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":534805612,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"bezkgimsidxasic\",\"dyvvjskgfmocwahp\",\"gat\",\"eaahhvjhhn\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"jjidjk\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"kyxvxevblbjedn\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"geuaulx\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"}}") + .toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(5321233656835013647L, model.size()); + Assertions.assertEquals(1800110701, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("bkbxgomfa", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("jjidjk", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("kyxvxevblbjedn", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("geuaulx", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeUpdateProperties model = new ElasticVolumeUpdateProperties().withSize(5321233656835013647L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1800110701) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("bkbxgomfa", "uwasqvd", "e")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(534805612) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("bezkgimsidxasic", "dyvvjskgfmocwahp", "gat", "eaahhvjhhn")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("jjidjk")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("kyxvxevblbjedn") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("geuaulx"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(5321233656835013647L, model.size()); + Assertions.assertEquals(1800110701, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("bkbxgomfa", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("jjidjk", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("kyxvxevblbjedn", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("geuaulx", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java new file mode 100644 index 000000000000..41060487bb25 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticVolumeUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticVolumeUpdate model = BinaryData.fromString( + "{\"tags\":{\"oxgsgbpfgzdjtx\":\"inzqodfvpgs\",\"qvlgafcqusrdvetn\":\"zflbqvg\",\"uzhyrmewipmvekdx\":\"sdtutnwlduyc\"},\"properties\":{\"size\":8567067499815632576,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":228868871,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"zhhzjhfjmhvvmu\",\"gpmuneqsxvmhfbuz\",\"yihsasbhudypohyu\",\"ms\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":968834448,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"lttymsjn\",\"gqdnfwqzd\",\"gtilax\",\"nfhqlyvijouwivk\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":490725767,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"kvcpwpgclr\",\"ivtsoxfrkenxpm\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":892788506,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ka\",\"ao\",\"vmm\"],\"rootAccess\":\"Disabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"tqlkz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"nitgvkxlz\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"fegcea\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"}}}") + .toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("inzqodfvpgs", model.tags().get("oxgsgbpfgzdjtx")); + Assertions.assertEquals(8567067499815632576L, model.properties().size()); + Assertions.assertEquals(228868871, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("zhhzjhfjmhvvmu", + model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("tqlkz", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("nitgvkxlz", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("fegcea", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeUpdate model + = new ElasticVolumeUpdate() + .withTags(mapOf("oxgsgbpfgzdjtx", "inzqodfvpgs", "qvlgafcqusrdvetn", "zflbqvg", "uzhyrmewipmvekdx", + "sdtutnwlduyc")) + .withProperties( + new ElasticVolumeUpdateProperties().withSize(8567067499815632576L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(228868871) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("zhhzjhfjmhvvmu", "gpmuneqsxvmhfbuz", + "yihsasbhudypohyu", "ms")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(968834448) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("lttymsjn", "gqdnfwqzd", "gtilax", "nfhqlyvijouwivk")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(490725767) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("kvcpwpgclr", "ivtsoxfrkenxpm")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(892788506) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("ka", "ao", "vmm")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("tqlkz")) + .withBackup( + new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("nitgvkxlz") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("fegcea"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties( + new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED))); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("inzqodfvpgs", model.tags().get("oxgsgbpfgzdjtx")); + Assertions.assertEquals(8567067499815632576L, model.properties().size()); + Assertions.assertEquals(228868871, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("zhhzjhfjmhvvmu", + model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("tqlkz", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("nitgvkxlz", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("fegcea", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + } + + // 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/ElasticVolumesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..82e6e0fb8738 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicy; +import com.azure.resourcemanager.netapp.models.ElasticExportPolicyRule; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"filePath\":\"jehhci\",\"size\":7932807147497347629,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":614061983,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"tfpwpqbyejuw\",\"qwdqi\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"lujkhn\",\"mountTargets\":[{\"ipAddress\":\"nkfm\",\"smbServerFqdn\":\"cqtwmlmhjnqtq\"},{\"ipAddress\":\"hj\",\"smbServerFqdn\":\"vragpokddx\"},{\"ipAddress\":\"hhkvguavtptbk\",\"smbServerFqdn\":\"kqynspgbvo\"},{\"ipAddress\":\"bkkwvdxae\",\"smbServerFqdn\":\"okmyr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"lzbnobrqlpbcjt\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"uyudivbxnhsq\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"nqelwgdhuru\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"gatmoljiy\",\"restorationState\":\"Restored\"},\"eTag\":\"nmzvf\",\"zones\":[\"erzztrkn\",\"j\",\"lugdybnhrxlelf\",\"hkeizcp\"],\"location\":\"tdmiwjekptyca\",\"tags\":{\"mhsurlgwqkpmm\":\"jzcqymlcfnz\",\"wiubmomsgvv\":\"pstauol\",\"hewjjmajnkdflqio\":\"hvvlrl\",\"xjoshohtotryegpk\":\"swaeqkzfz\"},\"id\":\"xrmexznlw\",\"name\":\"bfokxkhu\",\"type\":\"ze\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response + = manager.elasticVolumes() + .define("jotvmrxkhl") + .withRegion("i") + .withExistingElasticCapacityPool("ekaj", "lyzgsnor", "jgmn") + .withTags(mapOf("bym", "dvatdavuqm", "mvpsimioyo", "fobjlquvjezcj", "clibbfqpsp", "glkmiqwnnr", + "exzgpmnmabedd", "ladydgnhautwu")) + .withProperties( + new ElasticVolumeProperties().withFilePath("vvjbhvhdiqayf") + .withSize(8301836892382370169L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(92268889) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients( + Arrays.asList("yibdrqrswhbuu", "pyrowtj", "xztfwfqchvczevj")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(608828807) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("pemhzcgkrepdqhqy", "wqwemvxqabckmze")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1218068854) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("lpuzjpcee")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withSnapshotResourceId("axyxzlbciphm") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("ixx")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("zk") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("wpiwxeiicrmpep"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("ijvs")) + .withZones(Arrays.asList("asekwefcvoinw", "qartwy")) + .create(); + + Assertions.assertEquals("tdmiwjekptyca", response.location()); + Assertions.assertEquals("jzcqymlcfnz", response.tags().get("mhsurlgwqkpmm")); + Assertions.assertEquals("jehhci", response.properties().filePath()); + Assertions.assertEquals(7932807147497347629L, response.properties().size()); + Assertions.assertEquals(614061983, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + response.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, + response.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("tfpwpqbyejuw", + response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("lujkhn", response.properties().snapshotResourceId()); + Assertions.assertEquals("lzbnobrqlpbcjt", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("uyudivbxnhsq", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("nqelwgdhuru", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("gatmoljiy", response.properties().backupResourceId()); + Assertions.assertEquals("erzztrkn", response.zones().get(0)); + } + + // 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/ElasticVolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java new file mode 100644 index 000000000000..75234679a6ad --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"filePath\":\"fiijrykwlefksxqc\",\"size\":6075281185802035336,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":144245024,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"q\",\"aiossscyvaifp\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":838955449,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"x\",\"jdhsoy\",\"hpvtyqftteh\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1172847496,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"shxcdedsuenygnxc\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv3\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"rf\",\"mountTargets\":[{\"ipAddress\":\"lr\",\"smbServerFqdn\":\"myltrwntfmtbg\"},{\"ipAddress\":\"dxwnazkurrd\",\"smbServerFqdn\":\"yzjwhsetwwjwzzq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"uukykcyqh\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zzdcykeys\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"opazdazgbs\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"fut\",\"restorationState\":\"Failed\"},\"eTag\":\"ozglq\",\"zones\":[\"nlzclctz\"],\"location\":\"owmnd\",\"tags\":{\"wkudrbcpf\":\"dwzqauxzanhmkvfr\"},\"id\":\"xudqyemebunaucmc\",\"name\":\"rtneemmja\",\"type\":\"wcgxefnohait\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response = manager.elasticVolumes() + .getWithResponse("wwxwjyofgw", "nkbtlwljss", "ctsnldkpwol", "isubxbteog", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("owmnd", response.location()); + Assertions.assertEquals("dwzqauxzanhmkvfr", response.tags().get("wkudrbcpf")); + Assertions.assertEquals("fiijrykwlefksxqc", response.properties().filePath()); + Assertions.assertEquals(6075281185802035336L, response.properties().size()); + Assertions.assertEquals(144245024, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + response.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("q", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("rf", response.properties().snapshotResourceId()); + Assertions.assertEquals("uukykcyqh", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zzdcykeys", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("opazdazgbs", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("fut", response.properties().backupResourceId()); + Assertions.assertEquals("nlzclctz", response.zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java new file mode 100644 index 000000000000..4abf3b8a72a3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec 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.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesListByElasticPoolMockTests { + @Test + public void testListByElasticPool() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"filePath\":\"raudsvhlcdcul\",\"size\":7103232548689363972,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1371553792,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"gyshqrdgrtwmewj\",\"lp\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1886973151,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"rzrr\",\"nsyby\",\"polwzrghsrlei\",\"kfscjfncjwv\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1509328014,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"reuptrk\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1008629589,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vaghmpy\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"SMB\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"cvbxqlapsnss\",\"mountTargets\":[{\"ipAddress\":\"pavidnievwffc\",\"smbServerFqdn\":\"yezslpu\"},{\"ipAddress\":\"cbdsvalpnptwtrk\",\"smbServerFqdn\":\"pazwug\"},{\"ipAddress\":\"qvn\",\"smbServerFqdn\":\"bfe\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"iuhzzgqlmfa\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"giudjpxpq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"hnmhkrezsdsux\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"uxsp\",\"restorationState\":\"Restored\"},\"eTag\":\"m\",\"zones\":[\"okmikpa\",\"fbmjxuvji\"],\"location\":\"dvhaxdvw\",\"tags\":{\"etatlakf\":\"hpphthdklm\",\"vtooxrpo\":\"oixwgiksb\",\"chgjtnhtukfacih\":\"wp\",\"bnuvwcg\":\"bfntumeezbxvq\"},\"id\":\"sgomtmjz\",\"name\":\"xuqgovsxpwwztj\",\"type\":\"mkkhtgfredml\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.elasticVolumes() + .listByElasticPool("anizerwgudasmxub", "fbngfcocef", "priylfmp", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("dvhaxdvw", response.iterator().next().location()); + Assertions.assertEquals("hpphthdklm", response.iterator().next().tags().get("etatlakf")); + Assertions.assertEquals("raudsvhlcdcul", response.iterator().next().properties().filePath()); + Assertions.assertEquals(7103232548689363972L, response.iterator().next().properties().size()); + Assertions.assertEquals(1371553792, + response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("gyshqrdgrtwmewj", + response.iterator().next().properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("cvbxqlapsnss", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("iuhzzgqlmfa", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("giudjpxpq", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("hnmhkrezsdsux", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("uxsp", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("okmikpa", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java new file mode 100644 index 000000000000..a0c752d07c8c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticNfsv3Access; +import com.azure.resourcemanager.netapp.models.ElasticNfsv4Access; +import com.azure.resourcemanager.netapp.models.ElasticProtocolType; +import com.azure.resourcemanager.netapp.models.ElasticRootAccess; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticVolumesRevertMockTests { + @Test + public void testRevert() throws Exception { + String responseStr + = "{\"properties\":{\"filePath\":\"vcebxeetqujxcxxq\",\"size\":4290239630152162906,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":937589961,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"mrvvxwj\",\"ngz\",\"ehqqrsilcchs\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":470051968,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"gv\",\"ojrulfuctejrt\",\"cfjzhxl\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":77627949,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"qmtzzb\",\"qrztrxal\",\"rdhabsr\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1111086602,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"kvyanxkvvc\",\"ems\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\",\"SMB\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"mlivrjjxnwx\",\"mountTargets\":[{\"ipAddress\":\"ojxl\",\"smbServerFqdn\":\"z\"},{\"ipAddress\":\"pgfquwzpwiibelwc\",\"smbServerFqdn\":\"wkwbpjx\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"busqtbxxniuisdz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"d\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"gsecnadbuwqrgx\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"nezoellnkki\",\"restorationState\":\"Failed\"},\"eTag\":\"tumxpymdj\",\"zones\":[\"xroq\",\"qpilrgu\",\"canlduwzorxs\",\"mxaqklxym\"],\"location\":\"qvfqepdxc\",\"tags\":{\"jbowcpj\":\"ubwyv\",\"gixexkydfbwlj\":\"du\",\"tcvbiiftk\":\"vhuerkjddvrglieg\"},\"id\":\"dwgdn\",\"name\":\"efgmwdhcebuv\",\"type\":\"zldbglzoutbaaqg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response = manager.elasticVolumes() + .revert("cgrllc", "na", "vjowazhpabac", "mlyotg", + new ElasticVolumeRevert().withSnapshotResourceId("sxnsrqorcge"), com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qvfqepdxc", response.location()); + Assertions.assertEquals("ubwyv", response.tags().get("jbowcpj")); + Assertions.assertEquals("vcebxeetqujxcxxq", response.properties().filePath()); + Assertions.assertEquals(4290239630152162906L, response.properties().size()); + Assertions.assertEquals(937589961, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + response.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("mrvvxwj", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("mlivrjjxnwx", response.properties().snapshotResourceId()); + Assertions.assertEquals("busqtbxxniuisdz", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("d", response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("gsecnadbuwqrgx", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("nezoellnkki", response.properties().backupResourceId()); + Assertions.assertEquals("xroq", response.zones().get(0)); + } +} 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 e053514b1b74..6e17b1bdc9c0 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 @@ -12,18 +12,18 @@ public final class EncryptionIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EncryptionIdentity model = BinaryData.fromString( - "{\"principalId\":\"fgmvecactxmwo\",\"userAssignedIdentity\":\"yowc\",\"federatedClientId\":\"qovekqvgqou\"}") + "{\"principalId\":\"gdphtvdula\",\"userAssignedIdentity\":\"lejchcsr\",\"federatedClientId\":\"knmzlanrupdwvnp\"}") .toObject(EncryptionIdentity.class); - Assertions.assertEquals("yowc", model.userAssignedIdentity()); - Assertions.assertEquals("qovekqvgqou", model.federatedClientId()); + Assertions.assertEquals("lejchcsr", model.userAssignedIdentity()); + Assertions.assertEquals("knmzlanrupdwvnp", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionIdentity model - = new EncryptionIdentity().withUserAssignedIdentity("yowc").withFederatedClientId("qovekqvgqou"); + = new EncryptionIdentity().withUserAssignedIdentity("lejchcsr").withFederatedClientId("knmzlanrupdwvnp"); model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("yowc", model.userAssignedIdentity()); - Assertions.assertEquals("qovekqvgqou", model.federatedClientId()); + Assertions.assertEquals("lejchcsr", model.userAssignedIdentity()); + Assertions.assertEquals("knmzlanrupdwvnp", model.federatedClientId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java index 07221934efbf..80e15d1ab29e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionTransitionRequestTests.java @@ -12,18 +12,18 @@ public final class EncryptionTransitionRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EncryptionTransitionRequest model - = BinaryData.fromString("{\"virtualNetworkId\":\"wtwko\",\"privateEndpointId\":\"zwculkbawpfajnj\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"cgxuugqkctotiowl\",\"privateEndpointId\":\"teqdptj\"}") .toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("wtwko", model.virtualNetworkId()); - Assertions.assertEquals("zwculkbawpfajnj", model.privateEndpointId()); + Assertions.assertEquals("cgxuugqkctotiowl", model.virtualNetworkId()); + Assertions.assertEquals("teqdptj", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EncryptionTransitionRequest model - = new EncryptionTransitionRequest().withVirtualNetworkId("wtwko").withPrivateEndpointId("zwculkbawpfajnj"); + EncryptionTransitionRequest model = new EncryptionTransitionRequest().withVirtualNetworkId("cgxuugqkctotiowl") + .withPrivateEndpointId("teqdptj"); model = BinaryData.fromObject(model).toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("wtwko", model.virtualNetworkId()); - Assertions.assertEquals("zwculkbawpfajnj", model.privateEndpointId()); + Assertions.assertEquals("cgxuugqkctotiowl", model.virtualNetworkId()); + Assertions.assertEquals("teqdptj", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java index c1dd28df087e..746f980f67ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java @@ -11,22 +11,22 @@ public final class FilePathAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FilePathAvailabilityRequest model - = BinaryData.fromString("{\"name\":\"n\",\"subnetId\":\"zhajoylhjlmuo\",\"availabilityZone\":\"primr\"}") - .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("n", model.name()); - Assertions.assertEquals("zhajoylhjlmuo", model.subnetId()); - Assertions.assertEquals("primr", model.availabilityZone()); + FilePathAvailabilityRequest model = BinaryData + .fromString("{\"name\":\"qllizstac\",\"subnetId\":\"jvhrweft\",\"availabilityZone\":\"qejpmvssehaepwa\"}") + .toObject(FilePathAvailabilityRequest.class); + Assertions.assertEquals("qllizstac", model.name()); + Assertions.assertEquals("jvhrweft", model.subnetId()); + Assertions.assertEquals("qejpmvssehaepwa", model.availabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("n") - .withSubnetId("zhajoylhjlmuo") - .withAvailabilityZone("primr"); + FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("qllizstac") + .withSubnetId("jvhrweft") + .withAvailabilityZone("qejpmvssehaepwa"); model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("n", model.name()); - Assertions.assertEquals("zhajoylhjlmuo", model.subnetId()); - Assertions.assertEquals("primr", model.availabilityZone()); + Assertions.assertEquals("qllizstac", model.name()); + Assertions.assertEquals("jvhrweft", model.subnetId()); + Assertions.assertEquals("qejpmvssehaepwa", model.availabilityZone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java index ff91e8bf119b..aae44610bece 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/KeyVaultPrivateEndpointTests.java @@ -12,18 +12,18 @@ public final class KeyVaultPrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeyVaultPrivateEndpoint model - = BinaryData.fromString("{\"virtualNetworkId\":\"aimlnwiaaom\",\"privateEndpointId\":\"weazul\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"gygqwah\",\"privateEndpointId\":\"ulwgniiprglvawuw\"}") .toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("aimlnwiaaom", model.virtualNetworkId()); - Assertions.assertEquals("weazul", model.privateEndpointId()); + Assertions.assertEquals("gygqwah", model.virtualNetworkId()); + Assertions.assertEquals("ulwgniiprglvawuw", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { KeyVaultPrivateEndpoint model - = new KeyVaultPrivateEndpoint().withVirtualNetworkId("aimlnwiaaom").withPrivateEndpointId("weazul"); + = new KeyVaultPrivateEndpoint().withVirtualNetworkId("gygqwah").withPrivateEndpointId("ulwgniiprglvawuw"); model = BinaryData.fromObject(model).toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("aimlnwiaaom", model.virtualNetworkId()); - Assertions.assertEquals("weazul", model.privateEndpointId()); + Assertions.assertEquals("gygqwah", model.virtualNetworkId()); + Assertions.assertEquals("ulwgniiprglvawuw", model.privateEndpointId()); } } 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 a1255021b243..a54e0734b461 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 @@ -11,22 +11,21 @@ public final class LdapSearchScopeOptTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LdapSearchScopeOpt model = BinaryData - .fromString("{\"userDN\":\"efojyqdhcupl\",\"groupDN\":\"lcwkhihihlhz\",\"groupMembershipFilter\":\"qtz\"}") - .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("efojyqdhcupl", model.userDN()); - Assertions.assertEquals("lcwkhihihlhz", model.groupDN()); - Assertions.assertEquals("qtz", model.groupMembershipFilter()); + LdapSearchScopeOpt model + = BinaryData.fromString("{\"userDN\":\"o\",\"groupDN\":\"rzvh\",\"groupMembershipFilter\":\"wtrhtgv\"}") + .toObject(LdapSearchScopeOpt.class); + Assertions.assertEquals("o", model.userDN()); + Assertions.assertEquals("rzvh", model.groupDN()); + Assertions.assertEquals("wtrhtgv", model.groupMembershipFilter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("efojyqdhcupl") - .withGroupDN("lcwkhihihlhz") - .withGroupMembershipFilter("qtz"); + LdapSearchScopeOpt model + = new LdapSearchScopeOpt().withUserDN("o").withGroupDN("rzvh").withGroupMembershipFilter("wtrhtgv"); model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("efojyqdhcupl", model.userDN()); - Assertions.assertEquals("lcwkhihihlhz", model.groupDN()); - Assertions.assertEquals("qtz", model.groupMembershipFilter()); + Assertions.assertEquals("o", model.userDN()); + Assertions.assertEquals("rzvh", model.groupDN()); + Assertions.assertEquals("wtrhtgv", model.groupMembershipFilter()); } } 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 40e51ba7e5d4..70c995bcb5a0 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,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"2147620d-d322-4b64-92cc-5f5eb029f0e9\",\"tenantId\":\"d523ebb5-f23b-45e2-9377-beb275d25314\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"yivqikfxcvhrfsp\":{\"principalId\":\"38878ce7-c69b-4829-b42e-620a43c1d7a2\",\"clientId\":\"32c299ad-59f8-42c3-9f8c-a230c4e7d979\"},\"grttikteusqczk\":{\"principalId\":\"b862b9fd-b8cd-430d-8286-713e66059c74\",\"clientId\":\"bf5bce83-0e20-4406-a3ae-94d0f14e91af\"}}}") + "{\"principalId\":\"c4a85110-60f1-4929-abc8-371ce82c7e13\",\"tenantId\":\"b2e3d52a-4ca4-4764-84db-7e05c759e227\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vzm\":{\"principalId\":\"30952f9f-b1d1-41db-9013-cbaa10265ea4\",\"clientId\":\"aba3590d-19c7-4d01-beba-28ab55f899d8\"},\"mldgxobfirc\":{\"principalId\":\"445aef10-3c0b-4f83-993b-fda0f108c660\",\"clientId\":\"89c48970-9f0f-4387-809f-4ae5f271c233\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } @@ -25,7 +25,7 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities( - mapOf("yivqikfxcvhrfsp", new UserAssignedIdentity(), "grttikteusqczk", new UserAssignedIdentity())); + mapOf("vzm", new UserAssignedIdentity(), "mldgxobfirc", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java index 149d50e1b9d9..b4ef3cca9783 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceQuotaLimitsAccountsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"current\":1109468062,\"default\":1922509434,\"usage\":1354580304},\"id\":\"czbgomfgbeg\",\"name\":\"qgleohibetnluank\",\"type\":\"rfxeeebtij\"}"; + = "{\"properties\":{\"current\":744353660,\"default\":696598342,\"usage\":574396825},\"id\":\"gkzz\",\"name\":\"taf\",\"type\":\"bzf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimitsAccounts() - .getWithResponse("fdgugeyzi", "grkyuizabsnmfpph", "jee", com.azure.core.util.Context.NONE) + .getWithResponse("bajbuscgduusi", "ycblevpmcl", "jy", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java index 0146aa90f4ba..fa2bf6e2fce2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsAccountsListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceQuotaLimitsAccountsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"current\":799727678,\"default\":960314765,\"usage\":1206650787},\"id\":\"jkuyxoafgaoq\",\"name\":\"tfaeyl\",\"type\":\"nm\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":1020817609,\"default\":1016385722,\"usage\":1910515292},\"id\":\"gcgqyhleseyqrhvy\",\"name\":\"ldotjvdkwisws\",\"type\":\"ukjtasbvwispkxk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.netAppResourceQuotaLimitsAccounts().list("acvbmqz", "qqxlajr", com.azure.core.util.Context.NONE); + PagedIterable response = manager.netAppResourceQuotaLimitsAccounts() + .list("ovwmbjlzqsczpgvd", "napfdqwowftpt", com.azure.core.util.Context.NONE); } } 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 9c812ddc01f4..af490d1600e1 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 @@ -20,7 +20,7 @@ public final class NetAppResourceQuotaLimitsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"current\":2033228649,\"default\":73723123,\"usage\":1335279864},\"id\":\"jbuscg\",\"name\":\"uusioycblev\",\"type\":\"mclujyxkyxlzgs\"}"; + = "{\"properties\":{\"current\":673882978,\"default\":2044693694,\"usage\":976682569},\"id\":\"kpdj\",\"name\":\"aq\",\"type\":\"smqaz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubscriptionQuotaItem response = manager.netAppResourceQuotaLimits() - .getWithResponse("brxmrgch", "apx", com.azure.core.util.Context.NONE) + .getWithResponse("p", "lnfyzav", 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 7d0113cbbbab..9ac326099d11 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 @@ -21,7 +21,7 @@ public final class NetAppResourceQuotaLimitsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"current\":1693307801,\"default\":575737567,\"usage\":1847136590},\"id\":\"ovwmbjlzqsczpgvd\",\"name\":\"napfdqwowftpt\",\"type\":\"uwjtks\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":1280647764,\"default\":874017143,\"usage\":1889355326},\"id\":\"vcpxtzhigqqbtimp\",\"name\":\"jbl\",\"type\":\"rnsihqhudsmus\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.netAppResourceQuotaLimits().list("gkzz", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimits().list("dgonjhxshthmgp", 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 index 0ab25649a67f..d2756f55eb15 100644 --- 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 @@ -22,7 +22,7 @@ public final class NetAppResourceRegionInfosGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"eseyqr\",\"isAvailable\":false},{\"availabilityZone\":\"ldotjvdkwisws\",\"isAvailable\":false},{\"availabilityZone\":\"tasbvw\",\"isAvailable\":true}]},\"id\":\"xkdtxfkndlqvtwkn\",\"name\":\"gmmbu\",\"type\":\"tywatmqaq\"}"; + = "{\"properties\":{\"storageToNetworkProximity\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"z\",\"isAvailable\":false},{\"availabilityZone\":\"ixyxvqbanosjt\",\"isAvailable\":false}]},\"id\":\"bgmgm\",\"name\":\"dorgmynltw\",\"type\":\"p\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionInfoResource response - = manager.netAppResourceRegionInfos().getWithResponse("h", com.azure.core.util.Context.NONE).getValue(); + = manager.netAppResourceRegionInfos().getWithResponse("aawja", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("eseyqr", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_ACROSS_T2, response.storageToNetworkProximity()); + Assertions.assertEquals("z", response.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(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 index 4339b4c6655d..92eccadb0fd7 100644 --- 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 @@ -23,7 +23,7 @@ public final class NetAppResourceRegionInfosListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"byfqxkfaoy\",\"isAvailable\":false},{\"availabilityZone\":\"puvjmvqmtd\",\"isAvailable\":true}]},\"id\":\"gr\",\"name\":\"ejnndljdju\",\"type\":\"kb\"}]}"; + = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"lkpzwbhnrecchd\",\"isAvailable\":true},{\"availabilityZone\":\"uhkahm\",\"isAvailable\":true},{\"availabilityZone\":\"iuc\",\"isAvailable\":true},{\"availabilityZone\":\"wmjpjbweunxcqrr\",\"isAvailable\":true}]},\"id\":\"oihppi\",\"name\":\"bxv\",\"type\":\"nzuz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.netAppResourceRegionInfos().list("ueatgroe", com.azure.core.util.Context.NONE); + = manager.netAppResourceRegionInfos().list("tmfoeajogsyxwet", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1, + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("byfqxkfaoy", + Assertions.assertEquals("lkpzwbhnrecchd", response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertFalse(response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertTrue(response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java index 84c28495320d..d5916d605af2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class NetAppResourceUsagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"id\":\"cvtlubseskvc\",\"name\":{\"value\":\"t\",\"localizedValue\":\"unlpirykycndz\"},\"properties\":{\"currentValue\":1017219676,\"limit\":1105579119,\"unit\":\"uykbbmn\"}}"; + = "{\"id\":\"cwgzwllxzl\",\"name\":{\"value\":\"ix\",\"localizedValue\":\"fculzjrmhpfyw\"},\"properties\":{\"currentValue\":981129054,\"limit\":1738803308,\"unit\":\"fzxsoxinunjlzkd\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UsageResult response = manager.netAppResourceUsages() - .getWithResponse("zdbpqv", "befgvmxn", com.azure.core.util.Context.NONE) + .getWithResponse("qmr", "jparnpvgrszrbwt", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java index bd09e9f6e88e..056c1cb131c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesListMockTests.java @@ -21,7 +21,7 @@ public final class NetAppResourceUsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"aknokzwjjzrl\",\"name\":{\"value\":\"l\",\"localizedValue\":\"yyfytpqsixymm\"},\"properties\":{\"currentValue\":1776640366,\"limit\":1424381442,\"unit\":\"lkjuvsmbmslzoyov\"}}]}"; + = "{\"value\":[{\"id\":\"objopnou\",\"name\":{\"value\":\"ezkqxsalu\",\"localizedValue\":\"igfcvcewbwqhd\"},\"properties\":{\"currentValue\":1088502083,\"limit\":1754087557,\"unit\":\"rncmazdfsqxh\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.netAppResourceUsages().list("xxqcwgaxf", com.azure.core.util.Context.NONE); + = manager.netAppResourceUsages().list("hrptyodlhkfktltd", com.azure.core.util.Context.NONE); } } 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 236ce9365836..8d5d8adb063c 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 @@ -22,7 +22,7 @@ public final class NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests { @Test public void testCheckFilePathAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"wwhnhjtfvpn\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"kzx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCheckFilePathAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("hzagxnvhycvdimw", - new FilePathAvailabilityRequest().withName("zregzgyufutrwpw") - .withSubnetId("ryekzkd") - .withAvailabilityZone("eotta"), + .checkFilePathAvailabilityWithResponse("lblfxlupibaqzizx", + new FilePathAvailabilityRequest().withName("pzweghlwwbo") + .withSubnetId("vgfklqiyndveqe") + .withAvailabilityZone("b"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.isAvailable()); + Assertions.assertTrue(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("wwhnhjtfvpn", response.message()); + Assertions.assertEquals("kzx", 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 92df5af407d8..0994045e4413 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 @@ -23,7 +23,7 @@ public final class NetAppResourcesCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"nvsbc\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"ldxonckb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkNameAvailabilityWithResponse("yqwixvcpwnkwywzw", - new ResourceNameAvailabilityRequest().withName("falickduoiqtamty") + .checkNameAvailabilityWithResponse("tpjfojiunrlshxuk", + new ResourceNameAvailabilityRequest().withName("sykdtoi") .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) - .withResourceGroup("kn"), + .withResourceGroup("ancdrc"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("nvsbc", response.message()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); + Assertions.assertEquals("ldxonckb", 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 f36dda8eb0a5..13ef210fdde8 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 @@ -23,7 +23,7 @@ public final class NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests { @Test public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"lraymezxlskih\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"xolousdv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("pmil", - new QuotaAvailabilityRequest().withName("pnwy") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) - .withResourceGroup("dqllzsauzpjlxeeh"), + .checkQuotaAvailabilityWithResponse("gtznsvlrdsmovp", + new QuotaAvailabilityRequest().withName("myndnox") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) + .withResourceGroup("nrqa"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("lraymezxlskih", response.message()); + Assertions.assertTrue(response.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); + Assertions.assertEquals("xolousdv", 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 64198ed6af70..4d0dbcbf5b97 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 @@ -23,7 +23,7 @@ public final class NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests { @Test public void testQueryNetworkSiblingSetWithResponse() throws Exception { String responseStr - = "{\"networkSiblingSetId\":\"wjtq\",\"subnetId\":\"evmylt\",\"networkSiblingSetStateId\":\"rspxklur\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"n\",\"volumeResourceIds\":[\"t\",\"posew\"]},{\"ipAddress\":\"gpxvkqmaupxvpi\",\"volumeResourceIds\":[\"aifyzyzeyuubeids\"]},{\"ipAddress\":\"fytoi\",\"volumeResourceIds\":[\"ygvfltgvdihoyn\",\"rxwe\",\"wkd\",\"cy\"]},{\"ipAddress\":\"cpcunnuzdqum\",\"volumeResourceIds\":[\"odnaienhqhskndn\"]}]}"; + = "{\"networkSiblingSetId\":\"urbti\",\"subnetId\":\"pdyarikeejdpd\",\"networkSiblingSetStateId\":\"twmmkfqbriqu\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"qkvyhzokpoyuohu\",\"volumeResourceIds\":[\"na\",\"jphmpoejnglpws\"]},{\"ipAddress\":\"axj\",\"volumeResourceIds\":[\"xpez\",\"oio\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,15 @@ public void testQueryNetworkSiblingSetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSiblingSet response = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("dyimsfay", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("rpravkjogeslab") - .withSubnetId("smjkwynqxaekqsy"), + .queryNetworkSiblingSetWithResponse("ulgyctsdbtqgku", + new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("dsooxr").withSubnetId("w"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wjtq", response.networkSiblingSetId()); - Assertions.assertEquals("evmylt", response.subnetId()); - Assertions.assertEquals("rspxklur", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); - Assertions.assertEquals("t", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("urbti", response.networkSiblingSetId()); + Assertions.assertEquals("pdyarikeejdpd", response.subnetId()); + Assertions.assertEquals("twmmkfqbriqu", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); + Assertions.assertEquals("na", 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 f372063f1661..4b92ea909366 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 @@ -22,7 +22,7 @@ public final class NetAppResourcesQueryRegionInfoWithResponseMockTests { @Test public void testQueryRegionInfoWithResponse() throws Exception { String responseStr - = "{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"htuwgmev\",\"isAvailable\":true},{\"availabilityZone\":\"wzyif\",\"isAvailable\":true},{\"availabilityZone\":\"ltxeqip\",\"isAvailable\":false}]}"; + = "{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"zjdrp\",\"isAvailable\":false}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testQueryRegionInfoWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RegionInfo response = manager.netAppResources() - .queryRegionInfoWithResponse("xrfdsajre", com.azure.core.util.Context.NONE) - .getValue(); + RegionInfo response + = manager.netAppResources().queryRegionInfoWithResponse("g", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("htuwgmev", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T2AND_ACROSS_T2, response.storageToNetworkProximity()); + Assertions.assertEquals("zjdrp", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertFalse(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 ee466b3d6906..dfc24cb9908d 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 @@ -23,7 +23,7 @@ public final class NetAppResourcesUpdateNetworkSiblingSetMockTests { @Test public void testUpdateNetworkSiblingSet() throws Exception { String responseStr - = "{\"networkSiblingSetId\":\"tv\",\"subnetId\":\"sdtcjbctvivuzqym\",\"networkSiblingSetStateId\":\"owog\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"vbrzcdb\",\"volumeResourceIds\":[\"zndscxmxeatkdbmw\",\"rdjyibqb\",\"aomhjrmkuhmaxl\",\"alfihcjmobcancd\"]}]}"; + = "{\"networkSiblingSetId\":\"xzuisamona\",\"subnetId\":\"izexroqsqj\",\"networkSiblingSetStateId\":\"rmthsplwst\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Failed\",\"nicInfoList\":[{\"ipAddress\":\"paniceo\",\"volumeResourceIds\":[\"zwhsxyrujmt\",\"kesliky\",\"hzixyqhfnkvy\",\"qqqdseipnquwz\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,17 @@ public void testUpdateNetworkSiblingSet() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSiblingSet response = manager.netAppResources() - .updateNetworkSiblingSet("lqkaadlknwf", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("anniyopetxivcnr") - .withSubnetId("yxnu") - .withNetworkSiblingSetStateId("aephblkw") - .withNetworkFeatures(NetworkFeatures.BASIC), + .updateNetworkSiblingSet("jrmfqzwqd", + new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("xkeedcnwmy") + .withSubnetId("xfqzkvemyzd") + .withNetworkSiblingSetStateId("czaqpqifdbmpt") + .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD), com.azure.core.util.Context.NONE); - Assertions.assertEquals("tv", response.networkSiblingSetId()); - Assertions.assertEquals("sdtcjbctvivuzqym", response.subnetId()); - Assertions.assertEquals("owog", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); - Assertions.assertEquals("zndscxmxeatkdbmw", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("xzuisamona", response.networkSiblingSetId()); + Assertions.assertEquals("izexroqsqj", response.subnetId()); + Assertions.assertEquals("rmthsplwst", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); + Assertions.assertEquals("zwhsxyrujmt", 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 2786dce4a1ea..8142ff82c9d2 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 @@ -13,12 +13,12 @@ public final class NetworkSiblingSetInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSiblingSetInner model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"yjathwtzo\",\"subnetId\":\"a\",\"networkSiblingSetStateId\":\"wm\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"cjpahl\",\"volumeResourceIds\":[\"a\",\"f\"]},{\"ipAddress\":\"nmwmqtibx\",\"volumeResourceIds\":[\"ddtvqctt\",\"dija\"]}]}") + "{\"networkSiblingSetId\":\"djfbocyv\",\"subnetId\":\"ulrtywikdmh\",\"networkSiblingSetStateId\":\"kuflgbh\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Failed\",\"nicInfoList\":[{\"ipAddress\":\"mxu\",\"volumeResourceIds\":[\"ryjqgdkf\",\"ozo\",\"oqbvjhvefgwbmqj\"]},{\"ipAddress\":\"ntasfaymxbu\",\"volumeResourceIds\":[\"ealbmqkyo\",\"wyvf\",\"mbtsuahxsg\"]},{\"ipAddress\":\"cmmzrrs\",\"volumeResourceIds\":[\"i\",\"sd\"]},{\"ipAddress\":\"pxqwo\",\"volumeResourceIds\":[\"fjxcjrmmuabwibv\",\"ogjo\",\"mcyefoyzbam\",\"in\"]}]}") .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("yjathwtzo", model.networkSiblingSetId()); - Assertions.assertEquals("a", model.subnetId()); - Assertions.assertEquals("wm", model.networkSiblingSetStateId()); + Assertions.assertEquals("djfbocyv", model.networkSiblingSetId()); + Assertions.assertEquals("ulrtywikdmh", model.subnetId()); + Assertions.assertEquals("kuflgbh", model.networkSiblingSetStateId()); Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - Assertions.assertEquals("a", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("ryjqgdkf", 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 ab510ca996ca..4ff2b7b7e3ec 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,8 +12,8 @@ public final class NicInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NicInfo model - = BinaryData.fromString("{\"ipAddress\":\"kmr\",\"volumeResourceIds\":[\"ekpndzaapmudq\",\"eqw\"]}") + = BinaryData.fromString("{\"ipAddress\":\"fvfkak\",\"volumeResourceIds\":[\"dt\",\"evboclzhzjknyuxg\"]}") .toObject(NicInfo.class); - Assertions.assertEquals("ekpndzaapmudq", model.volumeResourceIds().get(0)); + Assertions.assertEquals("dt", 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 7db0dddffd49..79fb5d4ffc7e 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 @@ -23,7 +23,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"izbfhfovvacq\",\"display\":{\"provider\":\"uodxesza\",\"resource\":\"elawumu\",\"operation\":\"lzkwrrwoy\",\"description\":\"ucwyhahno\"},\"origin\":\"rkywuhpsvfuu\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"xxwla\",\"displayName\":\"iexzsrzpge\",\"displayDescription\":\"tybbwwpgda\",\"unit\":\"hzyvlixqnrkcx\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"mysu\",\"swqrntvlwijp\",\"ttexoqqpwcyyufmh\",\"uncuw\"],\"internalMetricName\":\"spkcdqzh\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"dunqnd\",\"sourceMdmNamespace\":\"pchrqbn\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"gegydcwboxjum\",\"fillGapWithZero\":false,\"category\":\"lihrraiouaubr\",\"resourceIdDimensionNameOverride\":\"loqxfuojrngif\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"ccbiuimzdlyjdfq\",\"displayName\":\"kyoqufdv\"},{\"name\":\"zslzojhp\",\"displayName\":\"fnmdxotn\"}]}}}]}"; + = "{\"value\":[{\"name\":\"uabzoghkt\",\"display\":{\"provider\":\"czhcoeocnh\",\"resource\":\"rottjzcfyjzptw\",\"operation\":\"ohapqinfsz\",\"description\":\"glqdhm\"},\"origin\":\"zralcxpjbyyps\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"nkyhf\",\"displayName\":\"vsqxfxjelgcmpzqj\",\"displayDescription\":\"hqxu\",\"unit\":\"vcacoyv\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"sjsz\",\"bscm\",\"lzijiufehgmvflnw\"],\"internalMetricName\":\"qkxrerl\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"yl\",\"sourceMdmNamespace\":\"wxzut\",\"dimensions\":[{},{},{}],\"aggregationType\":\"whghmup\",\"fillGapWithZero\":true,\"category\":\"tcdxabbujftaben\",\"resourceIdDimensionNameOverride\":\"klqpx\",\"isInternal\":false},{\"name\":\"feddwwnlza\",\"displayName\":\"xud\",\"displayDescription\":\"hgookrtalvnbwgpb\",\"unit\":\"eluclvdjj\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"odxahhxhqf\"],\"internalMetricName\":\"nvzoqgyipemch\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"czuejdtxptl\",\"sourceMdmNamespace\":\"wzhomewjjstl\",\"dimensions\":[{},{}],\"aggregationType\":\"awmo\",\"fillGapWithZero\":false,\"category\":\"cz\",\"resourceIdDimensionNameOverride\":\"odrrslblxyd\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"bxiwkgfbqljn\",\"displayName\":\"hychocokuleh\"},{\"name\":\"qlrqffaweyurk\",\"displayName\":\"y\"},{\"name\":\"xra\",\"displayName\":\"uqd\"},{\"name\":\"xmrgchbapxkiy\",\"displayName\":\"j\"}]}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,19 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("izbfhfovvacq", response.iterator().next().name()); - Assertions.assertEquals("uodxesza", response.iterator().next().display().provider()); - Assertions.assertEquals("elawumu", response.iterator().next().display().resource()); - Assertions.assertEquals("lzkwrrwoy", response.iterator().next().display().operation()); - Assertions.assertEquals("ucwyhahno", response.iterator().next().display().description()); - Assertions.assertEquals("rkywuhpsvfuu", response.iterator().next().origin()); - Assertions.assertEquals("xxwla", + Assertions.assertEquals("uabzoghkt", response.iterator().next().name()); + Assertions.assertEquals("czhcoeocnh", response.iterator().next().display().provider()); + Assertions.assertEquals("rottjzcfyjzptw", response.iterator().next().display().resource()); + Assertions.assertEquals("ohapqinfsz", response.iterator().next().display().operation()); + Assertions.assertEquals("glqdhm", response.iterator().next().display().description()); + Assertions.assertEquals("zralcxpjbyyps", response.iterator().next().origin()); + Assertions.assertEquals("nkyhf", response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("iexzsrzpge", + Assertions.assertEquals("vsqxfxjelgcmpzqj", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("tybbwwpgda", + Assertions.assertEquals("hqxu", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("hzyvlixqnrkcx", + Assertions.assertEquals("vcacoyv", response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); Assertions.assertEquals(MetricAggregationType.AVERAGE, response.iterator() @@ -56,7 +56,7 @@ public void testList() throws Exception { .get(0) .supportedAggregationTypes() .get(0)); - Assertions.assertEquals("mysu", + Assertions.assertEquals("sjsz", response.iterator() .next() .serviceSpecification() @@ -64,21 +64,21 @@ public void testList() throws Exception { .get(0) .supportedTimeGrainTypes() .get(0)); - Assertions.assertEquals("spkcdqzh", + Assertions.assertEquals("qkxrerl", response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); Assertions.assertFalse( response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("dunqnd", + Assertions.assertEquals("yl", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("pchrqbn", + Assertions.assertEquals("wxzut", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("gegydcwboxjum", + Assertions.assertEquals("whghmup", response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertFalse( + Assertions.assertTrue( response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("lihrraiouaubr", + Assertions.assertEquals("tcdxabbujftaben", response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("loqxfuojrngif", + Assertions.assertEquals("klqpx", response.iterator() .next() .serviceSpecification() @@ -87,9 +87,9 @@ public void testList() throws Exception { .resourceIdDimensionNameOverride()); Assertions .assertFalse(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("ccbiuimzdlyjdfq", + Assertions.assertEquals("bxiwkgfbqljn", response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("kyoqufdv", + Assertions.assertEquals("hychocokuleh", response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); } } 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 f1221a945a13..a260374b9fc2 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,24 +13,24 @@ public final class PoolPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolPatchProperties model = BinaryData.fromString( - "{\"size\":7808085382692454438,\"qosType\":\"Manual\",\"coolAccess\":true,\"customThroughputMibps\":2084317491}") + "{\"size\":5471317492687247558,\"qosType\":\"Manual\",\"coolAccess\":false,\"customThroughputMibps\":629645371}") .toObject(PoolPatchProperties.class); - Assertions.assertEquals(7808085382692454438L, model.size()); + Assertions.assertEquals(5471317492687247558L, model.size()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(2084317491, model.customThroughputMibps()); + Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(629645371, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolPatchProperties model = new PoolPatchProperties().withSize(7808085382692454438L) + PoolPatchProperties model = new PoolPatchProperties().withSize(5471317492687247558L) .withQosType(QosType.MANUAL) - .withCoolAccess(true) - .withCustomThroughputMibps(2084317491); + .withCoolAccess(false) + .withCustomThroughputMibps(629645371); model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(7808085382692454438L, model.size()); + Assertions.assertEquals(5471317492687247558L, model.size()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(2084317491, model.customThroughputMibps()); + Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals(629645371, model.customThroughputMibps()); } } 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 378dccf92ad4..2a31fb54419f 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,30 +15,30 @@ public final class PoolPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolProperties model = BinaryData.fromString( - "{\"poolId\":\"flbqvgaq\",\"size\":3812707577517120566,\"serviceLevel\":\"Premium\",\"provisioningState\":\"cqusr\",\"totalThroughputMibps\":65.674644,\"utilizedThroughputMibps\":81.41901,\"customThroughputMibps\":999562740,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"}") + "{\"poolId\":\"kvci\",\"size\":9199588347838706768,\"serviceLevel\":\"Premium\",\"provisioningState\":\"a\",\"totalThroughputMibps\":12.081653,\"utilizedThroughputMibps\":37.256683,\"customThroughputMibps\":2101312168,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"}") .toObject(PoolProperties.class); - Assertions.assertEquals(3812707577517120566L, model.size()); + Assertions.assertEquals(9199588347838706768L, model.size()); Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(999562740, model.customThroughputMibps()); + Assertions.assertEquals(2101312168, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); + Assertions.assertFalse(model.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(3812707577517120566L) + PoolProperties model = new PoolProperties().withSize(9199588347838706768L) .withServiceLevel(ServiceLevel.PREMIUM) - .withCustomThroughputMibps(999562740) + .withCustomThroughputMibps(2101312168) .withQosType(QosType.MANUAL) - .withCoolAccess(true) + .withCoolAccess(false) .withEncryptionType(EncryptionType.SINGLE); model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(3812707577517120566L, model.size()); + Assertions.assertEquals(9199588347838706768L, model.size()); Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(999562740, model.customThroughputMibps()); + Assertions.assertEquals(2101312168, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertTrue(model.coolAccess()); + Assertions.assertFalse(model.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, 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 41f1bebd53ef..3a49a9c71cca 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 @@ -26,7 +26,7 @@ public final class PoolsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"poolId\":\"wphvxz\",\"size\":2530645843774941492,\"serviceLevel\":\"Premium\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":66.41798,\"utilizedThroughputMibps\":88.98344,\"customThroughputMibps\":593833942,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"xhxknlc\",\"location\":\"mmkyu\",\"tags\":{\"kakfqfr\":\"ubyqj\",\"il\":\"em\",\"djkpdxph\":\"udxjascowv\"},\"id\":\"kk\",\"name\":\"nmgzvyfijdkzuqnw\",\"type\":\"it\"}"; + = "{\"properties\":{\"poolId\":\"o\",\"size\":8071229481274885991,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":73.394104,\"utilizedThroughputMibps\":3.2387316,\"customThroughputMibps\":1331358631,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"c\",\"location\":\"tfshksnyzm\",\"tags\":{\"iqdktwtkvih\":\"mwbwmbnlslce\",\"nguuzhwvla\":\"pfliwo\",\"mhjhaus\":\"p\",\"ekymffztsilscvqs\":\"b\"},\"id\":\"eiihfymko\",\"name\":\"ihyeseu\",\"type\":\"gcigzh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,26 +36,26 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapacityPool response = manager.pools() - .define("mairrh") - .withRegion("xsjybvitvqk") - .withExistingNetAppAccount("cbevxrhyzdfw", "sofpltd") - .withSize(3421648573758455622L) - .withServiceLevel(ServiceLevel.ULTRA) - .withTags(mapOf("nkf", "znumtggmuwdchoz")) - .withCustomThroughputMibps(792662912) + .define("ukz") + .withRegion("nbmxlx") + .withExistingNetAppAccount("fogxhcxnw", "tpfdzxcouzfwofwa") + .withSize(620879348129715569L) + .withServiceLevel(ServiceLevel.STANDARD_ZRS) + .withTags(mapOf("cahfsgbjmlreesr", "ygeqzusito", "lisolntfxxc", "wsszvlc")) + .withCustomThroughputMibps(1835090723) .withQosType(QosType.MANUAL) - .withCoolAccess(true) + .withCoolAccess(false) .withEncryptionType(EncryptionType.SINGLE) .create(); - Assertions.assertEquals("mmkyu", response.location()); - Assertions.assertEquals("ubyqj", response.tags().get("kakfqfr")); - Assertions.assertEquals(2530645843774941492L, response.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, response.serviceLevel()); - Assertions.assertEquals(593833942, response.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, response.qosType()); - Assertions.assertTrue(response.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, response.encryptionType()); + Assertions.assertEquals("tfshksnyzm", response.location()); + Assertions.assertEquals("mwbwmbnlslce", response.tags().get("iqdktwtkvih")); + Assertions.assertEquals(8071229481274885991L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); + Assertions.assertEquals(1331358631, response.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, response.qosType()); + Assertions.assertFalse(response.coolAccess()); + 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 bd28645ce554..9b872dff5a6a 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 @@ -24,7 +24,7 @@ public final class PoolsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"poolId\":\"oqmavnwqjwgo\",\"size\":4403586247880198279,\"serviceLevel\":\"Premium\",\"provisioningState\":\"jj\",\"totalThroughputMibps\":52.29952,\"utilizedThroughputMibps\":14.734721,\"customThroughputMibps\":2138243626,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"nsvk\",\"location\":\"kjtjknsx\",\"tags\":{\"fbpkuw\":\"shcdpkupnqrmg\"},\"id\":\"eoiojfizfavkjzw\",\"name\":\"bcyaykmmfzs\",\"type\":\"fwxrzxmdew\"}"; + = "{\"properties\":{\"poolId\":\"wp\",\"size\":7512439687114953197,\"serviceLevel\":\"Premium\",\"provisioningState\":\"doejtighsxjpyt\",\"totalThroughputMibps\":89.21339,\"utilizedThroughputMibps\":74.41519,\"customThroughputMibps\":1624416011,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"h\",\"location\":\"hjnhjiot\",\"tags\":{\"cypxbbfetw\":\"bbcngkeg\",\"oxpdxq\":\"lyr\",\"wnk\":\"frolq\",\"jew\":\"u\"},\"id\":\"ahwkxjjm\",\"name\":\"tnlmsoodtmvecdhd\",\"type\":\"swcrptveaj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,15 +34,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapacityPool response = manager.pools() - .getWithResponse("excgjokjljnhvl", "jbekpeeksnbksdq", "jvyklxeslkhhust", com.azure.core.util.Context.NONE) + .getWithResponse("pqcckqiawzlz", "laslgacizux", "r", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kjtjknsx", response.location()); - Assertions.assertEquals("shcdpkupnqrmg", response.tags().get("fbpkuw")); - Assertions.assertEquals(4403586247880198279L, response.size()); + Assertions.assertEquals("hjnhjiot", response.location()); + Assertions.assertEquals("bbcngkeg", response.tags().get("cypxbbfetw")); + Assertions.assertEquals(7512439687114953197L, response.size()); Assertions.assertEquals(ServiceLevel.PREMIUM, response.serviceLevel()); - Assertions.assertEquals(2138243626, response.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); + Assertions.assertEquals(1624416011, response.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, response.qosType()); Assertions.assertTrue(response.coolAccess()); 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 fb49032a959e..bc7f93ab82ea 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 @@ -25,7 +25,7 @@ public final class PoolsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"poolId\":\"yoyp\",\"size\":2914048506807654049,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"nnhj\",\"totalThroughputMibps\":99.014145,\"utilizedThroughputMibps\":76.2523,\"customThroughputMibps\":1615280383,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"ozycy\",\"location\":\"qyhgf\",\"tags\":{\"sfledyn\":\"zlex\",\"fbzkk\":\"jpziu\"},\"id\":\"tnhqsycl\",\"name\":\"selpkpbaf\",\"type\":\"afhlbyl\"}]}"; + = "{\"value\":[{\"properties\":{\"poolId\":\"uqhrlmcskykp\",\"size\":974985627504326928,\"serviceLevel\":\"Standard\",\"provisioningState\":\"xcn\",\"totalThroughputMibps\":95.44534,\"utilizedThroughputMibps\":50.744553,\"customThroughputMibps\":2119515808,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"pjprdpwr\",\"location\":\"fpcfjf\",\"tags\":{\"yep\":\"gzawk\",\"xkzrn\":\"yamnnidmdiawp\",\"gwqpsqazih\":\"mkctdhuo\",\"ztibniyntsxjmfm\":\"odvqgcnbhcbmj\"},\"id\":\"ftvhkmoogj\",\"name\":\"hskb\",\"type\":\"gmjgrul\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,15 +35,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.pools().list("rsxkr", "lbjazejww", com.azure.core.util.Context.NONE); + = manager.pools().list("zxvlgsrgkrfizrp", "wlp", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qyhgf", response.iterator().next().location()); - Assertions.assertEquals("zlex", response.iterator().next().tags().get("sfledyn")); - Assertions.assertEquals(2914048506807654049L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); - Assertions.assertEquals(1615280383, response.iterator().next().customThroughputMibps()); + Assertions.assertEquals("fpcfjf", response.iterator().next().location()); + Assertions.assertEquals("gzawk", response.iterator().next().tags().get("yep")); + Assertions.assertEquals(974985627504326928L, response.iterator().next().size()); + Assertions.assertEquals(ServiceLevel.STANDARD, response.iterator().next().serviceLevel()); + Assertions.assertEquals(2119515808, response.iterator().next().customThroughputMibps()); Assertions.assertEquals(QosType.AUTO, response.iterator().next().qosType()); - Assertions.assertFalse(response.iterator().next().coolAccess()); + Assertions.assertTrue(response.iterator().next().coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, 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 8af96c06e7a5..2f11070fde38 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\":\"sylwxdzaumweooh\",\"subnetId\":\"uufuz\"}") + = BinaryData.fromString("{\"networkSiblingSetId\":\"y\",\"subnetId\":\"es\"}") .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("sylwxdzaumweooh", model.networkSiblingSetId()); - Assertions.assertEquals("uufuz", model.subnetId()); + Assertions.assertEquals("y", model.networkSiblingSetId()); + Assertions.assertEquals("es", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("sylwxdzaumweooh").withSubnetId("uufuz"); + = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("y").withSubnetId("es"); model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("sylwxdzaumweooh", model.networkSiblingSetId()); - Assertions.assertEquals("uufuz", model.subnetId()); + Assertions.assertEquals("y", model.networkSiblingSetId()); + Assertions.assertEquals("es", model.subnetId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java index 66db7b715239..1e33b6772d96 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java @@ -12,23 +12,24 @@ public final class QuotaAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuotaAvailabilityRequest model = BinaryData - .fromString( - "{\"name\":\"opteecj\",\"type\":\"Microsoft.NetApp/netAppAccounts\",\"resourceGroup\":\"islstv\"}") + QuotaAvailabilityRequest model = BinaryData.fromString( + "{\"name\":\"cxtczhupeukn\",\"type\":\"Microsoft.NetApp/netAppAccounts/backupVaults/backups\",\"resourceGroup\":\"d\"}") .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("opteecj", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); - Assertions.assertEquals("islstv", model.resourceGroup()); + Assertions.assertEquals("cxtczhupeukn", model.name()); + Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS, + model.type()); + Assertions.assertEquals("d", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("opteecj") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("islstv"); + QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("cxtczhupeukn") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS) + .withResourceGroup("d"); model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("opteecj", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); - Assertions.assertEquals("islstv", model.resourceGroup()); + Assertions.assertEquals("cxtczhupeukn", model.name()); + Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS, + model.type()); + Assertions.assertEquals("d", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java index c730535a0a5f..9fdfaf213916 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.java @@ -20,7 +20,7 @@ public final class RansomwareReportsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"eventTime\":\"2020-12-21T22:06:42Z\",\"state\":\"Resolved\",\"severity\":\"None\",\"clearedCount\":303307328,\"reportedCount\":1541422170,\"suspects\":[{\"extension\":\"xzujksrlsm\",\"resolution\":\"FalsePositive\",\"fileCount\":1111002496,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"mjc\"},\"id\":\"ewbidyvteowxv\",\"name\":\"piudeugfsxzecpa\",\"type\":\"wkufykhvuhxepm\"}"; + = "{\"properties\":{\"eventTime\":\"2021-09-06T02:38:41Z\",\"state\":\"Resolved\",\"severity\":\"Low\",\"clearedCount\":468777733,\"reportedCount\":1623615828,\"suspects\":[{\"extension\":\"jxeiy\",\"resolution\":\"PotentialThreat\",\"fileCount\":216127976,\"suspectFiles\":[{},{}]},{\"extension\":\"exh\",\"resolution\":\"FalsePositive\",\"fileCount\":1400683190,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"kbrup\",\"resolution\":\"FalsePositive\",\"fileCount\":1391296754,\"suspectFiles\":[{}]}],\"provisioningState\":\"zacvu\"},\"id\":\"pjpbibnzpp\",\"name\":\"epifexleqirccjc\",\"type\":\"ykcgxvrpjlvcz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RansomwareReport response = manager.ransomwareReports() - .getWithResponse("tmhdroznnhdr", "ktgj", "sggux", "eml", "ywaeeczgf", com.azure.core.util.Context.NONE) + .getWithResponse("slojfkqidnqt", "qxjhqxcsqhtkbtnq", "rngl", "mbiipsnawwlqk", "nxhhl", + com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java index b11eb5963aff..a55ea4e49775 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.java @@ -21,7 +21,7 @@ public final class RansomwareReportsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-08-13T22:15:03Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":1510283924,\"reportedCount\":115970163,\"suspects\":[{\"extension\":\"flrmymyi\",\"resolution\":\"PotentialThreat\",\"fileCount\":521943782,\"suspectFiles\":[{}]},{\"extension\":\"wslmiiiovgqcg\",\"resolution\":\"FalsePositive\",\"fileCount\":1331750565,\"suspectFiles\":[{},{},{}]},{\"extension\":\"otiowlxteqd\",\"resolution\":\"FalsePositive\",\"fileCount\":857680137,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"ukranblw\",\"resolution\":\"FalsePositive\",\"fileCount\":1668357779,\"suspectFiles\":[{}]}],\"provisioningState\":\"zgygqwahoiulwgni\"},\"id\":\"rglvaw\",\"name\":\"wzdufypivlsbb\",\"type\":\"pmcubkmifoxxkub\"}]}"; + = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-03-25T11:59:34Z\",\"state\":\"Active\",\"severity\":\"Low\",\"clearedCount\":665890978,\"reportedCount\":72207954,\"suspects\":[{\"extension\":\"jts\",\"resolution\":\"FalsePositive\",\"fileCount\":120239759,\"suspectFiles\":[{}]},{\"extension\":\"zarpzeqacdldt\",\"resolution\":\"FalsePositive\",\"fileCount\":1809146245,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"pc\"},\"id\":\"hnuqndaizu\",\"name\":\"fkhuytu\",\"type\":\"zx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.ransomwareReports() - .list("utznabaobns", "ujdjltymkmvg", "ihywartspph", "ixkykxd", com.azure.core.util.Context.NONE); + .list("odacpunettepdjxq", "skoynuiylpc", "aewse", "vesk", com.azure.core.util.Context.NONE); } } 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 72c1ed9d88d7..2a3d39d37244 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,9 +12,9 @@ public final class RegionInfoAvailabilityZoneMappingsItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoAvailabilityZoneMappingsItem model - = BinaryData.fromString("{\"availabilityZone\":\"mdy\",\"isAvailable\":false}") + = BinaryData.fromString("{\"availabilityZone\":\"iqakydiwfbr\",\"isAvailable\":true}") .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("mdy", model.availabilityZone()); - Assertions.assertFalse(model.isAvailable()); + Assertions.assertEquals("iqakydiwfbr", model.availabilityZone()); + Assertions.assertTrue(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 d46cc6ff3cf8..3554d4062917 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 @@ -13,11 +13,11 @@ public final class RegionInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"awfvjlboxqvkjl\",\"isAvailable\":false}]}") + "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"lmbkzu\",\"isAvailable\":true},{\"availabilityZone\":\"rfih\",\"isAvailable\":true},{\"availabilityZone\":\"wlpxuzzjg\",\"isAvailable\":true},{\"availabilityZone\":\"qyhqo\",\"isAvailable\":true}]}") .toObject(RegionInfoInner.class); Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("awfvjlboxqvkjl", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertFalse(model.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals("lmbkzu", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertTrue(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 index e2e8260d9309..c92c0fc4cf19 100644 --- 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 @@ -13,10 +13,10 @@ public final class RegionInfoResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"zdmovzv\",\"isAvailable\":true},{\"availabilityZone\":\"wzqa\",\"isAvailable\":false},{\"availabilityZone\":\"z\",\"isAvailable\":false},{\"availabilityZone\":\"laecxndticok\",\"isAvailable\":true}]},\"id\":\"lqtmldgxob\",\"name\":\"irclnpk\",\"type\":\"iayz\"}") + "{\"properties\":{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"hhmemhooclutnp\",\"isAvailable\":false}]},\"id\":\"czj\",\"name\":\"mmyky\",\"type\":\"jxsglhsr\"}") .toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("zdmovzv", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertTrue(model.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T2, model.storageToNetworkProximity()); + Assertions.assertEquals("hhmemhooclutnp", model.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertFalse(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 index b41d1f466b4a..bca550b25502 100644 --- 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 @@ -13,12 +13,11 @@ public final class RegionInfosListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfosList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"nraauzz\",\"isAvailable\":true},{\"availabilityZone\":\"zysdzh\",\"isAvailable\":true},{\"availabilityZone\":\"vaiqyuvvf\",\"isAvailable\":false}]},\"id\":\"hhqyi\",\"name\":\"vyl\",\"type\":\"uyav\"},{\"properties\":{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ttijfybvpoekrs\",\"isAvailable\":true},{\"availabilityZone\":\"dhuzqgnjdgk\",\"isAvailable\":false},{\"availabilityZone\":\"liqhzvhx\",\"isAvailable\":false},{\"availabilityZone\":\"tkubotppn\",\"isAvailable\":false}]},\"id\":\"xhihfrbbcevqagtl\",\"name\":\"dhlfkqojpykvgt\",\"type\":\"dcnifmz\"},{\"properties\":{\"storageToNetworkProximity\":\"T2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"nysuxmprafwgckh\",\"isAvailable\":false}]},\"id\":\"d\",\"name\":\"ffwafq\",\"type\":\"oudaspavehhrvk\"},{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"dhcxgkmoy\",\"isAvailable\":false},{\"availabilityZone\":\"uibhmfdnbzydvfv\",\"isAvailable\":false}]},\"id\":\"aeoisrvh\",\"name\":\"gorf\",\"type\":\"ukiscvwmzhw\"}],\"nextLink\":\"efaxvxilc\"}") + "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"spodaqax\",\"isAvailable\":false},{\"availabilityZone\":\"etgbebjfulb\",\"isAvailable\":false}]},\"id\":\"h\",\"name\":\"lpnfpubntnb\",\"type\":\"tzviqsowsaaelcat\"}],\"nextLink\":\"ju\"}") .toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("nraauzz", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertTrue(model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("efaxvxilc", model.nextLink()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T2, model.value().get(0).storageToNetworkProximity()); + Assertions.assertEquals("spodaqax", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertFalse(model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals("ju", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java index 91a33e6d5402..2ad665f824e0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java @@ -13,23 +13,23 @@ public final class ResourceNameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"wsldrizetpwbr\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\",\"resourceGroup\":\"llibphbqzmizak\"}") + "{\"name\":\"eukdqkkyih\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\",\"resourceGroup\":\"geqmgqzgwldoych\"}") .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("wsldrizetpwbr", model.name()); - Assertions.assertEquals(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES, - model.type()); - Assertions.assertEquals("llibphbqzmizak", model.resourceGroup()); + Assertions.assertEquals("eukdqkkyih", model.name()); + Assertions.assertEquals( + CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); + Assertions.assertEquals("geqmgqzgwldoych", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("wsldrizetpwbr") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) - .withResourceGroup("llibphbqzmizak"); + ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("eukdqkkyih") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS) + .withResourceGroup("geqmgqzgwldoych"); model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("wsldrizetpwbr", model.name()); - Assertions.assertEquals(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES, - model.type()); - Assertions.assertEquals("llibphbqzmizak", model.resourceGroup()); + Assertions.assertEquals("eukdqkkyih", model.name()); + Assertions.assertEquals( + CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); + Assertions.assertEquals("geqmgqzgwldoych", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java new file mode 100644 index 000000000000..37a8ae59f2fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.SecretPasswordIdentity; +import org.junit.jupiter.api.Assertions; + +public final class SecretPasswordIdentityTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SecretPasswordIdentity model + = BinaryData.fromString("{\"principalId\":\"mgbro\",\"userAssignedIdentity\":\"ddbhf\"}") + .toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("ddbhf", model.userAssignedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretPasswordIdentity model = new SecretPasswordIdentity().withUserAssignedIdentity("ddbhf"); + model = BinaryData.fromObject(model).toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("ddbhf", model.userAssignedIdentity()); + } +} 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 27faf66faf14..71050b88b11e 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 @@ -27,7 +27,7 @@ public final class SnapshotPoliciesCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1248753250,\"minute\":442073665,\"usedBytes\":6294969879899092359},\"dailySchedule\":{\"snapshotsToKeep\":652543826,\"hour\":29448951,\"minute\":516078825,\"usedBytes\":1726538896857815587},\"weeklySchedule\":{\"snapshotsToKeep\":1532018074,\"day\":\"zjcpeogk\",\"hour\":1113433595,\"minute\":1612723385,\"usedBytes\":7213187921154412641},\"monthlySchedule\":{\"snapshotsToKeep\":1363231330,\"daysOfMonth\":\"hfhpfp\",\"hour\":359970,\"minute\":1143411594,\"usedBytes\":1251813503563862724},\"enabled\":false,\"provisioningState\":\"dulontacn\"},\"etag\":\"w\",\"location\":\"htuevrhrljy\",\"tags\":{\"duugwbsre\":\"wxhn\",\"nlvhhtklnvnafvv\":\"rfqkfuar\",\"lcqxypokk\":\"yfedevjbo\",\"zng\":\"minqcym\"},\"id\":\"bdxxe\",\"name\":\"unin\",\"type\":\"udbchaqdtv\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1307416132,\"minute\":502016456,\"usedBytes\":2249768152395320200},\"dailySchedule\":{\"snapshotsToKeep\":1494940608,\"hour\":739569323,\"minute\":620372560,\"usedBytes\":2479410922633634980},\"weeklySchedule\":{\"snapshotsToKeep\":188437158,\"day\":\"cqchygtvxbyjane\",\"hour\":335583733,\"minute\":50999710,\"usedBytes\":4754103751291181786},\"monthlySchedule\":{\"snapshotsToKeep\":288031007,\"daysOfMonth\":\"i\",\"hour\":1008631704,\"minute\":787959181,\"usedBytes\":8769158516932053208},\"enabled\":true,\"provisioningState\":\"xuwsai\"},\"etag\":\"c\",\"location\":\"osbz\",\"tags\":{\"bcknjolgj\":\"gcv\"},\"id\":\"yxpvelszerqze\",\"name\":\"xoqeintxwalj\",\"type\":\"lzoblqwaafr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,51 +37,50 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .define("usqogsfikayia") - .withRegion("rxhtvso") - .withExistingNetAppAccount("sysidfvclglxnf", "ijtk") - .withTags( - mapOf("ruuuybnch", "wntsjgqrsxy", "qyggagfl", "szizoyuelyetndnb", "byrplrohkpig", "lgmtrwahzjmucf")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1168191195) - .withMinute(149373131) - .withUsedBytes(195909977127480530L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(650202313) - .withHour(1013895282) - .withMinute(9701584) - .withUsedBytes(8625465068511416962L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1177494573) - .withDay("qhjpenuygbqe") - .withHour(2014474860) - .withMinute(583877472) - .withUsedBytes(6823653244752792674L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(2041307623) - .withDaysOfMonth("lguaucm") - .withHour(1412442415) - .withMinute(1155433105) - .withUsedBytes(5670018716890506580L)) - .withEnabled(false) + .define("kxkxhnegk") + .withRegion("lbvgjc") + .withExistingNetAppAccount("xhmw", "dbckyo") + .withTags(mapOf("fqb", "kgjiiytssikizbc")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1800387551) + .withMinute(55296959) + .withUsedBytes(1946098635867179641L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1365496443) + .withHour(1602665053) + .withMinute(954240404) + .withUsedBytes(4133242532639521406L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(644011427) + .withDay("nbagnchj") + .withHour(6203641) + .withMinute(1680532748) + .withUsedBytes(7018289497090091145L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(502420669) + .withDaysOfMonth("lhjym") + .withHour(1348277844) + .withMinute(1550603008) + .withUsedBytes(1367412311842191581L)) + .withEnabled(true) .create(); - Assertions.assertEquals("htuevrhrljy", response.location()); - Assertions.assertEquals("wxhn", response.tags().get("duugwbsre")); - Assertions.assertEquals(1248753250, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(442073665, response.hourlySchedule().minute()); - Assertions.assertEquals(6294969879899092359L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(652543826, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(29448951, response.dailySchedule().hour()); - Assertions.assertEquals(516078825, response.dailySchedule().minute()); - Assertions.assertEquals(1726538896857815587L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(1532018074, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("zjcpeogk", response.weeklySchedule().day()); - Assertions.assertEquals(1113433595, response.weeklySchedule().hour()); - Assertions.assertEquals(1612723385, response.weeklySchedule().minute()); - Assertions.assertEquals(7213187921154412641L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1363231330, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("hfhpfp", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(359970, response.monthlySchedule().hour()); - Assertions.assertEquals(1143411594, response.monthlySchedule().minute()); - Assertions.assertEquals(1251813503563862724L, response.monthlySchedule().usedBytes()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("osbz", response.location()); + Assertions.assertEquals("gcv", response.tags().get("bcknjolgj")); + Assertions.assertEquals(1307416132, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(502016456, response.hourlySchedule().minute()); + Assertions.assertEquals(2249768152395320200L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(1494940608, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(739569323, response.dailySchedule().hour()); + Assertions.assertEquals(620372560, response.dailySchedule().minute()); + Assertions.assertEquals(2479410922633634980L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(188437158, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cqchygtvxbyjane", response.weeklySchedule().day()); + Assertions.assertEquals(335583733, response.weeklySchedule().hour()); + Assertions.assertEquals(50999710, response.weeklySchedule().minute()); + Assertions.assertEquals(4754103751291181786L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(288031007, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("i", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1008631704, response.monthlySchedule().hour()); + Assertions.assertEquals(787959181, response.monthlySchedule().minute()); + Assertions.assertEquals(8769158516932053208L, response.monthlySchedule().usedBytes()); + Assertions.assertTrue(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 547075a99c10..bd352e7648cd 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.snapshotPolicies().delete("aqehg", "dohzjq", "tu", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("owsocnequygdjbo", "grmtqjk", "evadrmmwiu", 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 23b7e2e5598a..b4a2d010ba72 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 @@ -21,7 +21,7 @@ public final class SnapshotPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":520956012,\"minute\":1575759341,\"usedBytes\":2616370626436727161},\"dailySchedule\":{\"snapshotsToKeep\":1835022726,\"hour\":1860426462,\"minute\":1259433506,\"usedBytes\":6649731725924828463},\"weeklySchedule\":{\"snapshotsToKeep\":1679596835,\"day\":\"fgf\",\"hour\":975113921,\"minute\":87564439,\"usedBytes\":4532159263217364403},\"monthlySchedule\":{\"snapshotsToKeep\":726955046,\"daysOfMonth\":\"ypococtfjgtixr\",\"hour\":868896591,\"minute\":97520193,\"usedBytes\":7262703039995760177},\"enabled\":false,\"provisioningState\":\"uowolbauiropi\"},\"etag\":\"szonwpngajinn\",\"location\":\"jawrtmjfjmyc\",\"tags\":{\"lusfnrdtjxtxrdcq\":\"zhcoxovnekhe\",\"uslvyjtcvuwkasi\":\"jvidttge\",\"tuqfecjxeygtu\":\"iesfuug\"},\"id\":\"xu\",\"name\":\"cbuewmrswnjlxuz\",\"type\":\"hwpusxj\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":989850966,\"minute\":764559146,\"usedBytes\":3106144557754641608},\"dailySchedule\":{\"snapshotsToKeep\":1809831138,\"hour\":600524229,\"minute\":898887355,\"usedBytes\":856204828754570877},\"weeklySchedule\":{\"snapshotsToKeep\":1281785865,\"day\":\"kadppyibngq\",\"hour\":26947233,\"minute\":79055053,\"usedBytes\":1875475596417761370},\"monthlySchedule\":{\"snapshotsToKeep\":1165370308,\"daysOfMonth\":\"luvvad\",\"hour\":584085416,\"minute\":303655572,\"usedBytes\":6174165917369038352},\"enabled\":true,\"provisioningState\":\"wuowhlxlnwy\"},\"etag\":\"ouvblgmo\",\"location\":\"kltrfow\",\"tags\":{\"dhftukvhdxlwy\":\"rfmvlihcvjdrqcrj\",\"njyixh\":\"jbfqzdk\",\"valqjrhuzgfxo\":\"fratqxmbjroumzz\"},\"id\":\"jtpusllywpvtiotz\",\"name\":\"pdbollg\",\"type\":\"yfqiuasig\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,28 +31,28 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .getWithResponse("juahokqto", "kauxof", "hfphwpnulaiywze", com.azure.core.util.Context.NONE) + .getWithResponse("klixqcahyhxaly", "xawoijpodtblxp", "kwjdjodqhy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jawrtmjfjmyc", response.location()); - Assertions.assertEquals("zhcoxovnekhe", response.tags().get("lusfnrdtjxtxrdcq")); - Assertions.assertEquals(520956012, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1575759341, response.hourlySchedule().minute()); - Assertions.assertEquals(2616370626436727161L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1835022726, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1860426462, response.dailySchedule().hour()); - Assertions.assertEquals(1259433506, response.dailySchedule().minute()); - Assertions.assertEquals(6649731725924828463L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(1679596835, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("fgf", response.weeklySchedule().day()); - Assertions.assertEquals(975113921, response.weeklySchedule().hour()); - Assertions.assertEquals(87564439, response.weeklySchedule().minute()); - Assertions.assertEquals(4532159263217364403L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(726955046, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("ypococtfjgtixr", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(868896591, response.monthlySchedule().hour()); - Assertions.assertEquals(97520193, response.monthlySchedule().minute()); - Assertions.assertEquals(7262703039995760177L, response.monthlySchedule().usedBytes()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("kltrfow", response.location()); + Assertions.assertEquals("rfmvlihcvjdrqcrj", response.tags().get("dhftukvhdxlwy")); + Assertions.assertEquals(989850966, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(764559146, response.hourlySchedule().minute()); + Assertions.assertEquals(3106144557754641608L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(1809831138, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(600524229, response.dailySchedule().hour()); + Assertions.assertEquals(898887355, response.dailySchedule().minute()); + Assertions.assertEquals(856204828754570877L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(1281785865, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("kadppyibngq", response.weeklySchedule().day()); + Assertions.assertEquals(26947233, response.weeklySchedule().hour()); + Assertions.assertEquals(79055053, response.weeklySchedule().minute()); + Assertions.assertEquals(1875475596417761370L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1165370308, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("luvvad", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(584085416, response.monthlySchedule().hour()); + Assertions.assertEquals(303655572, response.monthlySchedule().minute()); + Assertions.assertEquals(6174165917369038352L, response.monthlySchedule().usedBytes()); + Assertions.assertTrue(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 629ca4049c2b..a3a2d91d9181 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 @@ -22,7 +22,7 @@ public final class SnapshotPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":612007503,\"minute\":2085427407,\"usedBytes\":9158547227414632311},\"dailySchedule\":{\"snapshotsToKeep\":1145439736,\"hour\":657592284,\"minute\":1395211030,\"usedBytes\":418211033576127424},\"weeklySchedule\":{\"snapshotsToKeep\":1539697071,\"day\":\"lfgtdysnaquflqbc\",\"hour\":862236448,\"minute\":955415760,\"usedBytes\":7268222226283775871},\"monthlySchedule\":{\"snapshotsToKeep\":1644832574,\"daysOfMonth\":\"zeqyjleziun\",\"hour\":822376850,\"minute\":105350426,\"usedBytes\":8179356734367421794},\"enabled\":true,\"provisioningState\":\"eg\"},\"etag\":\"mlbnseq\",\"location\":\"jjvpilguooqja\",\"tags\":{\"hrtdtpdelq\":\"itgueiookjbs\"},\"id\":\"cslmotoebnfxo\",\"name\":\"vcjkgd\",\"type\":\"razftxejwabmdujt\"}]}"; + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1551206965,\"minute\":1049623274,\"usedBytes\":1558850688915356045},\"dailySchedule\":{\"snapshotsToKeep\":1585264538,\"hour\":1470824559,\"minute\":1202604969,\"usedBytes\":1218440597443022768},\"weeklySchedule\":{\"snapshotsToKeep\":996698069,\"day\":\"ppc\",\"hour\":1588619588,\"minute\":2061950840,\"usedBytes\":1281520358620814891},\"monthlySchedule\":{\"snapshotsToKeep\":861229573,\"daysOfMonth\":\"xyfukzxuizhyhn\",\"hour\":215122655,\"minute\":1942019203,\"usedBytes\":6858877587731651412},\"enabled\":true,\"provisioningState\":\"iubxdukec\"},\"etag\":\"dazvdhctm\",\"location\":\"os\",\"tags\":{\"ofkbtf\":\"blnsntrpcaqk\",\"ezyquw\":\"hklbnldpvcbh\",\"brruyuuatv\":\"sqxutr\"},\"id\":\"mbjwcolbmxlb\",\"name\":\"w\",\"type\":\"pcpahprzrvxhmtf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,27 +32,27 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.snapshotPolicies().list("o", "gebx", com.azure.core.util.Context.NONE); + = manager.snapshotPolicies().list("wvcmj", "kxiidisczskoswo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jjvpilguooqja", response.iterator().next().location()); - Assertions.assertEquals("itgueiookjbs", response.iterator().next().tags().get("hrtdtpdelq")); - Assertions.assertEquals(612007503, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(2085427407, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(9158547227414632311L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(1145439736, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(657592284, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(1395211030, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(418211033576127424L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(1539697071, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("lfgtdysnaquflqbc", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(862236448, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(955415760, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(7268222226283775871L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(1644832574, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("zeqyjleziun", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(822376850, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(105350426, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(8179356734367421794L, response.iterator().next().monthlySchedule().usedBytes()); + Assertions.assertEquals("os", response.iterator().next().location()); + Assertions.assertEquals("blnsntrpcaqk", response.iterator().next().tags().get("ofkbtf")); + Assertions.assertEquals(1551206965, response.iterator().next().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1049623274, response.iterator().next().hourlySchedule().minute()); + Assertions.assertEquals(1558850688915356045L, response.iterator().next().hourlySchedule().usedBytes()); + Assertions.assertEquals(1585264538, response.iterator().next().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1470824559, response.iterator().next().dailySchedule().hour()); + Assertions.assertEquals(1202604969, response.iterator().next().dailySchedule().minute()); + Assertions.assertEquals(1218440597443022768L, response.iterator().next().dailySchedule().usedBytes()); + Assertions.assertEquals(996698069, response.iterator().next().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("ppc", response.iterator().next().weeklySchedule().day()); + Assertions.assertEquals(1588619588, response.iterator().next().weeklySchedule().hour()); + Assertions.assertEquals(2061950840, response.iterator().next().weeklySchedule().minute()); + Assertions.assertEquals(1281520358620814891L, response.iterator().next().weeklySchedule().usedBytes()); + Assertions.assertEquals(861229573, response.iterator().next().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("xyfukzxuizhyhn", response.iterator().next().monthlySchedule().daysOfMonth()); + Assertions.assertEquals(215122655, response.iterator().next().monthlySchedule().hour()); + Assertions.assertEquals(1942019203, response.iterator().next().monthlySchedule().minute()); + Assertions.assertEquals(6858877587731651412L, response.iterator().next().monthlySchedule().usedBytes()); Assertions.assertTrue(response.iterator().next().enabled()); } } 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 1c4ddc2c27b3..04ffc5384c5c 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 @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .delete("ibuz", "hdugneiknpg", "xgjiuqh", "btozipqwje", "mur", com.azure.core.util.Context.NONE); + .delete("ygspnbonhpczykm", "tp", "wxqcsehchkhufmpq", "mqyjgy", "zulo", 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 20e5eebdb89d..d09c7b127b2d 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 @@ -21,7 +21,7 @@ public final class SnapshotsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"snapshotId\":\"ugswvx\",\"created\":\"2021-05-30T09:05:45Z\",\"provisioningState\":\"qwm\"},\"location\":\"tx\",\"id\":\"mxmcuqudtcvclxy\",\"name\":\"pdkvg\",\"type\":\"abuiy\"}"; + = "{\"properties\":{\"snapshotId\":\"mvqdbpbhfckdvez\",\"created\":\"2021-09-07T23:55:15Z\",\"provisioningState\":\"sbzhd\"},\"location\":\"ub\",\"id\":\"qfblhkalehpa\",\"name\":\"awugiqjti\",\"type\":\"gqgdminictteajoh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Snapshot response = manager.snapshots() - .getWithResponse("vsg", "wohqfzizvu", "mmkjsvthnwpztek", "vmribiat", "gplucfotangcfhny", + .getWithResponse("kvcuartrhunl", "iryky", "ndzfqivjreuyk", "bmnwa", "ltbxoeeonqlnfw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tx", response.location()); + Assertions.assertEquals("ub", 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 0bf76763e2da..35471c5424d3 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 @@ -22,7 +22,7 @@ public final class SnapshotsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"snapshotId\":\"ebqinjipnw\",\"created\":\"2021-10-22T02:54:53Z\",\"provisioningState\":\"qlafcbahhpzpofoi\"},\"location\":\"jwpfilkm\",\"id\":\"holvdn\",\"name\":\"viauogphua\",\"type\":\"tvt\"}]}"; + = "{\"value\":[{\"properties\":{\"snapshotId\":\"ruqnm\",\"created\":\"2021-01-17T11:03:49Z\",\"provisioningState\":\"zcvjytiqswbqerz\"},\"location\":\"xiytxtdgukvl\",\"id\":\"ktg\",\"name\":\"styoua\",\"type\":\"bewreswmowegmmut\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.snapshots().list("xxgewpk", "vqylkmqpzoyhl", "bcg", "gcl", com.azure.core.util.Context.NONE); + PagedIterable response = manager.snapshots() + .list("saeuzanhsfnhsenw", "hpzfngqj", "lidftujwjj", "fwbeqrkuorh", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jwpfilkm", response.iterator().next().location()); + Assertions.assertEquals("xiytxtdgukvl", response.iterator().next().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 afd098dc5ac4..a3d6f0552936 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 @@ -30,9 +30,9 @@ public void testRestoreFiles() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .restoreFiles("ukyefchnmnahmnxh", "xjqirwrweoox", "fifhxwrsnew", "ozqvbubqmam", "sycxhxzgaz", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("abo", "dvmfqhppub", "w")) - .withDestinationPath("pdfgkmtdherngbt"), + .restoreFiles("yxey", "uqi", "ijiitns", "xlzdesygrijwa", "ufanray", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("ueqfrojsyd", "rhydkygywez", "kiecafygzm")) + .withDestinationPath("eqvdsm"), com.azure.core.util.Context.NONE); } 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 0c3733875d96..edb5556caed5 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,21 @@ public final class SubvolumeInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"lxunsmjbnkppxy\",\"size\":8795706373981455807,\"parentPath\":\"vxei\",\"provisioningState\":\"gwklnsr\"},\"id\":\"feycxcktp\",\"name\":\"ymerteeammxq\",\"type\":\"ekkkzd\"}") + "{\"properties\":{\"path\":\"wqrjzfrg\",\"size\":1666719420079000960,\"parentPath\":\"cmbuocnjrohmbpy\",\"provisioningState\":\"xameblydyvkfkm\"},\"id\":\"cxneh\",\"name\":\"sm\",\"type\":\"odlfpyapucygvo\"}") .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("lxunsmjbnkppxy", model.path()); - Assertions.assertEquals(8795706373981455807L, model.size()); - Assertions.assertEquals("vxei", model.parentPath()); + Assertions.assertEquals("wqrjzfrg", model.path()); + Assertions.assertEquals(1666719420079000960L, model.size()); + Assertions.assertEquals("cmbuocnjrohmbpy", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("lxunsmjbnkppxy").withSize(8795706373981455807L).withParentPath("vxei"); + SubvolumeInfoInner model = new SubvolumeInfoInner().withPath("wqrjzfrg") + .withSize(1666719420079000960L) + .withParentPath("cmbuocnjrohmbpy"); model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("lxunsmjbnkppxy", model.path()); - Assertions.assertEquals(8795706373981455807L, model.size()); - Assertions.assertEquals("vxei", model.parentPath()); + Assertions.assertEquals("wqrjzfrg", model.path()); + Assertions.assertEquals(1666719420079000960L, model.size()); + Assertions.assertEquals("cmbuocnjrohmbpy", 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 1cd251f1746e..7e737e101bc7 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,17 +13,17 @@ public final class SubvolumeModelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelInner model = BinaryData.fromString( - "{\"id\":\"tmvpdvjdhtt\",\"name\":\"efedxihchrphkm\",\"type\":\"jdqnsdfzpbgt\",\"properties\":{\"path\":\"lkdghr\",\"parentPath\":\"uutlwxezwzhok\",\"size\":7624149688717867785,\"bytesUsed\":2062475772346184475,\"permissions\":\"lgehg\",\"creationTimeStamp\":\"2021-01-12T07:30:51Z\",\"accessedTimeStamp\":\"2021-01-18T15:46:05Z\",\"modifiedTimeStamp\":\"2021-04-06T03:44:21Z\",\"changedTimeStamp\":\"2021-01-02T20:54:57Z\",\"provisioningState\":\"oajvgcxtxjcs\"}}") + "{\"id\":\"hnqoewdo\",\"name\":\"yetesy\",\"type\":\"idbz\",\"properties\":{\"path\":\"qtfbovn\",\"parentPath\":\"kbwetnj\",\"size\":414149895474460575,\"bytesUsed\":481993562254393755,\"permissions\":\"yaupia\",\"creationTimeStamp\":\"2021-05-17T09:46:40Z\",\"accessedTimeStamp\":\"2021-05-25T16:57:05Z\",\"modifiedTimeStamp\":\"2021-06-06T10:39:05Z\",\"changedTimeStamp\":\"2021-04-15T00:07Z\",\"provisioningState\":\"oohtuovmaonurjtu\"}}") .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("lkdghr", model.path()); - Assertions.assertEquals("uutlwxezwzhok", model.parentPath()); - Assertions.assertEquals(7624149688717867785L, model.size()); - Assertions.assertEquals(2062475772346184475L, model.bytesUsed()); - Assertions.assertEquals("lgehg", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-12T07:30:51Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T15:46:05Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T03:44:21Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-02T20:54:57Z"), model.changedTimestamp()); - Assertions.assertEquals("oajvgcxtxjcs", model.provisioningState()); + Assertions.assertEquals("qtfbovn", model.path()); + Assertions.assertEquals("kbwetnj", model.parentPath()); + Assertions.assertEquals(414149895474460575L, model.size()); + Assertions.assertEquals(481993562254393755L, model.bytesUsed()); + Assertions.assertEquals("yaupia", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T09:46:40Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T16:57:05Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T10:39:05Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T00:07Z"), model.changedTimestamp()); + Assertions.assertEquals("oohtuovmaonurjtu", 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 b5dda4437351..030a8cead6be 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,17 +13,17 @@ public final class SubvolumeModelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeModelProperties model = BinaryData.fromString( - "{\"path\":\"afidltugsres\",\"parentPath\":\"ssjhoiftxfkf\",\"size\":3237549992054377980,\"bytesUsed\":3066280000737363730,\"permissions\":\"ill\",\"creationTimeStamp\":\"2021-11-03T16:35:02Z\",\"accessedTimeStamp\":\"2021-09-13T16:16:26Z\",\"modifiedTimeStamp\":\"2021-01-07T04:55:43Z\",\"changedTimeStamp\":\"2021-03-06T03:54:59Z\",\"provisioningState\":\"hm\"}") + "{\"path\":\"hihpvecmsl\",\"parentPath\":\"bl\",\"size\":4107932783596576706,\"bytesUsed\":1585961727789938930,\"permissions\":\"uscv\",\"creationTimeStamp\":\"2021-04-23T08:33:59Z\",\"accessedTimeStamp\":\"2021-11-05T21:32:10Z\",\"modifiedTimeStamp\":\"2021-07-21T09:04:04Z\",\"changedTimeStamp\":\"2021-01-10T07:14Z\",\"provisioningState\":\"upbezqccydrt\"}") .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("afidltugsres", model.path()); - Assertions.assertEquals("ssjhoiftxfkf", model.parentPath()); - Assertions.assertEquals(3237549992054377980L, model.size()); - Assertions.assertEquals(3066280000737363730L, model.bytesUsed()); - Assertions.assertEquals("ill", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T16:35:02Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T16:16:26Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-07T04:55:43Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T03:54:59Z"), model.changedTimestamp()); - Assertions.assertEquals("hm", model.provisioningState()); + Assertions.assertEquals("hihpvecmsl", model.path()); + Assertions.assertEquals("bl", model.parentPath()); + Assertions.assertEquals(4107932783596576706L, model.size()); + Assertions.assertEquals(1585961727789938930L, model.bytesUsed()); + Assertions.assertEquals("uscv", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T08:33:59Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-05T21:32:10Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T09:04:04Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-10T07:14Z"), model.changedTimestamp()); + Assertions.assertEquals("upbezqccydrt", 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 e83fe0135de0..144f6d30752e 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,18 +11,17 @@ public final class SubvolumePatchParamsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubvolumePatchParams model = BinaryData.fromString("{\"size\":6958305132617717680,\"path\":\"tvtzeexavoxtfg\"}") + SubvolumePatchParams model = BinaryData.fromString("{\"size\":2977902627336186951,\"path\":\"wrq\"}") .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(6958305132617717680L, model.size()); - Assertions.assertEquals("tvtzeexavoxtfg", model.path()); + Assertions.assertEquals(2977902627336186951L, model.size()); + Assertions.assertEquals("wrq", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchParams model - = new SubvolumePatchParams().withSize(6958305132617717680L).withPath("tvtzeexavoxtfg"); + SubvolumePatchParams model = new SubvolumePatchParams().withSize(2977902627336186951L).withPath("wrq"); model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(6958305132617717680L, model.size()); - Assertions.assertEquals("tvtzeexavoxtfg", model.path()); + Assertions.assertEquals(2977902627336186951L, model.size()); + Assertions.assertEquals("wrq", 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 8ceddab562ba..1e9f83dc517d 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,17 @@ public final class SubvolumePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":4136420798110514219,\"path\":\"awddjibab\"}}") + = BinaryData.fromString("{\"properties\":{\"size\":4146991315597354665,\"path\":\"gaqi\"}}") .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(4136420798110514219L, model.size()); - Assertions.assertEquals("awddjibab", model.path()); + Assertions.assertEquals(4146991315597354665L, model.size()); + Assertions.assertEquals("gaqi", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchRequest model = new SubvolumePatchRequest().withSize(4136420798110514219L).withPath("awddjibab"); + SubvolumePatchRequest model = new SubvolumePatchRequest().withSize(4146991315597354665L).withPath("gaqi"); model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(4136420798110514219L, model.size()); - Assertions.assertEquals("awddjibab", model.path()); + Assertions.assertEquals(4146991315597354665L, model.size()); + Assertions.assertEquals("gaqi", 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 5503ef5102d5..ca6bd43fbaf0 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,21 +12,20 @@ public final class SubvolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"tkgdojbmxva\",\"size\":8464578871437548472,\"parentPath\":\"eesvecu\",\"provisioningState\":\"pxtxsuwp\"}") + "{\"path\":\"yunssx\",\"size\":1482317786623412562,\"parentPath\":\"egjlgvvpa\",\"provisioningState\":\"ksgbuxan\"}") .toObject(SubvolumeProperties.class); - Assertions.assertEquals("tkgdojbmxva", model.path()); - Assertions.assertEquals(8464578871437548472L, model.size()); - Assertions.assertEquals("eesvecu", model.parentPath()); + Assertions.assertEquals("yunssx", model.path()); + Assertions.assertEquals(1482317786623412562L, model.size()); + Assertions.assertEquals("egjlgvvpa", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("tkgdojbmxva") - .withSize(8464578871437548472L) - .withParentPath("eesvecu"); + SubvolumeProperties model + = new SubvolumeProperties().withPath("yunssx").withSize(1482317786623412562L).withParentPath("egjlgvvpa"); model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("tkgdojbmxva", model.path()); - Assertions.assertEquals(8464578871437548472L, model.size()); - Assertions.assertEquals("eesvecu", model.parentPath()); + Assertions.assertEquals("yunssx", model.path()); + Assertions.assertEquals(1482317786623412562L, model.size()); + Assertions.assertEquals("egjlgvvpa", 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 c6f2eba31280..7cedd7132d8d 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 @@ -21,7 +21,7 @@ public final class SubvolumesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"fwwvuatbwbqam\",\"size\":1995273482528045560,\"parentPath\":\"yslpkcvmw\",\"provisioningState\":\"Succeeded\"},\"id\":\"myw\",\"name\":\"ormcqmic\",\"type\":\"ijqpkzfbojxjmcs\"}"; + = "{\"properties\":{\"path\":\"u\",\"size\":6203935542583974311,\"parentPath\":\"ucaonz\",\"provisioningState\":\"Succeeded\"},\"id\":\"idackzidgzwdyd\",\"name\":\"misvpztd\",\"type\":\"vykpxkqe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .define("vcqguefzh") - .withExistingVolume("magoaqylkjz", "jiuazjc", "mxitpfinzcpd", "tkrlgjmtbd") - .withPath("heqdurelyujlfyou") - .withSize(5206583067016482197L) - .withParentPath("eclcdigptajbrzm") + .define("uxzshxz") + .withExistingVolume("rdlhvdvmiphbe", "eqjzm", "kdclacroczf", "unerke") + .withPath("zuzudlevzskejc") + .withSize(8528415594543995470L) + .withParentPath("qkstyecupyui") .create(); - Assertions.assertEquals("fwwvuatbwbqam", response.path()); - Assertions.assertEquals(1995273482528045560L, response.size()); - Assertions.assertEquals("yslpkcvmw", response.parentPath()); + Assertions.assertEquals("u", response.path()); + Assertions.assertEquals(6203935542583974311L, response.size()); + Assertions.assertEquals("ucaonz", 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 7f6085d3625a..7ced540ff7d1 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 @@ -27,9 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.subvolumes() - .delete("ngoadyedmzr", "jfoknubnoitpkp", "trgdgxvc", "qraswugyxpqitwei", "l", - com.azure.core.util.Context.NONE); + manager.subvolumes().delete("hbssdpjeyo", "xdede", "f", "wh", "gxsur", 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 9f4000edf038..67e4cdc9bc50 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 @@ -21,7 +21,7 @@ public final class SubvolumesGetMetadataMockTests { @Test public void testGetMetadata() throws Exception { String responseStr - = "{\"id\":\"lbuigv\",\"name\":\"atvcrkdlbnbq\",\"type\":\"h\",\"properties\":{\"path\":\"hzlwxaea\",\"parentPath\":\"ur\",\"size\":2429244305964520010,\"bytesUsed\":6094325459769989000,\"permissions\":\"weaderzm\",\"creationTimeStamp\":\"2021-04-24T23:03:05Z\",\"accessedTimeStamp\":\"2021-09-30T14:28:46Z\",\"modifiedTimeStamp\":\"2021-06-07T19:00:04Z\",\"changedTimeStamp\":\"2021-07-05T10:58:17Z\",\"provisioningState\":\"Succeeded\"}}"; + = "{\"id\":\"z\",\"name\":\"karkptg\",\"type\":\"gruatsyiysjqheni\",\"properties\":{\"path\":\"qnguba\",\"parentPath\":\"jdeayscse\",\"size\":4057533547407936195,\"bytesUsed\":7375386011539248813,\"permissions\":\"mnvkvmu\",\"creationTimeStamp\":\"2021-07-20T14:16:13Z\",\"accessedTimeStamp\":\"2021-03-16T07:04:09Z\",\"modifiedTimeStamp\":\"2021-11-18T17:59:20Z\",\"changedTimeStamp\":\"2021-08-13T07:06:40Z\",\"provisioningState\":\"Succeeded\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,18 @@ public void testGetMetadata() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeModel response = manager.subvolumes() - .getMetadata("fa", "sgftipwc", "byubhiqdxyurnpn", "hza", "ccnuhiig", com.azure.core.util.Context.NONE); + .getMetadata("gira", "wly", "xchpqvctsfa", "uhwwsknstvz", "zhasupmlppdpgzvz", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("hzlwxaea", response.path()); - Assertions.assertEquals("ur", response.parentPath()); - Assertions.assertEquals(2429244305964520010L, response.size()); - Assertions.assertEquals(6094325459769989000L, response.bytesUsed()); - Assertions.assertEquals("weaderzm", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T23:03:05Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-30T14:28:46Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-07T19:00:04Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-05T10:58:17Z"), response.changedTimestamp()); + Assertions.assertEquals("qnguba", response.path()); + Assertions.assertEquals("jdeayscse", response.parentPath()); + Assertions.assertEquals(4057533547407936195L, response.size()); + Assertions.assertEquals(7375386011539248813L, response.bytesUsed()); + Assertions.assertEquals("mnvkvmu", response.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T14:16:13Z"), response.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T07:04:09Z"), response.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T17:59:20Z"), response.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-13T07:06:40Z"), 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 97cbc4575457..bf14f315ff43 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 @@ -21,7 +21,7 @@ public final class SubvolumesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"path\":\"khyxvrqtvbcz\",\"size\":2507905139024932102,\"parentPath\":\"gglmepjpfsey\",\"provisioningState\":\"sa\"},\"id\":\"psznga\",\"name\":\"p\",\"type\":\"ylkvecjuj\"}"; + = "{\"properties\":{\"path\":\"tfgfic\",\"size\":2002416946820305929,\"parentPath\":\"zpacz\",\"provisioningState\":\"hbcakznhokhoit\"},\"id\":\"rjsdmmazdnck\",\"name\":\"dbjp\",\"type\":\"lhzqpxzbawkikcdg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .getWithResponse("uqoly", "hluqwquls", "trjbhxykfhyq", "zvqqugdrftbcvexr", "uquowtljvfwhr", - com.azure.core.util.Context.NONE) + .getWithResponse("gsmgb", "mt", "wrqbebjnfv", "glab", "vkbiw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("khyxvrqtvbcz", response.path()); - Assertions.assertEquals(2507905139024932102L, response.size()); - Assertions.assertEquals("gglmepjpfsey", response.parentPath()); + Assertions.assertEquals("tfgfic", response.path()); + Assertions.assertEquals(2002416946820305929L, response.size()); + Assertions.assertEquals("zpacz", 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 a076bc331399..6b27909d7032 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 @@ -22,7 +22,7 @@ public final class SubvolumesListByVolumeMockTests { @Test public void testListByVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"lbemyej\",\"size\":7721941728787110380,\"parentPath\":\"egthortudawl\",\"provisioningState\":\"felqerpptc\"},\"id\":\"qnzmnhiil\",\"name\":\"alwcjgckbb\",\"type\":\"ccgzpraoxnyu\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"j\",\"size\":8352133416733109960,\"parentPath\":\"qq\",\"provisioningState\":\"dydkghpcvrwqir\"},\"id\":\"ktyhhmvfxl\",\"name\":\"pjajodmkrrwe\",\"type\":\"gqvqokqluj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,10 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.subvolumes() - .listByVolume("vskbuhzacaq", "yltcoqcuj", "dsxzakuejkmvb", "ztjofqcvovjufyc", - com.azure.core.util.Context.NONE); + .listByVolume("jqrshz", "bgullc", "iqqzjkoxdupn", "mglrouigdm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lbemyej", response.iterator().next().path()); - Assertions.assertEquals(7721941728787110380L, response.iterator().next().size()); - Assertions.assertEquals("egthortudawl", response.iterator().next().parentPath()); + Assertions.assertEquals("j", response.iterator().next().path()); + Assertions.assertEquals(8352133416733109960L, response.iterator().next().size()); + Assertions.assertEquals("qq", 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 56e509e8a724..3aaccd2a0608 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 @@ -12,11 +12,11 @@ public final class SubvolumesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"path\":\"m\",\"size\":6562023209845648039,\"parentPath\":\"ypq\",\"provisioningState\":\"sfj\"},\"id\":\"b\",\"name\":\"lhhxudbxvodhtnsi\",\"type\":\"ud\"},{\"properties\":{\"path\":\"mes\",\"size\":5579035152269151058,\"parentPath\":\"agzrcxfa\",\"provisioningState\":\"cfxwmdbox\"},\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"},{\"properties\":{\"path\":\"kqg\",\"size\":2485197910898439661,\"parentPath\":\"nvbroylaxx\",\"provisioningState\":\"cdisd\"},\"id\":\"fj\",\"name\":\"jsvg\",\"type\":\"rwhryvycytd\"}],\"nextLink\":\"xgccknfnw\"}") + "{\"value\":[{\"properties\":{\"path\":\"o\",\"size\":5418910644713750258,\"parentPath\":\"exwhcb\",\"provisioningState\":\"ibkeph\"},\"id\":\"uerct\",\"name\":\"toyint\",\"type\":\"pbrlcyrduczkgofx\"},{\"properties\":{\"path\":\"rucvcrrpcjttbs\",\"size\":4563205659323966935,\"parentPath\":\"qnrmvvfko\",\"provisioningState\":\"lghktuidvrm\"},\"id\":\"lpdwwexymzvlazi\",\"name\":\"bhpwvqsgnyy\",\"type\":\"uzivensrpmeyyvp\"},{\"properties\":{\"path\":\"tlbijpzg\",\"size\":5511629518307035405,\"parentPath\":\"hfvolmknb\",\"provisioningState\":\"wcdommpvfqaw\"},\"id\":\"gbrt\",\"name\":\"uiaclkiexhajlfn\",\"type\":\"hiqfyuttdiy\"},{\"properties\":{\"path\":\"vnwsw\",\"size\":2940513427697721295,\"parentPath\":\"ctwwgzw\",\"provisioningState\":\"l\"},\"id\":\"cvogygzyvne\",\"name\":\"zaifghtmoqqtlff\",\"type\":\"zbkr\"}],\"nextLink\":\"jjavfq\"}") .toObject(SubvolumesList.class); - Assertions.assertEquals("m", model.value().get(0).path()); - Assertions.assertEquals(6562023209845648039L, model.value().get(0).size()); - Assertions.assertEquals("ypq", model.value().get(0).parentPath()); - Assertions.assertEquals("xgccknfnw", model.nextLink()); + Assertions.assertEquals("o", model.value().get(0).path()); + Assertions.assertEquals(5418910644713750258L, model.value().get(0).size()); + Assertions.assertEquals("exwhcb", model.value().get(0).parentPath()); + Assertions.assertEquals("jjavfq", 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 05350960e9df..82705040095a 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,24 +13,25 @@ public final class UpdateNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"gp\",\"subnetId\":\"bu\",\"networkSiblingSetStateId\":\"qwyxebeybpm\",\"networkFeatures\":\"Basic_Standard\"}") + "{\"networkSiblingSetId\":\"ttxpnrupza\",\"subnetId\":\"mrdixtreki\",\"networkSiblingSetStateId\":\"swyskbruffg\",\"networkFeatures\":\"Standard_Basic\"}") .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("gp", model.networkSiblingSetId()); - Assertions.assertEquals("bu", model.subnetId()); - Assertions.assertEquals("qwyxebeybpm", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); + Assertions.assertEquals("ttxpnrupza", model.networkSiblingSetId()); + Assertions.assertEquals("mrdixtreki", model.subnetId()); + Assertions.assertEquals("swyskbruffg", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("gp") - .withSubnetId("bu") - .withNetworkSiblingSetStateId("qwyxebeybpm") - .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD); + UpdateNetworkSiblingSetRequest model + = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("ttxpnrupza") + .withSubnetId("mrdixtreki") + .withNetworkSiblingSetStateId("swyskbruffg") + .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC); model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("gp", model.networkSiblingSetId()); - Assertions.assertEquals("bu", model.subnetId()); - Assertions.assertEquals("qwyxebeybpm", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); + Assertions.assertEquals("ttxpnrupza", model.networkSiblingSetId()); + Assertions.assertEquals("mrdixtreki", model.subnetId()); + Assertions.assertEquals("swyskbruffg", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java index c2e1cdf391c1..80045f2ca3f5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageNameTests.java @@ -11,9 +11,9 @@ public final class UsageNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsageName model = BinaryData.fromString("{\"value\":\"eifzzhmk\",\"localizedValue\":\"svflyhbxcudch\"}") + UsageName model = BinaryData.fromString("{\"value\":\"jymrhbg\",\"localizedValue\":\"ozkyewnfnzh\"}") .toObject(UsageName.class); - Assertions.assertEquals("eifzzhmk", model.value()); - Assertions.assertEquals("svflyhbxcudch", model.localizedValue()); + Assertions.assertEquals("jymrhbg", model.value()); + Assertions.assertEquals("ozkyewnfnzh", model.localizedValue()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java index f19f246cbb75..286e355f33ff 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagePropertiesTests.java @@ -11,7 +11,7 @@ public final class UsagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageProperties model - = BinaryData.fromString("{\"currentValue\":972359949,\"limit\":581977719,\"unit\":\"ldforobwj\"}") + = BinaryData.fromString("{\"currentValue\":506406018,\"limit\":1781850881,\"unit\":\"ffjkutycyarnroo\"}") .toObject(UsageProperties.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java index bb7ed2fb669e..408aeb4bb340 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsageResultInnerTests.java @@ -11,7 +11,7 @@ public final class UsageResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageResultInner model = BinaryData.fromString( - "{\"id\":\"erbdk\",\"name\":{\"value\":\"idizozsdbccxjmo\",\"localizedValue\":\"dgnwncypuuwwlt\"},\"properties\":{\"currentValue\":26042024,\"limit\":1178196401,\"unit\":\"e\"}}") + "{\"id\":\"giycwkdtaawxwfek\",\"name\":{\"value\":\"rrqmbzmqk\",\"localizedValue\":\"tbnxwbjsid\"},\"properties\":{\"currentValue\":390044418,\"limit\":610011466,\"unit\":\"sokdgoge\"}}") .toObject(UsageResultInner.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java index 76d6ac2af102..b0c339614d25 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UsagesListResultTests.java @@ -12,8 +12,8 @@ public final class UsagesListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsagesListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"tffyaqit\",\"name\":{\"value\":\"eioqaqhvse\",\"localizedValue\":\"uqyrxpdl\"},\"properties\":{\"currentValue\":506736213,\"limit\":1453108292,\"unit\":\"mjqfrddgamquhio\"}},{\"id\":\"sjuivfcdisyir\",\"name\":{\"value\":\"hcz\",\"localizedValue\":\"rxzbujr\"},\"properties\":{\"currentValue\":1272649211,\"limit\":1247179302,\"unit\":\"evkh\"}},{\"id\":\"lnzonzlrpiqywn\",\"name\":{\"value\":\"tszcofizehtdhgb\",\"localizedValue\":\"vreljea\"},\"properties\":{\"currentValue\":1671689667,\"limit\":1202304870,\"unit\":\"ov\"}}],\"nextLink\":\"nashcxlp\"}") + "{\"value\":[{\"id\":\"kutvlxhrpqhv\",\"name\":{\"value\":\"couqehb\",\"localizedValue\":\"cdsziryrand\"},\"properties\":{\"currentValue\":1463540135,\"limit\":2029728354,\"unit\":\"oormkfqlwxldyka\"}},{\"id\":\"ygaolnjpnnb\",\"name\":{\"value\":\"sibjgs\",\"localizedValue\":\"xxahmrnadzyqegxy\"},\"properties\":{\"currentValue\":1088320198,\"limit\":739994606,\"unit\":\"hwbjijkgqxnhmbk\"}}],\"nextLink\":\"njaujvaan\"}") .toObject(UsagesListResult.class); - Assertions.assertEquals("nashcxlp", model.nextLink()); + Assertions.assertEquals("njaujvaan", model.nextLink()); } } 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 7a13e396a62e..af37599fca9c 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\":\"99bd4db2-b78f-4ca8-bbfc-766eb3db93c6\",\"clientId\":\"0377dd76-d9ff-4558-9c59-4c8345a939ee\"}") + "{\"principalId\":\"75bb5026-5a23-4d40-b5d5-74cc5ffc9343\",\"clientId\":\"45d4fcfc-c9c6-48ee-8ca1-4a81f52a32ac\"}") .toObject(UserAssignedIdentity.class); } 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 51138b7f91ea..6d5f63f2dfb6 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumeGroups().delete("otwypundmb", "hu", "cmjkavlgorbmftpm", com.azure.core.util.Context.NONE); + manager.volumeGroups().delete("dljdjuskb", "req", "n", com.azure.core.util.Context.NONE); } } 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 576208e3615f..12b2a61b97fd 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 @@ -24,7 +24,7 @@ public final class VolumeQuotaRulesCreateMockTests { @Test public void testCreate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":3134727442313406717,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"kjcjcaztbwsnsqow\"},\"location\":\"comlikytwvczc\",\"tags\":{\"yfdvlvhbwrnfxtgd\":\"acve\"},\"id\":\"pqthehnmnaoya\",\"name\":\"kcoeqswank\",\"type\":\"t\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":6021657881113967063,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"vuagntetaout\"},\"location\":\"dc\",\"tags\":{\"hmtybkcgsuthhll\":\"spfefyihduyeuyld\",\"jrr\":\"mwynefxexlfciatx\",\"ajfoxc\":\"kmdskjhhxd\"},\"id\":\"scv\",\"name\":\"lxlhuavkrm\",\"type\":\"kmyjmkxett\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,21 +34,20 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .define("dwqslsrhmpqvw") - .withRegion("esi") - .withExistingVolume("lkeuac", "tomflrytswfpf", "dgycxnmskwhqjjy", "lurlpshhkvp") - .withTags(mapOf("hcecybmrqbr", "tljqobbpih", "crse", "bbmpxdlvykfre", "jggsvo", "wjksghudgzhxo", - "hrkmdyomkxfbvfbh", "jkxibda")) - .withQuotaSizeInKiBs(1614432178721424966L) + .define("n") + .withRegion("kft") + .withExistingVolume("gfyrtogmhmjpjsc", "fp", "qwtygevgwmseharx", "fv") + .withTags(mapOf("ym", "twmykyut")) + .withQuotaSizeInKiBs(4987593817947718819L) .withQuotaType(QuotaType.DEFAULT_USER_QUOTA) - .withQuotaTarget("imuvqejosovyrrl") + .withQuotaTarget("vwjhrsidqpxlbt") .create(); - Assertions.assertEquals("comlikytwvczc", response.location()); - Assertions.assertEquals("acve", response.tags().get("yfdvlvhbwrnfxtgd")); - Assertions.assertEquals(3134727442313406717L, response.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("kjcjcaztbwsnsqow", response.quotaTarget()); + Assertions.assertEquals("dc", response.location()); + Assertions.assertEquals("spfefyihduyeuyld", response.tags().get("hmtybkcgsuthhll")); + Assertions.assertEquals(6021657881113967063L, response.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); + Assertions.assertEquals("vuagntetaout", 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 8d25c818ed74..885f4e94c947 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 @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumeQuotaRules() - .delete("whmozusgzvlnsnnj", "fpafolpymwamxq", "rag", "gdphtvdula", "vl", com.azure.core.util.Context.NONE); + manager.volumeQuotaRules().delete("rra", "eek", "s", "eh", "gdda", 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 6c6083960136..c2a1ae01af07 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 @@ -22,7 +22,7 @@ public final class VolumeQuotaRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":7253922179126888644,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"gv\"},\"location\":\"pcrrk\",\"tags\":{\"mjsmwr\":\"w\",\"jafi\":\"kcdxfzzzw\"},\"id\":\"lhguyn\",\"name\":\"chl\",\"type\":\"mltx\"}"; + = "{\"properties\":{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":7582580137587684684,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"telexhv\"},\"location\":\"b\",\"tags\":{\"zqocarku\":\"o\",\"nx\":\"lbcnndt\",\"llhdyzm\":\"wqy\",\"nxakckyw\":\"ckze\"},\"id\":\"mxgaabjkdtfohfao\",\"name\":\"zvkiwrsiwdy\",\"type\":\"quryk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,13 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .getWithResponse("uyjucejikzo", "ovvtzejetjkln", "ikyju", "k", "bqzolxr", com.azure.core.util.Context.NONE) + .getWithResponse("evdyz", "fajs", "kskmqozzkivyhjrl", "izjixlq", "hefkwabsolronqq", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("pcrrk", response.location()); - Assertions.assertEquals("w", response.tags().get("mjsmwr")); - Assertions.assertEquals(7253922179126888644L, response.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("gv", response.quotaTarget()); + Assertions.assertEquals("b", response.location()); + Assertions.assertEquals("o", response.tags().get("zqocarku")); + Assertions.assertEquals(7582580137587684684L, response.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, response.quotaType()); + Assertions.assertEquals("telexhv", 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 ebaeafbcbd06..77cdd3fbf653 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 @@ -23,7 +23,7 @@ public final class VolumeQuotaRulesListByVolumeMockTests { @Test public void testListByVolume() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":7632025456760729516,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"qvlnnpxybafiqgea\"},\"location\":\"bgj\",\"tags\":{\"wvmzegjonfhjir\":\"lklbyulidw\",\"z\":\"gdn\"},\"id\":\"rfkspzhz\",\"name\":\"tk\",\"type\":\"jcitdigsxcdglj\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":7951820081459146243,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"epl\"},\"location\":\"qjn\",\"tags\":{\"vmywhsbrcarycsjj\":\"ygleexa\",\"dmkrrb\":\"yvoaqajuvehzp\",\"ubefgybpmfbfunu\":\"mpfu\"},\"id\":\"mpzkrvfyifkd\",\"name\":\"chlzvfi\",\"type\":\"tnkjjwgcwnphb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,12 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.volumeQuotaRules() - .listByVolume("jchcsrlzknmzla", "rupdwvnphcnzq", "pjhmqrhvthl", "iwdcxsmlzzhzd", - com.azure.core.util.Context.NONE); + .listByVolume("bcbgydlqidywmhm", "tyrilkfbnrqqxvz", "pbnfnqtx", "to", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bgj", response.iterator().next().location()); - Assertions.assertEquals("lklbyulidw", response.iterator().next().tags().get("wvmzegjonfhjir")); - Assertions.assertEquals(7632025456760729516L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("qvlnnpxybafiqgea", response.iterator().next().quotaTarget()); + Assertions.assertEquals("qjn", response.iterator().next().location()); + Assertions.assertEquals("ygleexa", response.iterator().next().tags().get("vmywhsbrcarycsjj")); + Assertions.assertEquals(7951820081459146243L, response.iterator().next().quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, response.iterator().next().quotaType()); + Assertions.assertEquals("epl", response.iterator().next().quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java index a00f09cc18a6..aa3380d4e80d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeExternalReplicationMockTests.java @@ -20,7 +20,7 @@ public final class VolumesAuthorizeExternalReplicationMockTests { @Test public void testAuthorizeExternalReplication() throws Exception { - String responseStr = "{\"properties\":{\"svmPeeringCommand\":\"nugj\"}}"; + String responseStr = "{\"properties\":{\"svmPeeringCommand\":\"upxvpifd\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,9 +30,9 @@ public void testAuthorizeExternalReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SvmPeerCommandResponse response = manager.volumes() - .authorizeExternalReplication("lbyvictctbrxkjzw", "gxffmshkwf", "kgozxwop", "bydpizqaclnapxb", + .authorizeExternalReplication("yltjcrspxklu", "cclfgxannn", "ytzpo", "ewxigpxvk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("nugj", response.properties().svmPeeringCommand()); + Assertions.assertEquals("upxvpifd", response.properties().svmPeeringCommand()); } } 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 60195699d984..9a5075fce342 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 @@ -29,8 +29,8 @@ public void testAuthorizeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .authorizeReplication("dzqavbpdqmjxlyyz", "lgouwtlmjj", "uojqt", "baxk", - new AuthorizeRequest().withRemoteVolumeResourceId("ytunlbfjkwr"), com.azure.core.util.Context.NONE); + .authorizeReplication("w", "yos", "wwhnhjtfvpn", "pmil", + new AuthorizeRequest().withRemoteVolumeResourceId("nwynudq"), 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 79eb8cab9103..0733c89ec720 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 @@ -29,8 +29,9 @@ public void testBreakFileLocks() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakFileLocks("vru", "nz", "jgehkf", "imrt", new BreakFileLocksRequest().withClientIp("okffqyinljqepqwh") - .withConfirmRunningDisruptiveOperation(true), com.azure.core.util.Context.NONE); + .breakFileLocks("i", "byl", "ui", "vxva", + new BreakFileLocksRequest().withClientIp("crkdlbn").withConfirmRunningDisruptiveOperation(false), + 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 c05240db380d..099c92d3eb87 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 @@ -29,8 +29,8 @@ public void testBreakReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakReplication("ziqgfuh", "kzruswh", "hczznvf", "ycjsx", - new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); + .breakReplication("mxitpfinzcpd", "tkrlgjmtbd", "vcqguefzh", "mpheqdur", + new BreakReplicationRequest().withForceBreakReplication(true), 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 f214f8204334..908416766e9e 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 @@ -28,8 +28,7 @@ public void testDeleteReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .deleteReplication("rltzkatbhjmz", "nbsoqeqalarv", "agunbtgfebw", "nbmhyree", - com.azure.core.util.Context.NONE); + .deleteReplication("imwrzregzgyufu", "rw", "weryekzk", "hmeott", 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 1fea4a11705f..a1064834c9c0 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 @@ -28,7 +28,7 @@ public void testFinalizeRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .finalizeRelocation("owa", "iynknlq", "zdvpiw", "xqszdtmaajquh", com.azure.core.util.Context.NONE); + .finalizeRelocation("ephblkwqpatvbqs", "tcjb", "tvivuzqym", "uo", 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 f2d77d5c6e4c..d052585d60ba 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 @@ -21,7 +21,7 @@ public final class VolumesListGetGroupIdListForLdapUserMockTests { @Test public void testListGetGroupIdListForLdapUser() throws Exception { - String responseStr = "{\"groupIdsForLdapUser\":[\"jtbxqmuluxlx\",\"zvners\",\"ycucrwnamikzeb\",\"qbsms\"]}"; + String responseStr = "{\"groupIdsForLdapUser\":[\"pag\",\"tmvmmagoaqylkjz\",\"jiuazjc\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGetGroupIdListForLdapUser() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GetGroupIdListForLdapUserResponse response = manager.volumes() - .listGetGroupIdListForLdapUser("onsts", "i", "xgvelfclduccbird", "vuwcobiegstmnin", - new GetGroupIdListForLdapUserRequest().withUsername("jizcilnghgs"), com.azure.core.util.Context.NONE); + .listGetGroupIdListForLdapUser("vhcs", "hzlwxaea", "vurex", "ndsbdw", + new GetGroupIdListForLdapUserRequest().withUsername("aderzmw"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("jtbxqmuluxlx", response.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("pag", response.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java index e81badab4cab..d1691e8ed390 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.java @@ -23,7 +23,7 @@ public final class VolumesListQuotaReportMockTests { @Test public void testListQuotaReport() throws Exception { String responseStr - = "{\"properties\":{\"quotaReportRecords\":[{\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"gpnrhgov\",\"quotaLimitUsedInKiBs\":6131768695545339790,\"quotaLimitTotalInKiBs\":8602443977258369217,\"percentageUsed\":30.748308,\"isDerivedQuota\":true},{\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"mzvupor\",\"quotaLimitUsedInKiBs\":5235917180289982639,\"quotaLimitTotalInKiBs\":6437481648804620645,\"percentageUsed\":99.04068,\"isDerivedQuota\":true},{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"nq\",\"quotaLimitUsedInKiBs\":8747604723179169845,\"quotaLimitTotalInKiBs\":3069133497157477777,\"percentageUsed\":47.20034,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"gdhbe\",\"quotaLimitUsedInKiBs\":8008327052394351469,\"quotaLimitTotalInKiBs\":1286018993846993841,\"percentageUsed\":58.600147,\"isDerivedQuota\":false}]}}"; + = "{\"properties\":{\"quotaReportRecords\":[{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"yfytpq\",\"quotaLimitUsedInKiBs\":360408231688431351,\"quotaLimitTotalInKiBs\":450241632705489744,\"percentageUsed\":61.497177,\"isDerivedQuota\":true}]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,20 +33,20 @@ public void testListQuotaReport() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ListQuotaReportResult response = manager.volumes() - .listQuotaReport("rxmunjdxvgln", "vxlx", "aglqivbgkcvkh", "zvuqdflvon", + .listQuotaReport("bmwnrdjyibqb", "aomhjrmkuhmaxl", "alfihcjmobcancd", "xxqcwgaxf", new QuotaReportFilterRequest().withQuotaType(QuotaType.INDIVIDUAL_USER_QUOTA) - .withQuotaTarget("pubcpzgpxtivhjk") - .withUsageThresholdPercentage(1660677245), + .withQuotaTarget("nokzwjjz") + .withUsageThresholdPercentage(1354484922), com.azure.core.util.Context.NONE); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, response.properties().quotaReportRecords().get(0).quotaType()); - Assertions.assertEquals("gpnrhgov", response.properties().quotaReportRecords().get(0).quotaTarget()); - Assertions.assertEquals(6131768695545339790L, + Assertions.assertEquals("yfytpq", response.properties().quotaReportRecords().get(0).quotaTarget()); + Assertions.assertEquals(360408231688431351L, response.properties().quotaReportRecords().get(0).quotaLimitUsedInKiBs()); - Assertions.assertEquals(8602443977258369217L, + Assertions.assertEquals(450241632705489744L, response.properties().quotaReportRecords().get(0).quotaLimitTotalInKiBs()); - Assertions.assertEquals(30.748308F, response.properties().quotaReportRecords().get(0).percentageUsed()); + Assertions.assertEquals(61.497177F, response.properties().quotaReportRecords().get(0).percentageUsed()); Assertions.assertTrue(response.properties().quotaReportRecords().get(0).isDerivedQuota()); } } 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 7f7c30e2c426..0e6784b9d57f 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 @@ -26,7 +26,7 @@ public final class VolumesListReplicationsMockTests { @Test public void testListReplications() throws Exception { String responseStr - = "{\"value\":[{\"replicationId\":\"rytfmpcycil\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"ggn\",\"remoteVolumeRegion\":\"uztrksxwpndfcpf\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-05-17T18:52:51Z\",\"replicationDeletionTime\":\"2021-09-16T04:39:55Z\"}]}"; + = "{\"value\":[{\"replicationId\":\"iyslpkcvmwfaux\",\"endpointType\":\"dst\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"bormcqmiciijqpkz\",\"remoteVolumeRegion\":\"ojxjmcsmyqwix\",\"mirrorState\":\"Broken\",\"replicationCreationTime\":\"2021-07-14T19:56:52Z\",\"replicationDeletionTime\":\"2021-05-18T13:07:44Z\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,12 +36,12 @@ public void testListReplications() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.volumes() - .listReplications("npbs", "vefloccsrmozihmi", "g", "wtxxpkyjcx", - new ListReplicationsRequest().withExclude(Exclude.NONE), com.azure.core.util.Context.NONE); + .listReplications("yh", "w", "v", "atbwbqam", new ListReplicationsRequest().withExclude(Exclude.DELETED), + com.azure.core.util.Context.NONE); Assertions.assertEquals(EndpointType.DST, response.iterator().next().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("ggn", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("uztrksxwpndfcpf", response.iterator().next().remoteVolumeRegion()); + Assertions.assertEquals(ReplicationSchedule.HOURLY, response.iterator().next().replicationSchedule()); + Assertions.assertEquals("bormcqmiciijqpkz", response.iterator().next().remoteVolumeResourceId()); + Assertions.assertEquals("ojxjmcsmyqwix", response.iterator().next().remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java index ba85a9ebea09..3aaab1d22756 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPeerExternalClusterMockTests.java @@ -22,7 +22,8 @@ public final class VolumesPeerExternalClusterMockTests { @Test public void testPeerExternalCluster() throws Exception { - String responseStr = "{\"properties\":{\"clusterPeeringCommand\":\"t\",\"passphrase\":\"zb\"}}"; + String responseStr + = "{\"properties\":{\"clusterPeeringCommand\":\"eslabnsmjkwynq\",\"passphrase\":\"ekqsykvwjtqpkev\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +33,11 @@ public void testPeerExternalCluster() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ClusterPeerCommandResponse response = manager.volumes() - .peerExternalCluster( - "xuckpggqoweyir", "hlisngw", "lqqmpiz", "uwnpqxpxiwfcng", new PeerClusterForVolumeMigrationRequest() - .withPeerIpAddresses(Arrays.asList("aas", "ixtmkzjvkviirhgf", "rwsdp")), + .peerExternalCluster("dsajrednwyysh", "uwg", "evuafpwzyifrk", "wltxeqipxgzdyims", + new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses(Arrays.asList("yorpr", "vk")), com.azure.core.util.Context.NONE); - Assertions.assertEquals("t", response.properties().clusterPeeringCommand()); - Assertions.assertEquals("zb", response.properties().passphrase()); + Assertions.assertEquals("eslabnsmjkwynq", response.properties().clusterPeeringCommand()); + Assertions.assertEquals("ekqsykvwjtqpkev", response.properties().passphrase()); } } 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 a491a00e731f..54464d57d37d 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 @@ -29,8 +29,8 @@ public void testPoolChange() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .poolChange("nfsm", "cttuxuu", "i", "flqo", new PoolChangeRequest().withNewPoolResourceId("quvre"), - com.azure.core.util.Context.NONE); + .poolChange("aifyzyzeyuubeids", "l", "ytoithgygvfl", "gvdihoynkrxwetwk", + new PoolChangeRequest().withNewPoolResourceId("rcyrucpcunnu"), 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 50fbf282b56e..fa0f3f034450 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 @@ -28,8 +28,7 @@ public void testReInitializeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .reInitializeReplication("snkq", "hsyrqunj", "hdenxaulk", "akdkifmjnnawtqab", - com.azure.core.util.Context.NONE); + .reInitializeReplication("l", "sauzpjlx", "ehuxiqhzlraym", "zxlskihmxr", 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 a213f926f82e..1a588b63c767 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 @@ -23,7 +23,7 @@ public final class VolumesReplicationStatusWithResponseMockTests { @Test public void testReplicationStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Broken\",\"totalProgress\":\"coxpelnjeta\",\"errorMessage\":\"tsxoatftgz\"}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"oqa\",\"errorMessage\":\"z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,14 @@ public void testReplicationStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("i", "z", "umwmxqhnd", "noamldsehaohdj", com.azure.core.util.Context.NONE) + .replicationStatusWithResponse("ujlfyoumpcky", "clcdigptajbrzmq", "ucycijo", "lxiutgjcyzyzjdnr", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.healthy()); - Assertions.assertEquals(VolumeReplicationRelationshipStatus.IDLE, response.relationshipStatus()); - Assertions.assertEquals(MirrorState.BROKEN, response.mirrorState()); - Assertions.assertEquals("coxpelnjeta", response.totalProgress()); - Assertions.assertEquals("tsxoatftgz", response.errorMessage()); + Assertions.assertTrue(response.healthy()); + Assertions.assertEquals(VolumeReplicationRelationshipStatus.TRANSFERRING, response.relationshipStatus()); + Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); + Assertions.assertEquals("oqa", response.totalProgress()); + Assertions.assertEquals("z", 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 5ff1baadc4dd..df67da5a0bfd 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 @@ -28,7 +28,8 @@ public void testResyncReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .resyncReplication("wkjaos", "xuzvoamktcqi", "smgbzahgxqdl", "rtltla", com.azure.core.util.Context.NONE); + .resyncReplication("ywzwofalickd", "oiqtamtyvskn", "rwzawnvs", "cfhzagxnvhycv", + 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 35d5aac7c586..74d9d7b239a3 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 @@ -29,8 +29,8 @@ public void testRevert() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .revert("sqqw", "tcmwqkchc", "waxfewzjkj", "xfdeqvhpsyl", new VolumeRevert().withSnapshotId("shk"), - com.azure.core.util.Context.NONE); + .revert("jmlbemyejiriux", "gthortudaw", "pjfe", "qerpptcbgqnzm", + new VolumeRevert().withSnapshotId("iilialwc"), 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 01e2766b7517..d852875dc660 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 @@ -28,8 +28,7 @@ public void testRevertRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .revertRelocation("xylrjvmtygjbmz", "ospspshckf", "yjpmspbpssdfppyo", "tieyujtvczkcny", - com.azure.core.util.Context.NONE); + .revertRelocation("o", "tgitsqhzvbrzc", "banf", "ndscxmxeatk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml index 6f65eb27aa18..5f057c19c231 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml +++ b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/netapp/resource-manager/Microsoft.NetApp/NetApp -commit: 941453aea62f3a5b283a5470cc38e51fb4124bdd +commit: c97fe996d4a10f7d583b7951b07bd4b52b3a1be0 repo: Azure/azure-rest-api-specs additionalDirectories: