diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index 7c9a8b0bb5c10..e2076360bfb8b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,14 +1,460 @@ # Release History -## 2.6.0-beta.1 (Unreleased) +## 2.6.0-beta.1 (2026-10-28) + +- 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-08-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.ExternalSvmProperties` was added -### Bugs Fixed +* `models.ExternalClusterUpdate` was added -### Other Changes +* `models.ExternalCacheProperties` was added + +* `models.ElasticBackupProperties` was added + +* `models.ElasticBackupPolicyProperties` was added + +* `models.ElasticBackupPolicyUpdateProperties` was added + +* `models.ElasticSnapshot` was added + +* `models.ExternalCache` was added + +* `models.ElasticCapacityPools` was added + +* `models.ElasticKeyVaultProperties` 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.ExternalSvmTagsUpdate` was added + +* `models.ElasticSnapshotPolicyProperties` was added + +* `models.ElasticVolumeSnapshotProperties` was added + +* `models.ClusterPeerStatus` was added + +* `models.ElasticPoolEncryptionKeySource` was added + +* `models.ElasticServiceLevel` was added + +* `models.ElasticBackupPolicy` was added + +* `models.ExternalCacheConnection$Update` 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.ExternalCacheConnections` was added + +* `models.SvmPeerStatus` 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.OriginVolume` 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.KeyVaultClusterPeerPassphrasePatchProperties` was added + +* `models.ExternalClusters` was added + +* `models.ExternalCacheConnection` was added + +* `models.ClusterPeerProperties` was added + +* `models.ElasticAccountProperties` was added + +* `models.ElasticSnapshotPolicyUpdate` was added + +* `models.ElasticSnapshots` was added + +* `models.KeyVaultClusterPeerPassphraseProperties` was added + +* `models.ElasticKeyVaultStatus` was added + +* `models.ExternalClusterProperties` was added + +* `models.ExternalSvms` was added + +* `models.ElasticEncryptionIdentity` was added + +* `models.ElasticSnapshotProperties` was added + +* `models.SvmPeers` was added + +* `models.ActiveDirectoryConfigs` was added + +* `models.ElasticBackup$UpdateStages` was added + +* `models.ActiveDirectoryConfig$Update` was added + +* `models.SecretPasswordIdentity` was added + +* `models.ExternalClusterUpdateProperties` was added + +* `models.ExternalCacheConnection$UpdateStages` was added + +* `models.ElasticAccount$UpdateStages` was added + +* `models.ExternalCacheConnection$Definition` was added + +* `models.ElasticBackupPolicy$Update` was added + +* `models.ElasticBackupVaults` was added + +* `models.ElasticCapacityPool` was added + +* `models.ElasticExportPolicy` was added + +* `models.ElasticSnapshotPolicyWeeklySchedule` was added + +* `models.SvmPeer` was added + +* `models.ElasticVolume$Definition` was added + +* `models.ExternalCacheConnectionProperties` was added + +* `models.ElasticRootAccess` was added + +* `models.ExternalCacheState` was added + +* `models.ElasticBackupVault$Update` was added + +* `models.ExternalCluster$UpdateStages` was added + +* `models.AsyncDirectoryDeleteStatus` was added + +* `models.ExternalCacheConnectionStatus` was added + +* `models.ExternalSvm$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.ExternalConnectionSetupState` was added + +* `models.ElasticAccount$Update` was added + +* `models.ExternalCacheConnectionTagsUpdate` was added + +* `models.ClusterPeer` 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.ExternalSvm$UpdateStages` 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.AsyncDirectoryDelete` was added + +* `models.ElasticSnapshotPolicies` was added + +* `models.ExternalCacheConnection$DefinitionStages` was added + +* `models.ElasticAccount` was added + +* `models.ClusterPeers` was added + +* `models.SmbOplocks` was added + +* `models.EntraIdConfigPatch` was added + +* `models.ExternalCaches` was added + +* `models.ExternalCluster` was added + +* `models.CheckElasticResourceAvailabilityReason` was added + +* `models.ElasticCapacityPoolProperties` was added + +* `models.VolumePatchNamespaceProperties` was added + +* `models.VolumeNamespaceProperties` was added + +* `models.ActiveDirectoryConfigUpdate` was added + +* `models.ElasticVolume$DefinitionStages` was added + +* `models.ElasticAccountUpdateProperties` was added + +* `models.ExternalCluster$Update` was added + +* `models.ElasticCapacityPool$DefinitionStages` was added + +* `models.ElasticSmbProperties` was added + +* `models.ExternalSvm$DefinitionStages` was added + +* `models.LargeVolumeType` was added + +* `models.ExternalSvm$Definition` was added + +* `models.PolicyStatus` was added + +* `models.ElasticVolumeBackupProperties` was added + +* `models.ElasticBackup` was added + +* `models.ChangeZoneRequest` was added + +* `models.ElasticBackupVault$DefinitionStages` was added + +* `models.ExternalCluster$Definition` was added + +* `models.ElasticSnapshot$Update` was added + +* `models.CheckElasticResourceAvailabilityResponse` was added + +* `models.ElasticBackupVault` was added + +* `models.SetupInformation` 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.SvmPeerProperties` was added + +* `models.ExternalResourceNetworkInterfaces` was added + +* `models.SvmPeerType` was added + +* `models.ExternalSvm` was added + +* `models.DayOfWeek` was added + +* `models.ElasticCapacityPool$Definition` was added + +* `models.ElasticSnapshotPolicy$DefinitionStages` was added + +* `models.ExternalCluster$DefinitionStages` was added + +* `models.ElasticBackupType` was added + +* `models.ElasticProtocolType` was added + +* `models.ElasticSnapshotPolicy$UpdateStages` was added + +#### `models.NetAppAccount$Definition` was modified + +* `withEntraIdConfig(models.EntraIdConfig)` was added + +#### `models.Volume$Update` was modified + +* `withSmbOplocks(models.SmbOplocks)` was added +* `withGeoNamespaceProperties(models.VolumePatchNamespaceProperties)` was added +* `withAsyncDirectoryDelete(models.AsyncDirectoryDelete)` was added + +#### `models.SmbSettings` was modified + +* `smbOplocks()` was added +* `withSmbOplocks(models.SmbOplocks)` was added + +#### `models.Volume$Definition` was modified + +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `withGeoNamespaceProperties(models.VolumeNamespaceProperties)` was added +* `withLanguage(models.VolumeLanguage)` was added +* `withLdapServerType(models.LdapServerType)` was added +* `withAsyncDirectoryDelete(models.AsyncDirectoryDelete)` was added +* `withSmbOplocks(models.SmbOplocks)` was added + +#### `models.NetAppAccountPatch` was modified + +* `withEntraIdConfig(models.EntraIdConfigPatch)` was added +* `entraIdConfig()` was added + +#### `models.NetAppAccount$Update` was modified + +* `withEntraIdConfig(models.EntraIdConfigPatch)` was added + +#### `models.VolumeGroupVolumeProperties` was modified + +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `geoNamespaceProperties()` was added +* `withGeoNamespaceProperties(models.VolumeNamespaceProperties)` was added +* `language()` was added +* `smbOplocks()` was added +* `asyncDirectoryDelete()` was added +* `ldapServerType()` was added +* `withSmbOplocks(models.SmbOplocks)` was added +* `withLdapServerType(models.LdapServerType)` was added +* `withLanguage(models.VolumeLanguage)` was added +* `withAsyncDirectoryDelete(models.AsyncDirectoryDelete)` was added +* `largeVolumeType()` was added + +#### `models.Volume` was modified + +* `largeVolumeType()` was added +* `language()` was added +* `smbOplocks()` was added +* `asyncDirectoryDelete()` was added +* `geoNamespaceProperties()` was added +* `ldapServerType()` was added + +#### `models.VolumePatch` was modified + +* `smbOplocks()` was added +* `withSmbOplocks(models.SmbOplocks)` was added +* `geoNamespaceProperties()` was added +* `withAsyncDirectoryDelete(models.AsyncDirectoryDelete)` was added +* `asyncDirectoryDelete()` was added +* `withGeoNamespaceProperties(models.VolumePatchNamespaceProperties)` was added + +#### `NetAppFilesManager` was modified + +* `clusterPeers()` was added +* `externalClusters()` was added +* `elasticVolumes()` was added +* `elasticCapacityPools()` was added +* `elasticSnapshots()` was added +* `externalSvms()` was added +* `svmPeers()` was added +* `elasticBackupPolicies()` was added +* `elasticBackups()` was added +* `elasticBackupVaults()` was added +* `activeDirectoryConfigs()` was added +* `elasticAccounts()` was added +* `elasticSnapshotPolicies()` was added +* `externalCaches()` was added +* `externalCacheConnections()` was added + +#### `models.NetAppAccount` was modified + +* `entraIdConfig()` was added + +#### `models.CredentialsAkvDetails` was modified + +* `userAssignedIdentity()` was added +* `withUserAssignedIdentity(java.lang.String)` was added + +#### `models.CertificateAkvDetails` was modified + +* `withUserAssignedIdentity(java.lang.String)` was added +* `userAssignedIdentity()` was added ## 2.5.0 (2026-10-21) diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index 4332be9f98ee2..c7139ba2ec1c1 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-08-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-08-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.5.0 + 2.6.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 423c6111380c0..adb0256d03bfb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -15,6 +15,15 @@ - [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) @@ -75,6 +84,110 @@ - [ResetSmbPassword](#caches_resetsmbpassword) - [Update](#caches_update) +## ClusterPeers + +- [Get](#clusterpeers_get) +- [ListByParent](#clusterpeers_listbyparent) + +## 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) + +## ExternalCacheConnections + +- [CreateOrUpdate](#externalcacheconnections_createorupdate) +- [Delete](#externalcacheconnections_delete) +- [GetByResourceGroup](#externalcacheconnections_getbyresourcegroup) +- [List](#externalcacheconnections_list) +- [ListByResourceGroup](#externalcacheconnections_listbyresourcegroup) +- [Update](#externalcacheconnections_update) + +## ExternalCaches + +- [Get](#externalcaches_get) +- [ListByParent](#externalcaches_listbyparent) + +## ExternalClusters + +- [CreateOrUpdate](#externalclusters_createorupdate) +- [Delete](#externalclusters_delete) +- [GetByResourceGroup](#externalclusters_getbyresourcegroup) +- [List](#externalclusters_list) +- [ListByResourceGroup](#externalclusters_listbyresourcegroup) +- [Update](#externalclusters_update) + +## ExternalSvms + +- [CreateOrUpdate](#externalsvms_createorupdate) +- [Delete](#externalsvms_delete) +- [Get](#externalsvms_get) +- [ListByParent](#externalsvms_listbyparent) +- [Update](#externalsvms_update) + ## NetAppResource - [CheckFilePathAvailability](#netappresource_checkfilepathavailability) @@ -148,6 +261,11 @@ - [ListByVolume](#subvolumes_listbyvolume) - [Update](#subvolumes_update) +## SvmPeers + +- [Get](#svmpeers_get) +- [ListByParent](#svmpeers_listbyparent) + ## VolumeGroups - [Create](#volumegroups_create) @@ -205,7 +323,7 @@ import java.util.Arrays; */ public final class AccountsChangeKeyVaultSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2026-08-15-preview/Accounts_ChangeKeyVault.json */ /** * Sample code: Accounts_ChangeKeyVault. @@ -241,7 +359,7 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -253,7 +371,7 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-08-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2026-08-15-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -280,7 +398,7 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-08-01/Accounts_CreateOrUpdateLdapConfig.json + * x-ms-original-file: 2026-08-15-preview/Accounts_CreateOrUpdateLdapConfig.json */ /** * Sample code: Accounts_CreateOrUpdateLdapConfig. @@ -320,7 +438,7 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_Delete.json + * x-ms-original-file: 2026-08-15-preview/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -341,7 +459,7 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_Get.json + * x-ms-original-file: 2026-08-15-preview/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -362,7 +480,7 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsGetChangeKeyVaultInformationSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2026-08-15-preview/Accounts_GetChangeKeyVaultInformation.json */ /** * Sample code: Accounts_GetChangeKeyVaultInformation. @@ -384,7 +502,7 @@ public final class AccountsGetChangeKeyVaultInformationSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2026-08-15-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. @@ -405,7 +523,7 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_List.json + * x-ms-original-file: 2026-08-15-preview/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -426,7 +544,7 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsRefreshLdapBindPasswordSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_RefreshLdapBindPassword.json + * x-ms-original-file: 2026-08-15-preview/Accounts_RefreshLdapBindPassword.json */ /** * Sample code: NetAppAccounts_RefreshLdapBindPassword. @@ -448,7 +566,7 @@ public final class AccountsRefreshLdapBindPasswordSamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2026-08-15-preview/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -471,7 +589,7 @@ import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; */ public final class AccountsTransitionToCmkSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2026-08-15-preview/Accounts_TransitionEncryptionKey.json */ /** * Sample code: Accounts_MigrateEncryptionKey. @@ -501,7 +619,7 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_Update.json + * x-ms-original-file: 2026-08-15-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -529,6 +647,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-08-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-08-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-08-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-08-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-08-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-08-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 @@ -537,7 +840,7 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: 2026-08-01/BackupPolicies_Create.json + * x-ms-original-file: 2026-08-15-preview/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -566,7 +869,7 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-08-01/BackupPolicies_Delete.json + * x-ms-original-file: 2026-08-15-preview/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. @@ -588,7 +891,7 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: 2026-08-01/BackupPolicies_Get.json + * x-ms-original-file: 2026-08-15-preview/BackupPolicies_Get.json */ /** * Sample code: BackupPolicies_Get. @@ -610,7 +913,7 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: 2026-08-01/BackupPolicies_List.json + * x-ms-original-file: 2026-08-15-preview/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. @@ -633,7 +936,7 @@ import com.azure.resourcemanager.netapp.models.BackupPolicy; */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/BackupPolicies_Update.json + * x-ms-original-file: 2026-08-15-preview/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -662,7 +965,7 @@ public final class BackupPoliciesUpdateSamples { */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/BackupVaults_Create.json + * x-ms-original-file: 2026-08-15-preview/BackupVaults_Create.json */ /** * Sample code: BackupVault_CreateOrUpdate. @@ -687,7 +990,7 @@ public final class BackupVaultsCreateOrUpdateSamples { */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/BackupVaults_Delete.json + * x-ms-original-file: 2026-08-15-preview/BackupVaults_Delete.json */ /** * Sample code: BackupVaults_Delete. @@ -708,7 +1011,7 @@ public final class BackupVaultsDeleteSamples { */ public final class BackupVaultsGetSamples { /* - * x-ms-original-file: 2026-08-01/BackupVaults_Get.json + * x-ms-original-file: 2026-08-15-preview/BackupVaults_Get.json */ /** * Sample code: BackupVaults_Get. @@ -729,7 +1032,7 @@ public final class BackupVaultsGetSamples { */ public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-08-01/BackupVaults_List.json + * x-ms-original-file: 2026-08-15-preview/BackupVaults_List.json */ /** * Sample code: BackupVaults_List. @@ -754,7 +1057,7 @@ import java.util.Map; */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: 2026-08-01/BackupVaults_Update.json + * x-ms-original-file: 2026-08-15-preview/BackupVaults_Update.json */ /** * Sample code: BackupVaults_Update. @@ -790,7 +1093,7 @@ public final class BackupVaultsUpdateSamples { */ public final class BackupsCreateSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderBackupVault_Create.json */ /** * Sample code: BackupsUnderBackupVault_Create. @@ -817,7 +1120,7 @@ public final class BackupsCreateSamples { */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderBackupVault_Delete.json */ /** * Sample code: BackupsUnderBackupVault_Delete. @@ -839,7 +1142,7 @@ public final class BackupsDeleteSamples { */ public final class BackupsGetSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderBackupVault_Get.json */ /** * Sample code: BackupsUnderBackupVault_Get. @@ -861,7 +1164,7 @@ public final class BackupsGetSamples { */ public final class BackupsGetLatestStatusSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2026-08-15-preview/Volumes_LatestBackupStatus.json */ /** * Sample code: Volumes_BackupStatus. @@ -883,7 +1186,7 @@ public final class BackupsGetLatestStatusSamples { */ public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2026-08-15-preview/Volumes_LatestRestoreStatus.json */ /** * Sample code: Volumes_RestoreStatus. @@ -906,7 +1209,7 @@ public final class BackupsGetVolumeLatestRestoreStatusSamples { */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: 2026-08-01/Backups_ListByVault.json + * x-ms-original-file: 2026-08-15-preview/Backups_ListByVault.json */ /** * Sample code: Backups_ListByVault. @@ -929,7 +1232,7 @@ import com.azure.resourcemanager.netapp.models.Backup; */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderBackupVault_Update.json */ /** * Sample code: BackupsUnderBackupVault_Update. @@ -955,7 +1258,7 @@ import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; */ public final class BackupsUnderAccountMigrateBackupsSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderAccount_Migrate.json */ /** * Sample code: BackupsUnderAccount_Migrate. @@ -982,7 +1285,7 @@ import java.util.Arrays; */ public final class BackupsUnderBackupVaultRestoreFilesSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderBackupVault_SingleFileRestore.json */ /** * Sample code: Backups_SingleFileRestore. @@ -1010,7 +1313,7 @@ import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; */ public final class BackupsUnderVolumeMigrateBackupsSamples { /* - * x-ms-original-file: 2026-08-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2026-08-15-preview/BackupsUnderVolume_Migrate.json */ /** * Sample code: BackupsUnderVolume_Migrate. @@ -1043,7 +1346,7 @@ import com.azure.resourcemanager.netapp.models.OnCertificateConflictAction; */ public final class BucketsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Buckets_CreateOrUpdate.json */ /** * Sample code: Buckets_CreateOrUpdate. @@ -1064,7 +1367,7 @@ public final class BucketsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-08-01/Buckets_CreateOrUpdateWithAkv.json + * x-ms-original-file: 2026-08-15-preview/Buckets_CreateOrUpdateWithAkv.json */ /** * Sample code: Buckets_CreateOrUpdateWithAkv. @@ -1080,13 +1383,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(); } } @@ -1100,7 +1406,7 @@ public final class BucketsCreateOrUpdateSamples { */ public final class BucketsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_Delete.json + * x-ms-original-file: 2026-08-15-preview/Buckets_Delete.json */ /** * Sample code: Buckets_Delete. @@ -1123,7 +1429,7 @@ import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; */ public final class BucketsGenerateAkvCredentialsSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_GenerateAkvCredentials.json + * x-ms-original-file: 2026-08-15-preview/Buckets_GenerateAkvCredentials.json */ /** * Sample code: Buckets_GenerateAkvCredentials. @@ -1148,351 +1454,2191 @@ import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; */ public final class BucketsGenerateCredentialsSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_GenerateCredentials.json + * x-ms-original-file: 2026-08-15-preview/Buckets_GenerateCredentials.json + */ + /** + * Sample code: Buckets_GenerateCredentials. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsGenerateCredentials(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .generateCredentialsWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", + new BucketCredentialsExpiry().withKeyPairExpiryDays(3), com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_Get + +```java +/** + * Samples for Buckets Get. + */ +public final class BucketsGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Buckets_Get.json + */ + /** + * Sample code: Buckets_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_List + +```java +/** + * Samples for Buckets List. + */ +public final class BucketsListSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Buckets_List.json + */ + /** + * Sample code: Buckets_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_RefreshCertificate + +```java +/** + * Samples for Buckets RefreshCertificate. + */ +public final class BucketsRefreshCertificateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Buckets_RefreshCertificate.json + */ + /** + * Sample code: Buckets_RefreshCertificate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsRefreshCertificate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .refreshCertificate("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_Update + +```java +import com.azure.resourcemanager.netapp.models.AzureKeyVaultDetails; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.CertificateAkvDetails; +import com.azure.resourcemanager.netapp.models.CredentialsAkvDetails; +import com.azure.resourcemanager.netapp.models.OnCertificateConflictAction; + +/** + * Samples for Buckets Update. + */ +public final class BucketsUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Buckets_Update.json + */ + /** + * Sample code: Buckets_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Bucket resource = manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withServer(new BucketServerPatchProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("") + .withOnCertificateConflictAction(OnCertificateConflictAction.UPDATE)) + .withPermissions(BucketPatchPermissions.READ_WRITE) + .apply(); + } + + /* + * x-ms-original-file: 2026-08-15-preview/Buckets_UpdateWithAkv.json + */ + /** + * Sample code: Buckets_UpdateWithAkv. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsUpdateWithAkv(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Bucket resource = manager.buckets() + .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .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") + .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(); + } +} +``` + +### Caches_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.CacheProperties; +import com.azure.resourcemanager.netapp.models.EncryptionKeySource; +import com.azure.resourcemanager.netapp.models.LdapServerType; +import com.azure.resourcemanager.netapp.models.LdapState; +import com.azure.resourcemanager.netapp.models.OriginClusterInformation; +import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; +import com.azure.resourcemanager.netapp.models.SmbEncryptionState; +import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.SmbOplocks; +import com.azure.resourcemanager.netapp.models.SmbSettings; +import java.util.Arrays; + +/** + * Samples for Caches CreateOrUpdate. + */ +public final class CachesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_CreateOrUpdate_SMB.json + */ + /** + * Sample code: Caches_CreateOrUpdate_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesCreateOrUpdateSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .define("cache1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withProperties(new CacheProperties().withFilePath("cache-smb-01") + .withSize(107374182400L) + .withCacheSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1") + .withPeeringSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1") + .withSmbSettings(new SmbSettings().withSmbEncryption(SmbEncryptionState.ENABLED) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbOplocks(SmbOplocks.ENABLED)) + .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_NET_APP) + .withOriginClusterInformation(new OriginClusterInformation().withPeerClusterName("cluster1") + .withPeerAddresses(Arrays.asList("192.0.2.10", "192.0.2.11")) + .withPeerVserverName("vserver1") + .withPeerVolumeName("originvol1"))) + .create(); + } + + /* + * x-ms-original-file: 2026-08-15-preview/Caches_CreateOrUpdate.json + */ + /** + * Sample code: Caches_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .define("cache1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withProperties(new CacheProperties().withFilePath("cache-west-us2-01") + .withSize(107374182400L) + .withCacheSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1") + .withPeeringSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1") + .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_NET_APP) + .withLdap(LdapState.ENABLED) + .withLdapServerType(LdapServerType.OPEN_LDAP) + .withOriginClusterInformation(new OriginClusterInformation().withPeerClusterName("cluster1") + .withPeerAddresses(Arrays.asList("192.0.2.10", "192.0.2.11")) + .withPeerVserverName("vserver1") + .withPeerVolumeName("originvol1"))) + .create(); + } +} +``` + +### Caches_Delete + +```java +/** + * Samples for Caches Delete. + */ +public final class CachesDeleteSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_Delete.json + */ + /** + * Sample code: Caches_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().delete("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_Get + +```java +/** + * Samples for Caches Get. + */ +public final class CachesGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_Get.json + */ + /** + * Sample code: Caches_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_List + +```java +/** + * Samples for Caches List. + */ +public final class CachesListSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_List.json + */ + /** + * Sample code: Caches_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_ListPeeringPassphrases + +```java +/** + * Samples for Caches ListPeeringPassphrases. + */ +public final class CachesListPeeringPassphrasesSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_ListPeeringPassphrases.json + */ + /** + * Sample code: Caches_ListPeeringPassphrases. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesListPeeringPassphrases(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .listPeeringPassphrasesWithResponse("myRG", "account1", "pool1", "cache-1", + com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_PoolChange + +```java +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +/** + * Samples for Caches PoolChange. + */ +public final class CachesPoolChangeSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_PoolChange.json + */ + /** + * Sample code: Caches_PoolChange. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesPoolChange(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .poolChange("myRG", "account1", "pool1", "cache1", new PoolChangeRequest().withNewPoolResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool2"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_ResetSmbPassword + +```java +/** + * Samples for Caches ResetSmbPassword. + */ +public final class CachesResetSmbPasswordSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_ResetSmbPassword.json + */ + /** + * Sample code: Caches_ResetSmbPassword. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesResetSmbPassword(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .resetSmbPassword("myResourceGroup", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_Update + +```java +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; + +/** + * Samples for Caches Update. + */ +public final class CachesUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/Caches_Update.json + */ + /** + * Sample code: Caches_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Cache resource = manager.caches() + .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); + } +} +``` + +### ClusterPeers_Get + +```java +/** + * Samples for ClusterPeers Get. + */ +public final class ClusterPeersGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ClusterPeers_Get.json + */ + /** + * Sample code: ClusterPeers_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void clusterPeersGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.clusterPeers() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "peerA", com.azure.core.util.Context.NONE); + } +} +``` + +### ClusterPeers_ListByParent + +```java +/** + * Samples for ClusterPeers ListByParent. + */ +public final class ClusterPeersListByParentSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ClusterPeers_ListByParent.json + */ + /** + * Sample code: ClusterPeers_ListByParent. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void clusterPeersListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.clusterPeers() + .listByParent("contosoNetAppRg", "contoso-external-cluster", com.azure.core.util.Context.NONE); + } +} +``` + +### ElasticAccounts_CreateOrUpdate + +```java +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-08-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; + } +} +``` + +### ElasticAccounts_Delete + +```java +/** + * Samples for ElasticAccounts Delete. + */ +public final class ElasticAccountsDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticAccounts_GetByResourceGroup + +```java +/** + * Samples for ElasticAccounts GetByResourceGroup. + */ +public final class ElasticAccountsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticAccounts_List + +```java +/** + * Samples for ElasticAccounts List. + */ +public final class ElasticAccountsListSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticAccounts_ListByResourceGroup + +```java +/** + * Samples for ElasticAccounts ListByResourceGroup. + */ +public final class ElasticAccountsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticAccounts_Update + +```java +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-08-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; + } +} +``` + +### 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-08-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(); + } +} +``` + +### ElasticBackupPolicies_Delete + +```java +/** + * Samples for ElasticBackupPolicies Delete. + */ +public final class ElasticBackupPoliciesDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackupPolicies_Get + +```java +/** + * Samples for ElasticBackupPolicies Get. + */ +public final class ElasticBackupPoliciesGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackupPolicies_ListByElasticAccount + +```java +/** + * Samples for ElasticBackupPolicies ListByElasticAccount. + */ +public final class ElasticBackupPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### 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 ElasticBackupPolicies Update. + */ +public final class ElasticBackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2026-08-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(); + } +} +``` + +### ElasticBackupVaults_CreateOrUpdate + +```java +/** + * Samples for ElasticBackupVaults CreateOrUpdate. + */ +public final class ElasticBackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-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(); + } +} +``` + +### ElasticBackupVaults_Delete + +```java +/** + * Samples for ElasticBackupVaults Delete. + */ +public final class ElasticBackupVaultsDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackupVaults_Get + +```java +/** + * Samples for ElasticBackupVaults Get. + */ +public final class ElasticBackupVaultsGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackupVaults_ListByElasticAccount + +```java +/** + * Samples for ElasticBackupVaults ListByElasticAccount. + */ +public final class ElasticBackupVaultsListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackupVaults_Update + +```java +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-08-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; + } +} +``` + +### 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-08-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(); + } +} +``` + +### ElasticBackups_Delete + +```java +/** + * Samples for ElasticBackups Delete. + */ +public final class ElasticBackupsDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackups_Get + +```java +/** + * Samples for ElasticBackups Get. + */ +public final class ElasticBackupsGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackups_ListByVault + +```java +/** + * Samples for ElasticBackups ListByVault. + */ +public final class ElasticBackupsListByVaultSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticBackups_Update + +```java +import com.azure.resourcemanager.netapp.models.ElasticBackup; + +/** + * Samples for ElasticBackups Update. + */ +public final class ElasticBackupsUpdateSamples { + /* + * x-ms-original-file: 2026-08-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(); + } +} +``` + +### ElasticCapacityPools_ChangeZone + +```java +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; + +/** + * Samples for ElasticCapacityPools ChangeZone. + */ +public final class ElasticCapacityPoolsChangeZoneSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticCapacityPools_CheckVolumeFilePathAvailability + +```java +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; + +/** + * Samples for ElasticCapacityPools CheckVolumeFilePathAvailability. + */ +public final class ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticCapacityPools_CreateOrUpdate + +```java +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-08-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-08-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(); + } +} +``` + +### ElasticCapacityPools_Delete + +```java +/** + * Samples for ElasticCapacityPools Delete. + */ +public final class ElasticCapacityPoolsDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticCapacityPools_Get + +```java +/** + * Samples for ElasticCapacityPools Get. + */ +public final class ElasticCapacityPoolsGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticCapacityPools_ListByElasticAccount + +```java +/** + * Samples for ElasticCapacityPools ListByElasticAccount. + */ +public final class ElasticCapacityPoolsListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### 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-08-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-08-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(); + } +} +``` + +### ElasticSnapshotPolicies_Delete + +```java +/** + * Samples for ElasticSnapshotPolicies Delete. + */ +public final class ElasticSnapshotPoliciesDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticSnapshotPolicies_Get + +```java +/** + * Samples for ElasticSnapshotPolicies Get. + */ +public final class ElasticSnapshotPoliciesGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticSnapshotPolicies_ListByElasticAccount + +```java +/** + * Samples for ElasticSnapshotPolicies ListByElasticAccount. + */ +public final class ElasticSnapshotPoliciesListByElasticAccountSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticSnapshotPolicies_ListElasticVolumes + +```java +/** + * Samples for ElasticSnapshotPolicies ListElasticVolumes. + */ +public final class ElasticSnapshotPoliciesListElasticVolumesSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticSnapshotPolicies_Update + +```java +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-08-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(); + } +} +``` + +### ElasticSnapshots_CreateOrUpdate + +```java +/** + * Samples for ElasticSnapshots CreateOrUpdate. + */ +public final class ElasticSnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-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(); + } +} +``` + +### ElasticSnapshots_Delete + +```java +/** + * Samples for ElasticSnapshots Delete. + */ +public final class ElasticSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticSnapshots_Get + +```java +/** + * Samples for ElasticSnapshots Get. + */ +public final class ElasticSnapshotsGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticSnapshots_ListByElasticVolume + +```java +/** + * Samples for ElasticSnapshots ListByElasticVolume. + */ +public final class ElasticSnapshotsListByElasticVolumeSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticVolumes_CreateOrUpdate + +```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.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-08-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(); + } +} +``` + +### ElasticVolumes_Delete + +```java +/** + * Samples for ElasticVolumes Delete. + */ +public final class ElasticVolumesDeleteSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticVolumes_Get + +```java +/** + * Samples for ElasticVolumes Get. + */ +public final class ElasticVolumesGetSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticVolumes_ListByElasticPool + +```java +/** + * Samples for ElasticVolumes ListByElasticPool. + */ +public final class ElasticVolumesListByElasticPoolSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### ElasticVolumes_Revert + +```java +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; + +/** + * Samples for ElasticVolumes Revert. + */ +public final class ElasticVolumesRevertSamples { + /* + * x-ms-original-file: 2026-08-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); + } +} +``` + +### 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 ElasticVolumes Update. + */ +public final class ElasticVolumesUpdateSamples { + /* + * x-ms-original-file: 2026-08-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(); + } +} +``` + +### ExternalCacheConnections_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionProperties; + +/** + * Samples for ExternalCacheConnections CreateOrUpdate. + */ +public final class ExternalCacheConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_CreateOrUpdate.json + */ + /** + * Sample code: ExternalCacheConnections_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalCacheConnectionsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections() + .define("contosoCacheConnection") + .withRegion("eastus") + .withExistingResourceGroup("contosoNetAppRg") + .withProperties(new ExternalCacheConnectionProperties().withOriginVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.NetApp/netAppAccounts/contosoAccount/capacityPools/contosoPool/volumes/contosoVolume") + .withExternalCacheName("contosoCache") + .withExternalSvmResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.NetApp/externalClusters/contosoExternalCluster/externalSvms/contosoExternalSvm") + .withClusterPeerSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.Network/virtualNetworks/contosoVnet/subnets/contosoSubnet")) + .create(); + } +} +``` + +### ExternalCacheConnections_Delete + +```java +/** + * Samples for ExternalCacheConnections Delete. + */ +public final class ExternalCacheConnectionsDeleteSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_Delete.json + */ + /** + * Sample code: ExternalCacheConnections_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCacheConnectionsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections() + .delete("contosoNetAppRg", "contosoCacheConnection", com.azure.core.util.Context.NONE); + } +} +``` + +### ExternalCacheConnections_GetByResourceGroup + +```java +/** + * Samples for ExternalCacheConnections GetByResourceGroup. + */ +public final class ExternalCacheConnectionsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_Get.json + */ + /** + * Sample code: ExternalCacheConnections_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCacheConnectionsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections() + .getByResourceGroupWithResponse("contosoNetAppRg", "contosoCacheConnection", + com.azure.core.util.Context.NONE); + } +} +``` + +### ExternalCacheConnections_List + +```java +/** + * Samples for ExternalCacheConnections List. + */ +public final class ExternalCacheConnectionsListSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_ListBySubscription.json + */ + /** + * Sample code: ExternalCacheConnections_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalCacheConnectionsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ExternalCacheConnections_ListByResourceGroup + +```java +/** + * Samples for ExternalCacheConnections ListByResourceGroup. + */ +public final class ExternalCacheConnectionsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_ListByResourceGroup.json + */ + /** + * Sample code: ExternalCacheConnections_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalCacheConnectionsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections().listByResourceGroup("contosoNetAppRg", com.azure.core.util.Context.NONE); + } +} +``` + +### ExternalCacheConnections_Update + +```java +import com.azure.resourcemanager.netapp.models.ExternalCacheConnection; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExternalCacheConnections Update. + */ +public final class ExternalCacheConnectionsUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_Update.json */ /** - * Sample code: Buckets_GenerateCredentials. + * Sample code: ExternalCacheConnections_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void bucketsGenerateCredentials(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.buckets() - .generateCredentialsWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", - new BucketCredentialsExpiry().withKeyPairExpiryDays(3), com.azure.core.util.Context.NONE); + public static void externalCacheConnectionsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ExternalCacheConnection resource = manager.externalCacheConnections() + .getByResourceGroupWithResponse("contosoNetAppRg", "contosoCacheConnection", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("env", "prod")).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; } } ``` -### Buckets_Get +### ExternalCaches_Get ```java /** - * Samples for Buckets Get. + * Samples for ExternalCaches Get. */ -public final class BucketsGetSamples { +public final class ExternalCachesGetSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_Get.json + * x-ms-original-file: 2026-08-15-preview/ExternalCaches_Get.json */ /** - * Sample code: Buckets_Get. + * Sample code: ExternalCaches_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void bucketsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.buckets() - .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + public static void externalCachesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCaches() + .getWithResponse("contosoNetAppRg", "contosoExternalCluster", "contosoExternalSvm", "contosoCache_AB12", + com.azure.core.util.Context.NONE); } } ``` -### Buckets_List +### ExternalCaches_ListByParent ```java /** - * Samples for Buckets List. + * Samples for ExternalCaches ListByParent. */ -public final class BucketsListSamples { +public final class ExternalCachesListByParentSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_List.json + * x-ms-original-file: 2026-08-15-preview/ExternalCaches_ListByParent.json */ /** - * Sample code: Buckets_List. + * Sample code: ExternalCaches_ListByParent. * * @param manager Entry point to NetAppFilesManager. */ - public static void bucketsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.buckets().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + public static void externalCachesListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCaches() + .listByParent("contosoNetAppRg", "contosoExternalCluster", "contosoExternalSvm", + com.azure.core.util.Context.NONE); } } ``` -### Buckets_RefreshCertificate +### ExternalClusters_CreateOrUpdate ```java +import com.azure.resourcemanager.netapp.models.ExternalClusterProperties; +import com.azure.resourcemanager.netapp.models.KeyVaultClusterPeerPassphraseProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for Buckets RefreshCertificate. + * Samples for ExternalClusters CreateOrUpdate. */ -public final class BucketsRefreshCertificateSamples { +public final class ExternalClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_RefreshCertificate.json + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_CreateOrUpdate.json */ /** - * Sample code: Buckets_RefreshCertificate. + * Sample code: ExternalClusters_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void bucketsRefreshCertificate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.buckets() - .refreshCertificate("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + public static void externalClustersCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters() + .define("contoso-external-cluster") + .withRegion("eastus") + .withExistingResourceGroup("contosoNetAppRg") + .withProperties(new ExternalClusterProperties() + .withInterclusterLifsIpAddresses(Arrays.asList("10.0.1.100", "10.0.1.101")) + .withClusterPeerPassphraseKeyVault(new KeyVaultClusterPeerPassphraseProperties() + .withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contosoIdentity1"))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contosoIdentity1", + 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; } } ``` -### Buckets_Update +### ExternalClusters_Delete ```java -import com.azure.resourcemanager.netapp.models.AzureKeyVaultDetails; -import com.azure.resourcemanager.netapp.models.Bucket; -import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; -import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; -import com.azure.resourcemanager.netapp.models.CertificateAkvDetails; -import com.azure.resourcemanager.netapp.models.CredentialsAkvDetails; -import com.azure.resourcemanager.netapp.models.OnCertificateConflictAction; - /** - * Samples for Buckets Update. + * Samples for ExternalClusters Delete. */ -public final class BucketsUpdateSamples { +public final class ExternalClustersDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_Update.json + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_Delete.json */ /** - * Sample code: Buckets_Update. + * Sample code: ExternalClusters_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void bucketsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Bucket resource = manager.buckets() - .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withServer(new BucketServerPatchProperties().withFqdn("fullyqualified.domainname.com") - .withCertificateObject("") - .withOnCertificateConflictAction(OnCertificateConflictAction.UPDATE)) - .withPermissions(BucketPatchPermissions.READ_WRITE) - .apply(); + public static void externalClustersDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters() + .delete("contosoNetAppRg", "contoso-external-cluster", com.azure.core.util.Context.NONE); } +} +``` +### ExternalClusters_GetByResourceGroup + +```java +/** + * Samples for ExternalClusters GetByResourceGroup. + */ +public final class ExternalClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/Buckets_UpdateWithAkv.json + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_Get.json */ /** - * Sample code: Buckets_UpdateWithAkv. + * Sample code: ExternalClusters_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void bucketsUpdateWithAkv(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Bucket resource = manager.buckets() - .getWithResponse("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .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"))) - .apply(); + public static void externalClustersGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters() + .getByResourceGroupWithResponse("contosoNetAppRg", "contoso-external-cluster", + com.azure.core.util.Context.NONE); } } ``` -### Caches_CreateOrUpdate +### ExternalClusters_List ```java -import com.azure.resourcemanager.netapp.models.CacheProperties; -import com.azure.resourcemanager.netapp.models.EncryptionKeySource; -import com.azure.resourcemanager.netapp.models.LdapServerType; -import com.azure.resourcemanager.netapp.models.LdapState; -import com.azure.resourcemanager.netapp.models.OriginClusterInformation; -import java.util.Arrays; - /** - * Samples for Caches CreateOrUpdate. + * Samples for ExternalClusters List. */ -public final class CachesCreateOrUpdateSamples { +public final class ExternalClustersListSamples { /* - * x-ms-original-file: 2026-08-01/Caches_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_ListBySubscription.json */ /** - * Sample code: Caches_CreateOrUpdate. + * Sample code: ExternalClusters_ListBySubscription. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches() - .define("cache1") - .withRegion("eastus") - .withExistingCapacityPool("myRG", "account1", "pool1") - .withProperties(new CacheProperties().withFilePath("cache-west-us2-01") - .withSize(107374182400L) - .withCacheSubnetResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1") - .withPeeringSubnetResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1") - .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_NET_APP) - .withLdap(LdapState.ENABLED) - .withLdapServerType(LdapServerType.OPEN_LDAP) - .withOriginClusterInformation(new OriginClusterInformation().withPeerClusterName("cluster1") - .withPeerAddresses(Arrays.asList("192.0.2.10", "192.0.2.11")) - .withPeerVserverName("vserver1") - .withPeerVolumeName("originvol1"))) - .create(); + public static void externalClustersListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters().list(com.azure.core.util.Context.NONE); } } ``` -### Caches_Delete +### ExternalClusters_ListByResourceGroup ```java /** - * Samples for Caches Delete. + * Samples for ExternalClusters ListByResourceGroup. */ -public final class CachesDeleteSamples { +public final class ExternalClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-08-01/Caches_Delete.json + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_ListByResourceGroup.json */ /** - * Sample code: Caches_Delete. + * Sample code: ExternalClusters_ListByResourceGroup. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches().delete("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + public static void + externalClustersListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters().listByResourceGroup("contosoNetAppRg", com.azure.core.util.Context.NONE); } } ``` -### Caches_Get +### ExternalClusters_Update ```java +import com.azure.resourcemanager.netapp.models.ExternalCluster; +import com.azure.resourcemanager.netapp.models.ExternalClusterUpdateProperties; + /** - * Samples for Caches Get. + * Samples for ExternalClusters Update. */ -public final class CachesGetSamples { +public final class ExternalClustersUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Caches_Get.json + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_Update.json */ /** - * Sample code: Caches_Get. + * Sample code: ExternalClusters_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches().getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + public static void externalClustersUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ExternalCluster resource = manager.externalClusters() + .getByResourceGroupWithResponse("contosoNetAppRg", "contoso-external-cluster", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new ExternalClusterUpdateProperties()).apply(); } } ``` -### Caches_List +### ExternalSvms_CreateOrUpdate ```java +import com.azure.resourcemanager.netapp.models.ExternalSvmProperties; + /** - * Samples for Caches List. + * Samples for ExternalSvms CreateOrUpdate. */ -public final class CachesListSamples { +public final class ExternalSvmsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Caches_List.json + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_CreateOrUpdate.json */ /** - * Sample code: Caches_List. + * Sample code: ExternalSvms_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + public static void externalSvmsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .define("contoso-svm") + .withRegion("eastus") + .withExistingExternalCluster("contosoNetAppRg", "contoso-external-cluster") + .withProperties(new ExternalSvmProperties().withOntapSvmName("contoso-svm")) + .create(); } } ``` -### Caches_ListPeeringPassphrases +### ExternalSvms_Delete ```java /** - * Samples for Caches ListPeeringPassphrases. + * Samples for ExternalSvms Delete. */ -public final class CachesListPeeringPassphrasesSamples { +public final class ExternalSvmsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Caches_ListPeeringPassphrases.json + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_Delete.json */ /** - * Sample code: Caches_ListPeeringPassphrases. + * Sample code: ExternalSvms_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesListPeeringPassphrases(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches() - .listPeeringPassphrasesWithResponse("myRG", "account1", "pool1", "cache-1", - com.azure.core.util.Context.NONE); + public static void externalSvmsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .delete("contosoNetAppRg", "contoso-external-cluster", "contoso-svm", com.azure.core.util.Context.NONE); } } ``` -### Caches_PoolChange +### ExternalSvms_Get ```java -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; - /** - * Samples for Caches PoolChange. + * Samples for ExternalSvms Get. */ -public final class CachesPoolChangeSamples { +public final class ExternalSvmsGetSamples { /* - * x-ms-original-file: 2026-08-01/Caches_PoolChange.json + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_Get.json */ /** - * Sample code: Caches_PoolChange. + * Sample code: ExternalSvms_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesPoolChange(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches() - .poolChange("myRG", "account1", "pool1", "cache1", new PoolChangeRequest().withNewPoolResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool2"), + public static void externalSvmsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "contoso-svm", com.azure.core.util.Context.NONE); } } ``` -### Caches_ResetSmbPassword +### ExternalSvms_ListByParent ```java /** - * Samples for Caches ResetSmbPassword. + * Samples for ExternalSvms ListByParent. */ -public final class CachesResetSmbPasswordSamples { +public final class ExternalSvmsListByParentSamples { /* - * x-ms-original-file: 2026-08-01/Caches_ResetSmbPassword.json + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_ListByParent.json */ /** - * Sample code: Caches_ResetSmbPassword. + * Sample code: ExternalSvms_ListByParent. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesResetSmbPassword(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.caches() - .resetSmbPassword("myResourceGroup", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE); + public static void externalSvmsListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .listByParent("contosoNetAppRg", "contoso-external-cluster", com.azure.core.util.Context.NONE); } } ``` -### Caches_Update +### ExternalSvms_Update ```java -import com.azure.resourcemanager.netapp.models.Cache; -import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; +import com.azure.resourcemanager.netapp.models.ExternalSvm; +import java.util.HashMap; +import java.util.Map; /** - * Samples for Caches Update. + * Samples for ExternalSvms Update. */ -public final class CachesUpdateSamples { +public final class ExternalSvmsUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Caches_Update.json + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_Update.json */ /** - * Sample code: Caches_Update. + * Sample code: ExternalSvms_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void cachesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Cache resource = manager.caches() - .getWithResponse("myRG", "account1", "pool1", "cache1", com.azure.core.util.Context.NONE) + public static void externalSvmsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ExternalSvm resource = manager.externalSvms() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "contoso-svm", + com.azure.core.util.Context.NONE) .getValue(); - resource.update().withProperties(new CacheUpdateProperties().withSize(214748364800L)).apply(); + resource.update().withTags(mapOf("environment", "production")).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; } } ``` @@ -1507,7 +3653,7 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: 2026-08-01/CheckFilePathAvailability.json + * x-ms-original-file: 2026-08-15-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -1536,7 +3682,7 @@ import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2026-08-01/CheckNameAvailability.json + * x-ms-original-file: 2026-08-15-preview/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -1565,7 +3711,7 @@ import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2026-08-01/CheckQuotaAvailability.json + * x-ms-original-file: 2026-08-15-preview/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -1593,7 +3739,7 @@ import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: 2026-08-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2026-08-15-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -1619,7 +3765,7 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: 2026-08-01/RegionInfo.json + * x-ms-original-file: 2026-08-15-preview/RegionInfo.json */ /** * Sample code: RegionInfo_Query. @@ -1643,7 +3789,7 @@ import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: 2026-08-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2026-08-15-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -1670,7 +3816,7 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: 2026-08-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2026-08-15-preview/NetAppResourceQuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -1692,7 +3838,7 @@ public final class NetAppResourceQuotaLimitsGetSamples { */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: 2026-08-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2026-08-15-preview/NetAppResourceQuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -1713,7 +3859,7 @@ public final class NetAppResourceQuotaLimitsListSamples { */ public final class NetAppResourceQuotaLimitsAccountGetSamples { /* - * x-ms-original-file: 2026-08-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2026-08-15-preview/NetAppResourceQuotaLimitsAccount_Get.json */ /** * Sample code: QuotaLimits. @@ -1735,7 +3881,7 @@ public final class NetAppResourceQuotaLimitsAccountGetSamples { */ public final class NetAppResourceQuotaLimitsAccountListSamples { /* - * x-ms-original-file: 2026-08-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2026-08-15-preview/NetAppResourceQuotaLimitsAccount_List.json */ /** * Sample code: QuotaLimits. @@ -1756,7 +3902,7 @@ public final class NetAppResourceQuotaLimitsAccountListSamples { */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: 2026-08-01/RegionInfos_Get.json + * x-ms-original-file: 2026-08-15-preview/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. @@ -1777,7 +3923,7 @@ public final class NetAppResourceRegionInfosGetSamples { */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: 2026-08-01/RegionInfos_List.json + * x-ms-original-file: 2026-08-15-preview/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. @@ -1798,7 +3944,7 @@ public final class NetAppResourceRegionInfosListSamples { */ public final class NetAppResourceUsagesGetSamples { /* - * x-ms-original-file: 2026-08-01/Usages_Get.json + * x-ms-original-file: 2026-08-15-preview/Usages_Get.json */ /** * Sample code: Usages_Get. @@ -1820,7 +3966,7 @@ public final class NetAppResourceUsagesGetSamples { */ public final class NetAppResourceUsagesListSamples { /* - * x-ms-original-file: 2026-08-01/Usages_List.json + * x-ms-original-file: 2026-08-15-preview/Usages_List.json */ /** * Sample code: Usages_List. @@ -1841,7 +3987,7 @@ public final class NetAppResourceUsagesListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-08-01/OperationList.json + * x-ms-original-file: 2026-08-15-preview/OperationList.json */ /** * Sample code: OperationList. @@ -1865,7 +4011,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1884,7 +4030,7 @@ public final class PoolsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-08-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2026-08-15-preview/Pools_CreateOrUpdate_CustomThroughput.json */ /** * Sample code: Pools_CreateOrUpdate_CustomThroughput. @@ -1914,7 +4060,7 @@ public final class PoolsCreateOrUpdateSamples { */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Pools_Delete.json + * x-ms-original-file: 2026-08-15-preview/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1935,7 +4081,7 @@ public final class PoolsDeleteSamples { */ public final class PoolsGetSamples { /* - * x-ms-original-file: 2026-08-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2026-08-15-preview/Pools_Get_CustomThroughput.json */ /** * Sample code: Pools_Get_CustomThroughput. @@ -1947,7 +4093,7 @@ public final class PoolsGetSamples { } /* - * x-ms-original-file: 2026-08-01/Pools_Get.json + * x-ms-original-file: 2026-08-15-preview/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1968,7 +4114,7 @@ public final class PoolsGetSamples { */ public final class PoolsListSamples { /* - * x-ms-original-file: 2026-08-01/Pools_List.json + * x-ms-original-file: 2026-08-15-preview/Pools_List.json */ /** * Sample code: Pools_List. @@ -1991,7 +4137,7 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Pools_Update.json + * x-ms-original-file: 2026-08-15-preview/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -2005,7 +4151,7 @@ public final class PoolsUpdateSamples { } /* - * x-ms-original-file: 2026-08-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2026-08-15-preview/Pools_Update_CustomThroughput.json */ /** * Sample code: Pools_Update_CustomThroughput. @@ -2033,7 +4179,7 @@ import java.util.Arrays; */ public final class RansomwareReportsClearSuspectsSamples { /* - * x-ms-original-file: 2026-08-01/RansomwareReports_ClearSuspects.json + * x-ms-original-file: 2026-08-15-preview/RansomwareReports_ClearSuspects.json */ /** * Sample code: RansomwareReports_ClearSuspects. @@ -2058,7 +4204,7 @@ public final class RansomwareReportsClearSuspectsSamples { */ public final class RansomwareReportsGetSamples { /* - * x-ms-original-file: 2026-08-01/RansomwareReports_Get.json + * x-ms-original-file: 2026-08-15-preview/RansomwareReports_Get.json */ /** * Sample code: RansomwareReports_Get. @@ -2081,7 +4227,7 @@ public final class RansomwareReportsGetSamples { */ public final class RansomwareReportsListSamples { /* - * x-ms-original-file: 2026-08-01/RansomwareReports_List.json + * x-ms-original-file: 2026-08-15-preview/RansomwareReports_List.json */ /** * Sample code: RansomwareReports_List. @@ -2107,7 +4253,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2026-08-15-preview/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -2139,7 +4285,7 @@ public final class SnapshotPoliciesCreateSamples { */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2026-08-15-preview/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -2161,7 +4307,7 @@ public final class SnapshotPoliciesDeleteSamples { */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2026-08-15-preview/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -2183,7 +4329,7 @@ public final class SnapshotPoliciesGetSamples { */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotPolicies_List.json + * x-ms-original-file: 2026-08-15-preview/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -2204,7 +4350,7 @@ public final class SnapshotPoliciesListSamples { */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2026-08-15-preview/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -2232,7 +4378,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2026-08-15-preview/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -2264,7 +4410,7 @@ public final class SnapshotPoliciesUpdateSamples { */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: 2026-08-01/Snapshots_Create.json + * x-ms-original-file: 2026-08-15-preview/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -2289,7 +4435,7 @@ public final class SnapshotsCreateSamples { */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Snapshots_Delete.json + * x-ms-original-file: 2026-08-15-preview/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -2311,7 +4457,7 @@ public final class SnapshotsDeleteSamples { */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: 2026-08-01/Snapshots_Get.json + * x-ms-original-file: 2026-08-15-preview/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -2333,7 +4479,7 @@ public final class SnapshotsGetSamples { */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2026-08-01/Snapshots_List.json + * x-ms-original-file: 2026-08-15-preview/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -2357,7 +4503,7 @@ import java.util.Arrays; */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: 2026-08-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2026-08-15-preview/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -2381,7 +4527,7 @@ public final class SnapshotsRestoreFilesSamples { */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: 2026-08-01/Subvolumes_Create.json + * x-ms-original-file: 2026-08-15-preview/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -2406,7 +4552,7 @@ public final class SubvolumesCreateSamples { */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Subvolumes_Delete.json + * x-ms-original-file: 2026-08-15-preview/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -2428,7 +4574,7 @@ public final class SubvolumesDeleteSamples { */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: 2026-08-01/Subvolumes_Get.json + * x-ms-original-file: 2026-08-15-preview/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -2450,7 +4596,7 @@ public final class SubvolumesGetSamples { */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: 2026-08-01/Subvolumes_Metadata.json + * x-ms-original-file: 2026-08-15-preview/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -2472,7 +4618,7 @@ public final class SubvolumesGetMetadataSamples { */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: 2026-08-01/Subvolumes_List.json + * x-ms-original-file: 2026-08-15-preview/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -2495,7 +4641,7 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Subvolumes_Update.json + * x-ms-original-file: 2026-08-15-preview/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -2511,6 +4657,51 @@ public final class SubvolumesUpdateSamples { } ``` +### SvmPeers_Get + +```java +/** + * Samples for SvmPeers Get. + */ +public final class SvmPeersGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/SvmPeers_Get.json + */ + /** + * Sample code: SvmPeers_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void svmPeersGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.svmPeers() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "peerA", "contoso-svm-peer-a", + com.azure.core.util.Context.NONE); + } +} +``` + +### SvmPeers_ListByParent + +```java +/** + * Samples for SvmPeers ListByParent. + */ +public final class SvmPeersListByParentSamples { + /* + * x-ms-original-file: 2026-08-15-preview/SvmPeers_ListByParent.json + */ + /** + * Sample code: SvmPeers_ListByParent. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void svmPeersListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.svmPeers() + .listByParent("contosoNetAppRg", "contoso-external-cluster", "peerA", com.azure.core.util.Context.NONE); + } +} +``` + ### VolumeGroups_Create ```java @@ -2530,7 +4721,7 @@ import java.util.Arrays; */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -2690,7 +4881,7 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -3034,7 +5225,7 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_Custom.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_Custom.json */ /** * Sample code: VolumeGroups_Create_Custom. @@ -3378,7 +5569,7 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_Custom_SMB.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_Custom_SMB.json */ /** * Sample code: VolumeGroups_Create_Custom_SMB. @@ -3610,7 +5801,7 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Delete.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -3631,7 +5822,7 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_Custom.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_Custom.json */ /** * Sample code: VolumeGroups_Get_Custom. @@ -3643,7 +5834,7 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -3655,7 +5846,7 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_Custom_SMB.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_Custom_SMB.json */ /** * Sample code: VolumeGroups_Get_Custom_SMB. @@ -3667,7 +5858,7 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -3688,7 +5879,7 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_List_Custom.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_List_Custom.json */ /** * Sample code: VolumeGroups_List_Custom. @@ -3700,7 +5891,7 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -3712,7 +5903,7 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -3735,7 +5926,7 @@ import com.azure.resourcemanager.netapp.models.QuotaType; */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: 2026-08-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2026-08-15-preview/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -3763,7 +5954,7 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: 2026-08-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2026-08-15-preview/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -3785,7 +5976,7 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: 2026-08-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2026-08-15-preview/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -3808,7 +5999,7 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: 2026-08-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2026-08-15-preview/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -3832,7 +6023,7 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2026-08-15-preview/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -3857,7 +6048,7 @@ public final class VolumeQuotaRulesUpdateSamples { */ public final class VolumesAuthorizeExternalReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_AuthorizeExternalReplication.json */ /** * Sample code: Volumes_AuthorizeExternalReplication. @@ -3882,7 +6073,7 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -3909,7 +6100,7 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2026-08-15-preview/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -3935,7 +6126,7 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_BreakReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -3953,14 +6144,20 @@ public final class VolumesBreakReplicationSamples { ### Volumes_CreateOrUpdate ```java +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; 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.SmbOplocks; +import java.util.Arrays; /** * Samples for Volumes CreateOrUpdate. */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -3977,6 +6174,35 @@ public final class VolumesCreateOrUpdateSamples { .withSubnetId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) + .withAsyncDirectoryDelete( + new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.ENABLED).withTrashBinName("trash")) + .create(); + } + + /* + * x-ms-original-file: 2026-08-15-preview/Volumes_CreateOrUpdate_SMB.json + */ + /** + * Sample code: Volumes_CreateOrUpdate_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesCreateOrUpdateSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .define("volume1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withCreationToken("my-smb-volume") + .withUsageThreshold(107374182400L) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withServiceLevel(ServiceLevel.PREMIUM) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSmbEncryption(true) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbContinuouslyAvailable(true) + .withSmbOplocks(SmbOplocks.ENABLED) .create(); } } @@ -3990,7 +6216,7 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_Delete.json + * x-ms-original-file: 2026-08-15-preview/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -4011,7 +6237,7 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -4032,7 +6258,7 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeExternalReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_FinalizeExternalReplication.json */ /** * Sample code: Volumes_FinalizeExternalReplication. @@ -4054,7 +6280,7 @@ public final class VolumesFinalizeExternalReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2026-08-15-preview/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -4075,7 +6301,7 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ExtraLargeVolumes_Get.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ExtraLargeVolumes_Get.json */ /** * Sample code: Volumes_ExtralargeVolumeGet. @@ -4087,7 +6313,7 @@ public final class VolumesGetSamples { } /* - * x-ms-original-file: 2026-08-01/Volumes_Get.json + * x-ms-original-file: 2026-08-15-preview/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -4108,7 +6334,7 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ExtraLargeVolumes_List.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ExtraLargeVolumes_List.json */ /** * Sample code: Volumes_ExtralargeVolumeList. @@ -4120,7 +6346,7 @@ public final class VolumesListSamples { } /* - * x-ms-original-file: 2026-08-01/Volumes_List.json + * x-ms-original-file: 2026-08-15-preview/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -4143,7 +6369,7 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: 2026-08-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2026-08-15-preview/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -4167,7 +6393,7 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { */ public final class VolumesListQuotaReportSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ListQuotaReport.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ListQuotaReport.json */ /** * Sample code: ListQuotaReport. @@ -4192,7 +6418,7 @@ import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ListReplications.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -4218,7 +6444,7 @@ import java.util.Arrays; */ public final class VolumesPeerExternalClusterSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2026-08-15-preview/Volumes_PeerExternalCluster.json */ /** * Sample code: Volumes_PeerExternalCluster. @@ -4243,7 +6469,7 @@ public final class VolumesPeerExternalClusterSamples { */ public final class VolumesPerformReplicationTransferSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2026-08-15-preview/Volumes_PerformReplicationTransfer.json */ /** * Sample code: Volumes_PerformReplicationTransfer. @@ -4267,7 +6493,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_PoolChange.json + * x-ms-original-file: 2026-08-15-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_PoolChange. @@ -4291,7 +6517,7 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2026-08-15-preview/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -4313,7 +6539,7 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -4337,7 +6563,7 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. @@ -4364,7 +6590,7 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_Relocate.json + * x-ms-original-file: 2026-08-15-preview/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -4387,7 +6613,7 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -4409,7 +6635,7 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -4430,7 +6656,7 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -4453,7 +6679,7 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_Revert.json + * x-ms-original-file: 2026-08-15-preview/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -4477,7 +6703,7 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2026-08-15-preview/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -4498,7 +6724,7 @@ public final class VolumesRevertRelocationSamples { */ public final class VolumesSplitCloneFromParentSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_SplitClone.json + * x-ms-original-file: 2026-08-15-preview/Volumes_SplitClone.json */ /** * Sample code: Volumes_SplitClone. @@ -4515,6 +6741,8 @@ public final class VolumesSplitCloneFromParentSamples { ### Volumes_Update ```java +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; import com.azure.resourcemanager.netapp.models.Volume; /** @@ -4522,7 +6750,7 @@ import com.azure.resourcemanager.netapp.models.Volume; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_Update.json + * x-ms-original-file: 2026-08-15-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. @@ -4533,7 +6761,10 @@ public final class VolumesUpdateSamples { Volume resource = manager.volumes() .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().apply(); + resource.update() + .withAsyncDirectoryDelete( + new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.ENABLED).withTrashBinName("trash")) + .apply(); } } ``` diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index bb9ef21616fa8..e5570acc0d0b6 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-08-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-08-15-preview. https://github.com/Azure/azure-sdk-for-java 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 cded158586b5c..7db53ce9b6e53 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,19 @@ 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.ClusterPeersImpl; +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.ExternalCacheConnectionsImpl; +import com.azure.resourcemanager.netapp.implementation.ExternalCachesImpl; +import com.azure.resourcemanager.netapp.implementation.ExternalClustersImpl; +import com.azure.resourcemanager.netapp.implementation.ExternalSvmsImpl; import com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsImpl; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; @@ -46,10 +60,12 @@ import com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesImpl; import com.azure.resourcemanager.netapp.implementation.SnapshotsImpl; import com.azure.resourcemanager.netapp.implementation.SubvolumesImpl; +import com.azure.resourcemanager.netapp.implementation.SvmPeersImpl; import com.azure.resourcemanager.netapp.implementation.VolumeGroupsImpl; import com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesImpl; import com.azure.resourcemanager.netapp.implementation.VolumesImpl; import com.azure.resourcemanager.netapp.models.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 +74,19 @@ 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.ClusterPeers; +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.ExternalCacheConnections; +import com.azure.resourcemanager.netapp.models.ExternalCaches; +import com.azure.resourcemanager.netapp.models.ExternalClusters; +import com.azure.resourcemanager.netapp.models.ExternalSvms; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimitsAccounts; import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; @@ -69,6 +98,7 @@ import com.azure.resourcemanager.netapp.models.SnapshotPolicies; import com.azure.resourcemanager.netapp.models.Snapshots; import com.azure.resourcemanager.netapp.models.Subvolumes; +import com.azure.resourcemanager.netapp.models.SvmPeers; import com.azure.resourcemanager.netapp.models.VolumeGroups; import com.azure.resourcemanager.netapp.models.VolumeQuotaRules; import com.azure.resourcemanager.netapp.models.Volumes; @@ -111,6 +141,36 @@ 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 ExternalClusters externalClusters; + + private ClusterPeers clusterPeers; + + private ExternalSvms externalSvms; + + private SvmPeers svmPeers; + + private ExternalCaches externalCaches; + + private ExternalCacheConnections externalCacheConnections; + private NetAppResourceQuotaLimits netAppResourceQuotaLimits; private NetAppResourceRegionInfos netAppResourceRegionInfos; @@ -503,6 +563,189 @@ 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 ExternalClusters. It manages ExternalCluster. + * + * @return Resource collection API of ExternalClusters. + */ + public ExternalClusters externalClusters() { + if (this.externalClusters == null) { + this.externalClusters = new ExternalClustersImpl(clientObject.getExternalClusters(), this); + } + return externalClusters; + } + + /** + * Gets the resource collection API of ClusterPeers. + * + * @return Resource collection API of ClusterPeers. + */ + public ClusterPeers clusterPeers() { + if (this.clusterPeers == null) { + this.clusterPeers = new ClusterPeersImpl(clientObject.getClusterPeers(), this); + } + return clusterPeers; + } + + /** + * Gets the resource collection API of ExternalSvms. It manages ExternalSvm. + * + * @return Resource collection API of ExternalSvms. + */ + public ExternalSvms externalSvms() { + if (this.externalSvms == null) { + this.externalSvms = new ExternalSvmsImpl(clientObject.getExternalSvms(), this); + } + return externalSvms; + } + + /** + * Gets the resource collection API of SvmPeers. + * + * @return Resource collection API of SvmPeers. + */ + public SvmPeers svmPeers() { + if (this.svmPeers == null) { + this.svmPeers = new SvmPeersImpl(clientObject.getSvmPeers(), this); + } + return svmPeers; + } + + /** + * Gets the resource collection API of ExternalCaches. + * + * @return Resource collection API of ExternalCaches. + */ + public ExternalCaches externalCaches() { + if (this.externalCaches == null) { + this.externalCaches = new ExternalCachesImpl(clientObject.getExternalCaches(), this); + } + return externalCaches; + } + + /** + * Gets the resource collection API of ExternalCacheConnections. It manages ExternalCacheConnection. + * + * @return Resource collection API of ExternalCacheConnections. + */ + public ExternalCacheConnections externalCacheConnections() { + if (this.externalCacheConnections == null) { + this.externalCacheConnections + = new ExternalCacheConnectionsImpl(clientObject.getExternalCacheConnections(), this); + } + return externalCacheConnections; + } + /** * Gets the resource collection API of NetAppResourceQuotaLimits. * 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 0000000000000..ab9def2b09538 --- /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/ClusterPeersClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ClusterPeersClient.java new file mode 100644 index 0000000000000..bfaf688801eb0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ClusterPeersClient.java @@ -0,0 +1,74 @@ +// Copyright (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.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerInner; + +/** + * An instance of this class provides access to all the operations defined in ClusterPeersClient. + */ +public interface ClusterPeersClient { + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 Cluster Peer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + Context context); + + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Cluster Peer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPeerInner get(String resourceGroupName, String externalClusterName, String peerId); + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ClusterPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName); + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ClusterPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName, 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 0000000000000..1b42177183dbc --- /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 0000000000000..12f8ec5cce35b --- /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 0000000000000..7f9dfbb74b56c --- /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 0000000000000..ea1cbfc596b46 --- /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 0000000000000..bdf6643876d8f --- /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 0000000000000..062bc0b19bb4b --- /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 0000000000000..b2021a544dba8 --- /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 0000000000000..b273fd6e03d07 --- /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/ExternalCacheConnectionsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalCacheConnectionsClient.java new file mode 100644 index 0000000000000..73f4527db7a7f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalCacheConnectionsClient.java @@ -0,0 +1,282 @@ +// Copyright (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.ExternalCacheConnectionInner; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in ExternalCacheConnectionsClient. + */ +public interface ExternalCacheConnectionsClient { + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 External Cache Connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String externalCacheConnectionName, Context context); + + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache Connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalCacheConnectionInner getByResourceGroup(String resourceGroupName, String externalCacheConnectionName); + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalCacheConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionInner resource); + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalCacheConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionInner resource, + Context context); + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalCacheConnectionInner createOrUpdate(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionInner resource); + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalCacheConnectionInner createOrUpdate(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionInner resource, Context context); + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalCacheConnectionInner> beginUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionTagsUpdate properties); + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalCacheConnectionInner> beginUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionTagsUpdate properties, + Context context); + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalCacheConnectionInner update(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties); + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalCacheConnectionInner update(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties, Context context); + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 externalCacheConnectionName); + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 externalCacheConnectionName, + Context context); + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 externalCacheConnectionName); + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 externalCacheConnectionName, Context context); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources 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/ExternalCachesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalCachesClient.java new file mode 100644 index 0000000000000..e1da359b1130e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalCachesClient.java @@ -0,0 +1,83 @@ +// Copyright (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.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheInner; + +/** + * An instance of this class provides access to all the operations defined in ExternalCachesClient. + */ +public interface ExternalCachesClient { + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @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 External Cache along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, String externalCacheResourceName, Context context); + + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalCacheInner get(String resourceGroupName, String externalClusterName, String externalSvmName, + String externalCacheResourceName); + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ExternalCache list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName); + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 ExternalCache list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalClustersClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalClustersClient.java new file mode 100644 index 0000000000000..8e31daabd0326 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalClustersClient.java @@ -0,0 +1,275 @@ +// Copyright (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.ExternalClusterInner; +import com.azure.resourcemanager.netapp.models.ExternalClusterUpdate; + +/** + * An instance of this class provides access to all the operations defined in ExternalClustersClient. + */ +public interface ExternalClustersClient { + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 External Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String externalClusterName, + Context context); + + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalClusterInner getByResourceGroup(String resourceGroupName, String externalClusterName); + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalClusterInner> beginCreateOrUpdate(String resourceGroupName, + String externalClusterName, ExternalClusterInner resource); + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalClusterInner> beginCreateOrUpdate(String resourceGroupName, + String externalClusterName, ExternalClusterInner resource, Context context); + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalClusterInner createOrUpdate(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource); + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalClusterInner createOrUpdate(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource, Context context); + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalClusterInner> beginUpdate(String resourceGroupName, + String externalClusterName, ExternalClusterUpdate properties); + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalClusterInner> beginUpdate(String resourceGroupName, + String externalClusterName, ExternalClusterUpdate properties, Context context); + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalClusterInner update(String resourceGroupName, String externalClusterName, ExternalClusterUpdate properties); + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalClusterInner update(String resourceGroupName, String externalClusterName, ExternalClusterUpdate properties, + Context context); + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 externalClusterName); + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 externalClusterName, + Context context); + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 externalClusterName); + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 externalClusterName, Context context); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all External Clusters 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 list of External Cluster resources 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/ExternalSvmsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalSvmsClient.java new file mode 100644 index 0000000000000..f6c131705ef8d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalSvmsClient.java @@ -0,0 +1,275 @@ +// Copyright (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.ExternalSvmInner; +import com.azure.resourcemanager.netapp.models.ExternalSvmTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in ExternalSvmsClient. + */ +public interface ExternalSvmsClient { + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 External SVM resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, Context context); + + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External SVM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalSvmInner get(String resourceGroupName, String externalClusterName, String externalSvmName); + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalSvmInner> beginCreateOrUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmInner resource); + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalSvmInner> beginCreateOrUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmInner resource, Context context); + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalSvmInner createOrUpdate(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmInner resource); + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalSvmInner createOrUpdate(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmInner resource, Context context); + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalSvmInner> beginUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmTagsUpdate properties); + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExternalSvmInner> beginUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmTagsUpdate properties, Context context); + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalSvmInner update(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmTagsUpdate properties); + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExternalSvmInner update(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmTagsUpdate properties, Context context); + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 externalClusterName, + String externalSvmName); + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 externalClusterName, + String externalSvmName, Context context); + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 externalClusterName, String externalSvmName); + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 externalClusterName, String externalSvmName, Context context); + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ExternalSvm list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName); + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ExternalSvm list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName, 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 39883afaff97c..455244e48210e 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,111 @@ 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 ExternalClustersClient object to access its operations. + * + * @return the ExternalClustersClient object. + */ + ExternalClustersClient getExternalClusters(); + + /** + * Gets the ClusterPeersClient object to access its operations. + * + * @return the ClusterPeersClient object. + */ + ClusterPeersClient getClusterPeers(); + + /** + * Gets the ExternalSvmsClient object to access its operations. + * + * @return the ExternalSvmsClient object. + */ + ExternalSvmsClient getExternalSvms(); + + /** + * Gets the SvmPeersClient object to access its operations. + * + * @return the SvmPeersClient object. + */ + SvmPeersClient getSvmPeers(); + + /** + * Gets the ExternalCachesClient object to access its operations. + * + * @return the ExternalCachesClient object. + */ + ExternalCachesClient getExternalCaches(); + + /** + * Gets the ExternalCacheConnectionsClient object to access its operations. + * + * @return the ExternalCacheConnectionsClient object. + */ + ExternalCacheConnectionsClient getExternalCacheConnections(); + /** * Gets the NetAppResourceQuotaLimitsClient object to access its operations. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SvmPeersClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SvmPeersClient.java new file mode 100644 index 0000000000000..9a8abfbb080d0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SvmPeersClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerInner; + +/** + * An instance of this class provides access to all the operations defined in SvmPeersClient. + */ +public interface SvmPeersClient { + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @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 SVM Peer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + String svmPeerId, Context context); + + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the SVM Peer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SvmPeerInner get(String resourceGroupName, String externalClusterName, String peerId, String svmPeerId); + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 SvmPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId); + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 SvmPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId, + Context context); +} 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 3f77b6afdc9e0..27e42ab8104f9 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,7 @@ 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; @@ -31,6 +32,11 @@ public final class AccountProperties implements JsonSerializable activeDirectories; + /* + * Entra ID configuration for the account. + */ + private EntraIdConfig entraIdConfig; + /* * Encryption settings */ @@ -92,6 +98,26 @@ public AccountProperties withActiveDirectories(List 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. * @@ -182,6 +208,9 @@ public void validate() { if (activeDirectories() != null) { activeDirectories().forEach(e -> e.validate()); } + if (entraIdConfig() != null) { + entraIdConfig().validate(); + } if (encryption() != null) { encryption().validate(); } @@ -198,6 +227,7 @@ 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); @@ -225,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)) { 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 index 52ff7241c93ba..f2047d7bc775a 100644 --- 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 @@ -11,6 +11,7 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryptionPatch; 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; @@ -36,6 +37,11 @@ public final class AccountPropertiesPatch implements JsonSerializable 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(); } @@ -183,6 +213,8 @@ public static AccountPropertiesPatch fromJson(JsonReader jsonReader) throws IOEx deserializedAccountPropertiesPatch.encryption = AccountEncryptionPatch.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 { 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 0000000000000..fdbfdf2c2060a --- /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 4ec65b42aeb2f..254bfbbada50b 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 0000000000000..e510e0cead5c1 --- /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/ClusterPeerInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerInner.java new file mode 100644 index 0000000000000..6e72ea3b39a48 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerInner.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.fluent.models; + +import com.azure.core.annotation.Immutable; +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.ClusterPeerProperties; +import java.io.IOException; + +/** + * Cluster Peer resource, represents a peer relationship between an external cluster and an Azure NetApp Files cluster. + */ +@Immutable +public final class ClusterPeerInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ClusterPeerProperties 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 ClusterPeerInner class. + */ + private ClusterPeerInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ClusterPeerProperties properties() { + return this.properties; + } + + /** + * 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 ClusterPeerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterPeerInner 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 ClusterPeerInner. + */ + public static ClusterPeerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterPeerInner deserializedClusterPeerInner = new ClusterPeerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedClusterPeerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedClusterPeerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedClusterPeerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedClusterPeerInner.properties = ClusterPeerProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedClusterPeerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterPeerInner; + }); + } +} 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 0000000000000..fec53001fe1a0 --- /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 0000000000000..355c759d9ec70 --- /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 0000000000000..46c2fe6bfa0d5 --- /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 0000000000000..578bd49e28cd4 --- /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 0000000000000..9440f6af3ca57 --- /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 0000000000000..0e81120fbefd6 --- /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 0000000000000..2aa9cb9185f20 --- /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 0000000000000..53b43ec7950f7 --- /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/ExternalCacheConnectionInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalCacheConnectionInner.java new file mode 100644 index 0000000000000..df9fdc852a68f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalCacheConnectionInner.java @@ -0,0 +1,194 @@ +// Copyright (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.ExternalCacheConnectionProperties; +import java.io.IOException; +import java.util.Map; + +/** + * External Cache Connection resource, representing a cache connection relationship between External and Azure NetApp + * Files volumes. + */ +@Fluent +public final class ExternalCacheConnectionInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ExternalCacheConnectionProperties 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 ExternalCacheConnectionInner class. + */ + public ExternalCacheConnectionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExternalCacheConnectionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExternalCacheConnectionInner object itself. + */ + public ExternalCacheConnectionInner withProperties(ExternalCacheConnectionProperties 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; + } + + /** + * {@inheritDoc} + */ + @Override + public ExternalCacheConnectionInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ExternalCacheConnectionInner 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 ExternalCacheConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheConnectionInner 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 ExternalCacheConnectionInner. + */ + public static ExternalCacheConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheConnectionInner deserializedExternalCacheConnectionInner = new ExternalCacheConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExternalCacheConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExternalCacheConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExternalCacheConnectionInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedExternalCacheConnectionInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExternalCacheConnectionInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedExternalCacheConnectionInner.properties + = ExternalCacheConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExternalCacheConnectionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheConnectionInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalCacheInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalCacheInner.java new file mode 100644 index 0000000000000..99873702a06c6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalCacheInner.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.fluent.models; + +import com.azure.core.annotation.Immutable; +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.ExternalCacheProperties; +import java.io.IOException; + +/** + * External Cache resource, representing a cache volume on an external ONTAP system. + */ +@Immutable +public final class ExternalCacheInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ExternalCacheProperties 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 ExternalCacheInner class. + */ + private ExternalCacheInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExternalCacheProperties properties() { + return this.properties; + } + + /** + * 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 ExternalCacheInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheInner 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 ExternalCacheInner. + */ + public static ExternalCacheInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheInner deserializedExternalCacheInner = new ExternalCacheInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExternalCacheInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExternalCacheInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExternalCacheInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExternalCacheInner.properties = ExternalCacheProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExternalCacheInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalClusterInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalClusterInner.java new file mode 100644 index 0000000000000..0afdaef409a26 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalClusterInner.java @@ -0,0 +1,224 @@ +// Copyright (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.ExternalClusterProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * External Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ +@Fluent +public final class ExternalClusterInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ExternalClusterProperties properties; + + /* + * 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 ExternalClusterInner class. + */ + public ExternalClusterInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExternalClusterProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExternalClusterInner object itself. + */ + public ExternalClusterInner withProperties(ExternalClusterProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 ExternalClusterInner object itself. + */ + public ExternalClusterInner 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 ExternalClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ExternalClusterInner 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 ExternalClusterInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalClusterInner 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 ExternalClusterInner. + */ + public static ExternalClusterInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalClusterInner deserializedExternalClusterInner = new ExternalClusterInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExternalClusterInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExternalClusterInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExternalClusterInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedExternalClusterInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExternalClusterInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedExternalClusterInner.properties = ExternalClusterProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedExternalClusterInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExternalClusterInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalClusterInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalSvmInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalSvmInner.java new file mode 100644 index 0000000000000..3e730a3d65631 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalSvmInner.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.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.ExternalSvmProperties; +import java.io.IOException; +import java.util.Map; + +/** + * External SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP system. + */ +@Fluent +public final class ExternalSvmInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ExternalSvmProperties 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 ExternalSvmInner class. + */ + public ExternalSvmInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExternalSvmProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExternalSvmInner object itself. + */ + public ExternalSvmInner withProperties(ExternalSvmProperties 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; + } + + /** + * {@inheritDoc} + */ + @Override + public ExternalSvmInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ExternalSvmInner 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 ExternalSvmInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalSvmInner 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 ExternalSvmInner. + */ + public static ExternalSvmInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalSvmInner deserializedExternalSvmInner = new ExternalSvmInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExternalSvmInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExternalSvmInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExternalSvmInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedExternalSvmInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExternalSvmInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedExternalSvmInner.properties = ExternalSvmProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExternalSvmInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalSvmInner; + }); + } +} 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 fa4ebd7949dc8..c55ef862ec674 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,7 @@ 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; @@ -196,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. * 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 a7f3357ea72ae..f381063299987 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 25b7c2934f0f8..f9c2741a0671d 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/SvmPeerInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerInner.java new file mode 100644 index 0000000000000..5cd380b766803 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerInner.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.fluent.models; + +import com.azure.core.annotation.Immutable; +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.SvmPeerProperties; +import java.io.IOException; + +/** + * SVM Peer resource, represents a peer relationship between an external SVM and an Azure NetApp Files SVM. + */ +@Immutable +public final class SvmPeerInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private SvmPeerProperties 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 SvmPeerInner class. + */ + private SvmPeerInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public SvmPeerProperties properties() { + return this.properties; + } + + /** + * 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 SvmPeerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SvmPeerInner 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 SvmPeerInner. + */ + public static SvmPeerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SvmPeerInner deserializedSvmPeerInner = new SvmPeerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSvmPeerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSvmPeerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSvmPeerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSvmPeerInner.properties = SvmPeerProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSvmPeerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSvmPeerInner; + }); + } +} 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 dca3ce31427c0..eff5c6abc5244 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 @@ -12,6 +12,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.BreakthroughMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; @@ -19,6 +20,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 +29,9 @@ 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.SmbOplocks; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; +import com.azure.resourcemanager.netapp.models.VolumeNamespaceProperties; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -235,9 +241,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 +255,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. @@ -757,6 +767,31 @@ public VolumeInner withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable return this; } + /** + * Get the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @return the smbOplocks value. + */ + public SmbOplocks smbOplocks() { + return this.innerProperties() == null ? null : this.innerProperties().smbOplocks(); + } + + /** + * Set the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @param smbOplocks the smbOplocks value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withSmbOplocks(SmbOplocks smbOplocks) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withSmbOplocks(smbOplocks); + return this; + } + /** * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this volume and this will * be accepted as input only for manual qosType volume. @@ -867,6 +902,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. * @@ -1088,6 +1146,29 @@ public VolumeInner withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { return this; } + /** + * Get the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @return the asyncDirectoryDelete value. + */ + public AsyncDirectoryDelete asyncDirectoryDelete() { + return this.innerProperties() == null ? null : this.innerProperties().asyncDirectoryDelete(); + } + + /** + * Set the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @param asyncDirectoryDelete the asyncDirectoryDelete value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withAsyncDirectoryDelete(AsyncDirectoryDelete asyncDirectoryDelete) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withAsyncDirectoryDelete(asyncDirectoryDelete); + return this; + } + /** * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, * the minimum value of 4 KiBs applies . @@ -1328,6 +1409,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. * @@ -1346,6 +1458,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. * @@ -1369,6 +1504,29 @@ public VolumeInner withBreakthroughMode(BreakthroughMode breakthroughMode) { return this; } + /** + * Get the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @return the geoNamespaceProperties value. + */ + public VolumeNamespaceProperties geoNamespaceProperties() { + return this.innerProperties() == null ? null : this.innerProperties().geoNamespaceProperties(); + } + + /** + * Set the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @param geoNamespaceProperties the geoNamespaceProperties value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withGeoNamespaceProperties(VolumeNamespaceProperties geoNamespaceProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withGeoNamespaceProperties(geoNamespaceProperties); + return this; + } + /** * Validates the instance. * 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 ad12e728cbfe0..6bbd6a5dfe559 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 @@ -9,11 +9,14 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; 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.SmbOplocks; +import com.azure.resourcemanager.netapp.models.VolumePatchNamespaceProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; import java.io.IOException; @@ -31,8 +34,10 @@ public final class VolumePatchProperties implements JsonSerializable e.validate()); } + if (geoNamespaceProperties() != null) { + geoNamespaceProperties().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(VolumeProperties.class); @@ -1501,11 +1683,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("smbNonBrowsable", this.smbNonBrowsable == null ? null : this.smbNonBrowsable.toString()); jsonWriter.writeBooleanField("smbContinuouslyAvailable", this.smbContinuouslyAvailable); + jsonWriter.writeStringField("smbOplocks", this.smbOplocks == null ? null : this.smbOplocks.toString()); jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); jsonWriter.writeStringField("encryptionKeySource", this.encryptionKeySource == null ? null : this.encryptionKeySource.toString()); jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); jsonWriter.writeBooleanField("ldapEnabled", this.ldapEnabled); + jsonWriter.writeStringField("ldapServerType", + this.ldapServerType == null ? null : this.ldapServerType.toString()); jsonWriter.writeBooleanField("coolAccess", this.coolAccess); jsonWriter.writeNumberField("coolnessPeriod", this.coolnessPeriod); jsonWriter.writeStringField("coolAccessRetrievalPolicy", @@ -1515,6 +1700,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("unixPermissions", this.unixPermissions); jsonWriter.writeStringField("avsDataStore", this.avsDataStore == null ? null : this.avsDataStore.toString()); jsonWriter.writeBooleanField("isDefaultQuotaEnabled", this.isDefaultQuotaEnabled); + jsonWriter.writeJsonField("asyncDirectoryDelete", this.asyncDirectoryDelete); jsonWriter.writeNumberField("defaultUserQuotaInKiBs", this.defaultUserQuotaInKiBs); jsonWriter.writeNumberField("defaultGroupQuotaInKiBs", this.defaultGroupQuotaInKiBs); jsonWriter.writeStringField("capacityPoolResourceId", this.capacityPoolResourceId); @@ -1525,8 +1711,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("enableSubvolumes", this.enableSubvolumes == null ? null : this.enableSubvolumes.toString()); jsonWriter.writeBooleanField("isLargeVolume", this.isLargeVolume); + jsonWriter.writeStringField("largeVolumeType", + this.largeVolumeType == null ? null : this.largeVolumeType.toString()); + jsonWriter.writeStringField("language", this.language == null ? null : this.language.toString()); jsonWriter.writeStringField("breakthroughMode", this.breakthroughMode == null ? null : this.breakthroughMode.toString()); + jsonWriter.writeJsonField("geoNamespaceProperties", this.geoNamespaceProperties); return jsonWriter.writeEndObject(); } @@ -1609,6 +1799,8 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.smbNonBrowsable = SmbNonBrowsable.fromString(reader.getString()); } else if ("smbContinuouslyAvailable".equals(fieldName)) { deserializedVolumeProperties.smbContinuouslyAvailable = reader.getNullable(JsonReader::getBoolean); + } else if ("smbOplocks".equals(fieldName)) { + deserializedVolumeProperties.smbOplocks = SmbOplocks.fromString(reader.getString()); } else if ("throughputMibps".equals(fieldName)) { deserializedVolumeProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); } else if ("actualThroughputMibps".equals(fieldName)) { @@ -1620,6 +1812,8 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.keyVaultPrivateEndpointResourceId = reader.getString(); } else if ("ldapEnabled".equals(fieldName)) { deserializedVolumeProperties.ldapEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("ldapServerType".equals(fieldName)) { + deserializedVolumeProperties.ldapServerType = LdapServerType.fromString(reader.getString()); } else if ("coolAccess".equals(fieldName)) { deserializedVolumeProperties.coolAccess = reader.getNullable(JsonReader::getBoolean); } else if ("coolnessPeriod".equals(fieldName)) { @@ -1643,6 +1837,8 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.dataStoreResourceId = dataStoreResourceId; } else if ("isDefaultQuotaEnabled".equals(fieldName)) { deserializedVolumeProperties.isDefaultQuotaEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("asyncDirectoryDelete".equals(fieldName)) { + deserializedVolumeProperties.asyncDirectoryDelete = AsyncDirectoryDelete.fromJson(reader); } else if ("defaultUserQuotaInKiBs".equals(fieldName)) { deserializedVolumeProperties.defaultUserQuotaInKiBs = reader.getNullable(JsonReader::getLong); } else if ("defaultGroupQuotaInKiBs".equals(fieldName)) { @@ -1671,12 +1867,18 @@ public static VolumeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedVolumeProperties.provisionedAvailabilityZone = reader.getString(); } else if ("isLargeVolume".equals(fieldName)) { deserializedVolumeProperties.isLargeVolume = reader.getNullable(JsonReader::getBoolean); + } else if ("largeVolumeType".equals(fieldName)) { + deserializedVolumeProperties.largeVolumeType = LargeVolumeType.fromString(reader.getString()); } else if ("originatingResourceId".equals(fieldName)) { deserializedVolumeProperties.originatingResourceId = reader.getString(); } else if ("inheritedSizeInBytes".equals(fieldName)) { deserializedVolumeProperties.inheritedSizeInBytes = reader.getNullable(JsonReader::getLong); + } else if ("language".equals(fieldName)) { + deserializedVolumeProperties.language = VolumeLanguage.fromString(reader.getString()); } else if ("breakthroughMode".equals(fieldName)) { deserializedVolumeProperties.breakthroughMode = BreakthroughMode.fromString(reader.getString()); + } else if ("geoNamespaceProperties".equals(fieldName)) { + deserializedVolumeProperties.geoNamespaceProperties = VolumeNamespaceProperties.fromJson(reader); } else { reader.skipChildren(); } 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 0000000000000..9608e5b64d4dc --- /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 0000000000000..0b1642b1e1788 --- /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 0000000000000..57f4f5033f339 --- /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 0000000000000..2b7bfcf990834 --- /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/ClusterPeerImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerImpl.java new file mode 100644 index 0000000000000..836de0756f33c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerInner; +import com.azure.resourcemanager.netapp.models.ClusterPeer; +import com.azure.resourcemanager.netapp.models.ClusterPeerProperties; + +public final class ClusterPeerImpl implements ClusterPeer { + private ClusterPeerInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + ClusterPeerImpl(ClusterPeerInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ClusterPeerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ClusterPeerInner 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/ClusterPeersClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersClientImpl.java new file mode 100644 index 0000000000000..da916093276b8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersClientImpl.java @@ -0,0 +1,489 @@ +// Copyright (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.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ClusterPeersClient; +import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerInner; +import com.azure.resourcemanager.netapp.implementation.models.ClusterPeerListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ClusterPeersClient. + */ +public final class ClusterPeersClientImpl implements ClusterPeersClient { + /** + * The proxy service used to perform REST calls. + */ + private final ClusterPeersService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ClusterPeersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClusterPeersClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ClusterPeersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientClusterPeers to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientClusterPeers") + public interface ClusterPeersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers/{peerId}") + @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("externalClusterName") String externalClusterName, @PathParam("peerId") String peerId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers/{peerId}") + @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("externalClusterName") String externalClusterName, @PathParam("peerId") String peerId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @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 listByParentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Cluster Peer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String externalClusterName, + String peerId) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + return Mono.error(new IllegalArgumentException("Parameter peerId 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, externalClusterName, peerId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Cluster Peer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String externalClusterName, String peerId) { + return getWithResponseAsync(resourceGroupName, externalClusterName, peerId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 Cluster Peer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String externalClusterName, + String peerId, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter peerId is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, externalClusterName, peerId, accept, context); + } + + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Cluster Peer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterPeerInner get(String resourceGroupName, String externalClusterName, String peerId) { + return getWithResponse(resourceGroupName, externalClusterName, peerId, Context.NONE).getValue(); + } + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ClusterPeer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String externalClusterName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, 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 Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ClusterPeer list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String resourceGroupName, String externalClusterName) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, externalClusterName), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ClusterPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, + String externalClusterName) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ClusterPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, String externalClusterName, + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ClusterPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, externalClusterName), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ClusterPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + Context context) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, externalClusterName, context), + nextLink -> listByParentNextSinglePage(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 ClusterPeer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(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.listByParentNext(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 ClusterPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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 ClusterPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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(ClusterPeersClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersImpl.java new file mode 100644 index 0000000000000..2513b8ec86db7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersImpl.java @@ -0,0 +1,67 @@ +// Copyright (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.ClusterPeersClient; +import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerInner; +import com.azure.resourcemanager.netapp.models.ClusterPeer; +import com.azure.resourcemanager.netapp.models.ClusterPeers; + +public final class ClusterPeersImpl implements ClusterPeers { + private static final ClientLogger LOGGER = new ClientLogger(ClusterPeersImpl.class); + + private final ClusterPeersClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ClusterPeersImpl(ClusterPeersClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, externalClusterName, peerId, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ClusterPeerImpl(inner.getValue(), this.manager())); + } + + public ClusterPeer get(String resourceGroupName, String externalClusterName, String peerId) { + ClusterPeerInner inner = this.serviceClient().get(resourceGroupName, externalClusterName, peerId); + if (inner != null) { + return new ClusterPeerImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPeerImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPeerImpl(inner1, this.manager())); + } + + private ClusterPeersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java new file mode 100644 index 0000000000000..11bd2660a1ff0 --- /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 0000000000000..1f3905cf94b35 --- /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 0000000000000..2a12b6a8e0087 --- /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 0000000000000..d5c1bbf4ab112 --- /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 0000000000000..9570804a8999a --- /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 0000000000000..4899e3583e0e1 --- /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 0000000000000..b5f1b87e2aded --- /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 0000000000000..13bcd05c95f67 --- /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 0000000000000..40825ed76062c --- /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 0000000000000..827e6c61a5718 --- /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 0000000000000..d048173279a67 --- /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 0000000000000..3f110c1e6b844 --- /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 0000000000000..af68ba51b1c6e --- /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 0000000000000..6db9b1dff33b0 --- /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 0000000000000..9234248ba2eef --- /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 0000000000000..7196cc3e5579b --- /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 0000000000000..e98b44912b669 --- /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 0000000000000..1e0054cf27886 --- /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 0000000000000..c0f1db8361fdd --- /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 0000000000000..95ea6dc5374f9 --- /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 0000000000000..de5a2418aa00d --- /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 0000000000000..adb207a1a2229 --- /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 0000000000000..1070e6438b54e --- /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 0000000000000..7bb4bbf1f4fe0 --- /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/ExternalCacheConnectionImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionImpl.java new file mode 100644 index 0000000000000..3e2453d737b45 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionImpl.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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheConnectionInner; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnection; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionProperties; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class ExternalCacheConnectionImpl + implements ExternalCacheConnection, ExternalCacheConnection.Definition, ExternalCacheConnection.Update { + private ExternalCacheConnectionInner 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 ExternalCacheConnectionProperties properties() { + return this.innerModel().properties(); + } + + 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 ExternalCacheConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String externalCacheConnectionName; + + private ExternalCacheConnectionTagsUpdate updateProperties; + + public ExternalCacheConnectionImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ExternalCacheConnection create() { + this.innerObject = serviceManager.serviceClient() + .getExternalCacheConnections() + .createOrUpdate(resourceGroupName, externalCacheConnectionName, this.innerModel(), Context.NONE); + return this; + } + + public ExternalCacheConnection create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalCacheConnections() + .createOrUpdate(resourceGroupName, externalCacheConnectionName, this.innerModel(), context); + return this; + } + + ExternalCacheConnectionImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ExternalCacheConnectionInner(); + this.serviceManager = serviceManager; + this.externalCacheConnectionName = name; + } + + public ExternalCacheConnectionImpl update() { + this.updateProperties = new ExternalCacheConnectionTagsUpdate(); + return this; + } + + public ExternalCacheConnection apply() { + this.innerObject = serviceManager.serviceClient() + .getExternalCacheConnections() + .update(resourceGroupName, externalCacheConnectionName, updateProperties, Context.NONE); + return this; + } + + public ExternalCacheConnection apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalCacheConnections() + .update(resourceGroupName, externalCacheConnectionName, updateProperties, context); + return this; + } + + ExternalCacheConnectionImpl(ExternalCacheConnectionInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.externalCacheConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "externalCacheConnections"); + } + + public ExternalCacheConnection refresh() { + this.innerObject = serviceManager.serviceClient() + .getExternalCacheConnections() + .getByResourceGroupWithResponse(resourceGroupName, externalCacheConnectionName, Context.NONE) + .getValue(); + return this; + } + + public ExternalCacheConnection refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalCacheConnections() + .getByResourceGroupWithResponse(resourceGroupName, externalCacheConnectionName, context) + .getValue(); + return this; + } + + public ExternalCacheConnectionImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ExternalCacheConnectionImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ExternalCacheConnectionImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public ExternalCacheConnectionImpl withProperties(ExternalCacheConnectionProperties 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/ExternalCacheConnectionsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsClientImpl.java new file mode 100644 index 0000000000000..78d9a65f25438 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsClientImpl.java @@ -0,0 +1,1493 @@ +// Copyright (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.ExternalCacheConnectionsClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheConnectionInner; +import com.azure.resourcemanager.netapp.implementation.models.ExternalCacheConnectionList; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionTagsUpdate; +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 ExternalCacheConnectionsClient. + */ +public final class ExternalCacheConnectionsClientImpl implements ExternalCacheConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExternalCacheConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ExternalCacheConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExternalCacheConnectionsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ExternalCacheConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientExternalCacheConnections to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientExternalCacheConnections") + public interface ExternalCacheConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalCacheConnectionInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalCacheConnectionInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalCacheConnectionTagsUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalCacheConnectionTagsUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections/{externalCacheConnectionName}") + @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("externalCacheConnectionName") String externalCacheConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalCacheConnections") + @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/externalCacheConnections") + @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/externalCacheConnections") + @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/externalCacheConnections") + @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 External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache Connection along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String externalCacheConnectionName) { + 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 (externalCacheConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter externalCacheConnectionName 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, externalCacheConnectionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache Connection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String externalCacheConnectionName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, externalCacheConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 External Cache Connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String externalCacheConnectionName, 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, accept, context); + } + + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache Connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalCacheConnectionInner getByResourceGroup(String resourceGroupName, + String externalCacheConnectionName) { + return getByResourceGroupWithResponse(resourceGroupName, externalCacheConnectionName, Context.NONE).getValue(); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String externalCacheConnectionName, ExternalCacheConnectionInner resource) { + 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 (externalCacheConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter externalCacheConnectionName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.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, externalCacheConnectionName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + String externalCacheConnectionName, ExternalCacheConnectionInner resource) { + 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, contentType, accept, + resource, Context.NONE); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + String externalCacheConnectionName, ExternalCacheConnectionInner resource, 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, contentType, accept, + resource, context); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalCacheConnectionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, externalCacheConnectionName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ExternalCacheConnectionInner.class, ExternalCacheConnectionInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalCacheConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, externalCacheConnectionName, resource); + return this.client.getLroResult(response, + ExternalCacheConnectionInner.class, ExternalCacheConnectionInner.class, Context.NONE); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalCacheConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionInner resource, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, externalCacheConnectionName, resource, context); + return this.client.getLroResult(response, + ExternalCacheConnectionInner.class, ExternalCacheConnectionInner.class, context); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String externalCacheConnectionName, ExternalCacheConnectionInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, externalCacheConnectionName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalCacheConnectionInner createOrUpdate(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionInner resource) { + return beginCreateOrUpdate(resourceGroupName, externalCacheConnectionName, resource).getFinalResult(); + } + + /** + * Create or update the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param resource 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalCacheConnectionInner createOrUpdate(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, externalCacheConnectionName, resource, context).getFinalResult(); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String externalCacheConnectionName, ExternalCacheConnectionTagsUpdate properties) { + 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 (externalCacheConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter externalCacheConnectionName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.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, externalCacheConnectionName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties) { + 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, contentType, accept, + properties, Context.NONE); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties, 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, contentType, accept, + properties, context); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalCacheConnectionInner> beginUpdateAsync( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionTagsUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, externalCacheConnectionName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ExternalCacheConnectionInner.class, ExternalCacheConnectionInner.class, + this.client.getContext()); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalCacheConnectionInner> beginUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionTagsUpdate properties) { + Response response = updateWithResponse(resourceGroupName, externalCacheConnectionName, properties); + return this.client.getLroResult(response, + ExternalCacheConnectionInner.class, ExternalCacheConnectionInner.class, Context.NONE); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection + * relationship between External and Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalCacheConnectionInner> beginUpdate( + String resourceGroupName, String externalCacheConnectionName, ExternalCacheConnectionTagsUpdate properties, + Context context) { + Response response + = updateWithResponse(resourceGroupName, externalCacheConnectionName, properties, context); + return this.client.getLroResult(response, + ExternalCacheConnectionInner.class, ExternalCacheConnectionInner.class, context); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, externalCacheConnectionName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalCacheConnectionInner update(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties) { + return beginUpdate(resourceGroupName, externalCacheConnectionName, properties).getFinalResult(); + } + + /** + * Patch the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @param properties 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 external Cache Connection resource, representing a cache connection relationship between External and + * Azure NetApp Files volumes. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalCacheConnectionInner update(String resourceGroupName, String externalCacheConnectionName, + ExternalCacheConnectionTagsUpdate properties, Context context) { + return beginUpdate(resourceGroupName, externalCacheConnectionName, properties, context).getFinalResult(); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalCacheConnectionName) { + 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 (externalCacheConnectionName == null) { + return Mono.error( + new IllegalArgumentException("Parameter externalCacheConnectionName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalCacheConnectionName) { + 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, Context.NONE); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 externalCacheConnectionName, + 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 (externalCacheConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheConnectionName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalCacheConnectionName, context); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalCacheConnectionName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, externalCacheConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalCacheConnectionName) { + Response response = deleteWithResponse(resourceGroupName, externalCacheConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 externalCacheConnectionName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, externalCacheConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 externalCacheConnectionName) { + return beginDeleteAsync(resourceGroupName, externalCacheConnectionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 externalCacheConnectionName) { + beginDelete(resourceGroupName, externalCacheConnectionName).getFinalResult(); + } + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 externalCacheConnectionName, Context context) { + beginDelete(resourceGroupName, externalCacheConnectionName, context).getFinalResult(); + } + + /** + * List all External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources 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 External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all External Cache Connections 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 list of External Cache Connection resources 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 list of External Cache Connection resources 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 list of External Cache Connection resources 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 list of External Cache Connection resources 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 list of External Cache Connection resources 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 list of External Cache Connection resources 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 list of External Cache Connection resources 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(ExternalCacheConnectionsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsImpl.java new file mode 100644 index 0000000000000..1fce9437df828 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsImpl.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.ExternalCacheConnectionsClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheConnectionInner; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnection; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnections; + +public final class ExternalCacheConnectionsImpl implements ExternalCacheConnections { + private static final ClientLogger LOGGER = new ClientLogger(ExternalCacheConnectionsImpl.class); + + private final ExternalCacheConnectionsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ExternalCacheConnectionsImpl(ExternalCacheConnectionsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String externalCacheConnectionName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, externalCacheConnectionName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalCacheConnectionImpl(inner.getValue(), this.manager())); + } + + public ExternalCacheConnection getByResourceGroup(String resourceGroupName, String externalCacheConnectionName) { + ExternalCacheConnectionInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, externalCacheConnectionName); + if (inner != null) { + return new ExternalCacheConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String externalCacheConnectionName) { + this.serviceClient().delete(resourceGroupName, externalCacheConnectionName); + } + + public void delete(String resourceGroupName, String externalCacheConnectionName, Context context) { + this.serviceClient().delete(resourceGroupName, externalCacheConnectionName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalCacheConnectionImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalCacheConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalCacheConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalCacheConnectionImpl(inner1, this.manager())); + } + + public ExternalCacheConnection 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 externalCacheConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "externalCacheConnections"); + if (externalCacheConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'externalCacheConnections'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, externalCacheConnectionName, 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 externalCacheConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "externalCacheConnections"); + if (externalCacheConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'externalCacheConnections'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, externalCacheConnectionName, 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 externalCacheConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "externalCacheConnections"); + if (externalCacheConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'externalCacheConnections'.", id))); + } + this.delete(resourceGroupName, externalCacheConnectionName, 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 externalCacheConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "externalCacheConnections"); + if (externalCacheConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'externalCacheConnections'.", id))); + } + this.delete(resourceGroupName, externalCacheConnectionName, context); + } + + private ExternalCacheConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ExternalCacheConnectionImpl define(String name) { + return new ExternalCacheConnectionImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheImpl.java new file mode 100644 index 0000000000000..1699d9c777d9e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheImpl.java @@ -0,0 +1,50 @@ +// Copyright (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.resourcemanager.netapp.fluent.models.ExternalCacheInner; +import com.azure.resourcemanager.netapp.models.ExternalCache; +import com.azure.resourcemanager.netapp.models.ExternalCacheProperties; + +public final class ExternalCacheImpl implements ExternalCache { + private ExternalCacheInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + ExternalCacheImpl(ExternalCacheInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ExternalCacheProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ExternalCacheInner 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/ExternalCachesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesClientImpl.java new file mode 100644 index 0000000000000..84a7d2c40d39f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesClientImpl.java @@ -0,0 +1,541 @@ +// Copyright (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.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.ExternalCachesClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheInner; +import com.azure.resourcemanager.netapp.implementation.models.ExternalCacheListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ExternalCachesClient. + */ +public final class ExternalCachesClientImpl implements ExternalCachesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExternalCachesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ExternalCachesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExternalCachesClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ExternalCachesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientExternalCaches to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientExternalCaches") + public interface ExternalCachesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}/externalCaches/{externalCacheResourceName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, + @PathParam("externalCacheResourceName") String externalCacheResourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}/externalCaches/{externalCacheResourceName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, + @PathParam("externalCacheResourceName") String externalCacheResourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}/externalCaches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}/externalCaches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @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 listByParentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String externalClusterName, String externalSvmName, String externalCacheResourceName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (externalCacheResourceName == null) { + return Mono.error( + new IllegalArgumentException("Parameter externalCacheResourceName 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, externalClusterName, externalSvmName, + externalCacheResourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String externalClusterName, + String externalSvmName, String externalCacheResourceName) { + return getWithResponseAsync(resourceGroupName, externalClusterName, externalSvmName, externalCacheResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @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 External Cache along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, String externalCacheResourceName, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (externalCacheResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter externalCacheResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, externalClusterName, externalSvmName, externalCacheResourceName, accept, context); + } + + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalCacheInner get(String resourceGroupName, String externalClusterName, String externalSvmName, + String externalCacheResourceName) { + return getWithResponse(resourceGroupName, externalClusterName, externalSvmName, externalCacheResourceName, + Context.NONE).getValue(); + } + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalCache list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String externalClusterName, String externalSvmName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, 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 External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalCache list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String resourceGroupName, String externalClusterName, + String externalSvmName) { + return new PagedFlux<>( + () -> listByParentSinglePageAsync(resourceGroupName, externalClusterName, externalSvmName), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalCache list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, + String externalClusterName, String externalSvmName) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByParentSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, externalClusterName, + externalSvmName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 ExternalCache list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, + String externalClusterName, String externalSvmName, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByParentSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, externalClusterName, + externalSvmName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalCache list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName) { + return new PagedIterable<>( + () -> listByParentSinglePage(resourceGroupName, externalClusterName, externalSvmName), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 ExternalCache list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName, Context context) { + return new PagedIterable<>( + () -> listByParentSinglePage(resourceGroupName, externalClusterName, externalSvmName, context), + nextLink -> listByParentNextSinglePage(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 ExternalCache list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(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.listByParentNext(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 ExternalCache list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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 ExternalCache list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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(ExternalCachesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesImpl.java new file mode 100644 index 0000000000000..c0bde3ccf42ed --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesImpl.java @@ -0,0 +1,71 @@ +// Copyright (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.ExternalCachesClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheInner; +import com.azure.resourcemanager.netapp.models.ExternalCache; +import com.azure.resourcemanager.netapp.models.ExternalCaches; + +public final class ExternalCachesImpl implements ExternalCaches { + private static final ClientLogger LOGGER = new ClientLogger(ExternalCachesImpl.class); + + private final ExternalCachesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ExternalCachesImpl(ExternalCachesClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, String externalCacheResourceName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, externalClusterName, externalSvmName, externalCacheResourceName, + context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalCacheImpl(inner.getValue(), this.manager())); + } + + public ExternalCache get(String resourceGroupName, String externalClusterName, String externalSvmName, + String externalCacheResourceName) { + ExternalCacheInner inner = this.serviceClient() + .get(resourceGroupName, externalClusterName, externalSvmName, externalCacheResourceName); + if (inner != null) { + return new ExternalCacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName, externalSvmName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalCacheImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName, Context context) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName, externalSvmName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalCacheImpl(inner1, this.manager())); + } + + private ExternalCachesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClusterImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClusterImpl.java new file mode 100644 index 0000000000000..b85f748fc0248 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClusterImpl.java @@ -0,0 +1,198 @@ +// Copyright (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.ExternalClusterInner; +import com.azure.resourcemanager.netapp.models.ExternalCluster; +import com.azure.resourcemanager.netapp.models.ExternalClusterProperties; +import com.azure.resourcemanager.netapp.models.ExternalClusterUpdate; +import com.azure.resourcemanager.netapp.models.ExternalClusterUpdateProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class ExternalClusterImpl implements ExternalCluster, ExternalCluster.Definition, ExternalCluster.Update { + private ExternalClusterInner 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 ExternalClusterProperties properties() { + return this.innerModel().properties(); + } + + 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 ExternalClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String externalClusterName; + + private ExternalClusterUpdate updateProperties; + + public ExternalClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ExternalCluster create() { + this.innerObject = serviceManager.serviceClient() + .getExternalClusters() + .createOrUpdate(resourceGroupName, externalClusterName, this.innerModel(), Context.NONE); + return this; + } + + public ExternalCluster create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalClusters() + .createOrUpdate(resourceGroupName, externalClusterName, this.innerModel(), context); + return this; + } + + ExternalClusterImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ExternalClusterInner(); + this.serviceManager = serviceManager; + this.externalClusterName = name; + } + + public ExternalClusterImpl update() { + this.updateProperties = new ExternalClusterUpdate(); + return this; + } + + public ExternalCluster apply() { + this.innerObject = serviceManager.serviceClient() + .getExternalClusters() + .update(resourceGroupName, externalClusterName, updateProperties, Context.NONE); + return this; + } + + public ExternalCluster apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalClusters() + .update(resourceGroupName, externalClusterName, updateProperties, context); + return this; + } + + ExternalClusterImpl(ExternalClusterInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.externalClusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "externalClusters"); + } + + public ExternalCluster refresh() { + this.innerObject = serviceManager.serviceClient() + .getExternalClusters() + .getByResourceGroupWithResponse(resourceGroupName, externalClusterName, Context.NONE) + .getValue(); + return this; + } + + public ExternalCluster refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalClusters() + .getByResourceGroupWithResponse(resourceGroupName, externalClusterName, context) + .getValue(); + return this; + } + + public ExternalClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ExternalClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ExternalClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public ExternalClusterImpl withProperties(ExternalClusterProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ExternalClusterImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateProperties.withIdentity(identity); + return this; + } + } + + public ExternalClusterImpl withProperties(ExternalClusterUpdateProperties properties) { + this.updateProperties.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/ExternalClustersClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersClientImpl.java new file mode 100644 index 0000000000000..34ccdc4b60fa0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersClientImpl.java @@ -0,0 +1,1469 @@ +// Copyright (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.ExternalClustersClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalClusterInner; +import com.azure.resourcemanager.netapp.implementation.models.ExternalClusterList; +import com.azure.resourcemanager.netapp.models.ExternalClusterUpdate; +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 ExternalClustersClient. + */ +public final class ExternalClustersClientImpl implements ExternalClustersClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExternalClustersService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ExternalClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExternalClustersClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ExternalClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientExternalClusters to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientExternalClusters") + public interface ExternalClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalClusterInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalClusterInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalClusterUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExternalClusterUpdate properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}") + @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("externalClusterName") String externalClusterName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters") + @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/externalClusters") + @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/externalClusters") + @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/externalClusters") + @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 External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String externalClusterName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName 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, externalClusterName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String externalClusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, externalClusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 External Cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String externalClusterName, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, accept, context); + } + + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalClusterInner getByResourceGroup(String resourceGroupName, String externalClusterName) { + return getByResourceGroupWithResponse(resourceGroupName, externalClusterName, Context.NONE).getValue(); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String externalClusterName, ExternalClusterInner resource) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.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, externalClusterName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, contentType, accept, resource, + Context.NONE); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, contentType, accept, resource, + context); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String externalClusterName, ExternalClusterInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, externalClusterName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExternalClusterInner.class, ExternalClusterInner.class, this.client.getContext()); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalClusterInner> + beginCreateOrUpdate(String resourceGroupName, String externalClusterName, ExternalClusterInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, externalClusterName, resource); + return this.client.getLroResult(response, + ExternalClusterInner.class, ExternalClusterInner.class, Context.NONE); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalClusterInner> beginCreateOrUpdate( + String resourceGroupName, String externalClusterName, ExternalClusterInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, externalClusterName, resource, context); + return this.client.getLroResult(response, + ExternalClusterInner.class, ExternalClusterInner.class, context); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, externalClusterName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalClusterInner createOrUpdate(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource) { + return beginCreateOrUpdate(resourceGroupName, externalClusterName, resource).getFinalResult(); + } + + /** + * Create or update the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param resource 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalClusterInner createOrUpdate(String resourceGroupName, String externalClusterName, + ExternalClusterInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, externalClusterName, resource, context).getFinalResult(); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String externalClusterName, ExternalClusterUpdate properties) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.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, externalClusterName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String externalClusterName, + ExternalClusterUpdate properties) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, contentType, accept, properties, + Context.NONE); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String externalClusterName, + ExternalClusterUpdate properties, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, contentType, accept, properties, + context); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalClusterInner> + beginUpdateAsync(String resourceGroupName, String externalClusterName, ExternalClusterUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, externalClusterName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExternalClusterInner.class, ExternalClusterInner.class, this.client.getContext()); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalClusterInner> beginUpdate(String resourceGroupName, + String externalClusterName, ExternalClusterUpdate properties) { + Response response = updateWithResponse(resourceGroupName, externalClusterName, properties); + return this.client.getLroResult(response, + ExternalClusterInner.class, ExternalClusterInner.class, Context.NONE); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external + * NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalClusterInner> beginUpdate(String resourceGroupName, + String externalClusterName, ExternalClusterUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, externalClusterName, properties, context); + return this.client.getLroResult(response, + ExternalClusterInner.class, ExternalClusterInner.class, context); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String externalClusterName, + ExternalClusterUpdate properties) { + return beginUpdateAsync(resourceGroupName, externalClusterName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalClusterInner update(String resourceGroupName, String externalClusterName, + ExternalClusterUpdate properties) { + return beginUpdate(resourceGroupName, externalClusterName, properties).getFinalResult(); + } + + /** + * Patch the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param properties 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 external Cluster resource, representing a cluster on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalClusterInner update(String resourceGroupName, String externalClusterName, + ExternalClusterUpdate properties, Context context) { + return beginUpdate(resourceGroupName, externalClusterName, properties, context).getFinalResult(); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, Context.NONE); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 externalClusterName, + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, context); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, externalClusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName) { + Response response = deleteWithResponse(resourceGroupName, externalClusterName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 externalClusterName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, externalClusterName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 externalClusterName) { + return beginDeleteAsync(resourceGroupName, externalClusterName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 externalClusterName) { + beginDelete(resourceGroupName, externalClusterName).getFinalResult(); + } + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 externalClusterName, Context context) { + beginDelete(resourceGroupName, externalClusterName, context).getFinalResult(); + } + + /** + * List all External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources 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 External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all External Clusters 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 list of External Cluster resources 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 list of External Cluster resources 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 list of External Cluster resources 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 list of External Cluster resources 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 list of External Cluster resources 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 list of External Cluster resources 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 list of External Cluster resources 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(ExternalClustersClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersImpl.java new file mode 100644 index 0000000000000..e6a00e48827fb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersImpl.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.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.ExternalClustersClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalClusterInner; +import com.azure.resourcemanager.netapp.models.ExternalCluster; +import com.azure.resourcemanager.netapp.models.ExternalClusters; + +public final class ExternalClustersImpl implements ExternalClusters { + private static final ClientLogger LOGGER = new ClientLogger(ExternalClustersImpl.class); + + private final ExternalClustersClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ExternalClustersImpl(ExternalClustersClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String externalClusterName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, externalClusterName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalClusterImpl(inner.getValue(), this.manager())); + } + + public ExternalCluster getByResourceGroup(String resourceGroupName, String externalClusterName) { + ExternalClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, externalClusterName); + if (inner != null) { + return new ExternalClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String externalClusterName) { + this.serviceClient().delete(resourceGroupName, externalClusterName); + } + + public void delete(String resourceGroupName, String externalClusterName, Context context) { + this.serviceClient().delete(resourceGroupName, externalClusterName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalClusterImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalClusterImpl(inner1, this.manager())); + } + + public ExternalCluster 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, externalClusterName, 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, externalClusterName, 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + this.delete(resourceGroupName, externalClusterName, 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + this.delete(resourceGroupName, externalClusterName, context); + } + + private ExternalClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ExternalClusterImpl define(String name) { + return new ExternalClusterImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmImpl.java new file mode 100644 index 0000000000000..f0b2d3bf42474 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmImpl.java @@ -0,0 +1,180 @@ +// Copyright (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.ExternalSvmInner; +import com.azure.resourcemanager.netapp.models.ExternalSvm; +import com.azure.resourcemanager.netapp.models.ExternalSvmProperties; +import com.azure.resourcemanager.netapp.models.ExternalSvmTagsUpdate; +import java.util.Collections; +import java.util.Map; + +public final class ExternalSvmImpl implements ExternalSvm, ExternalSvm.Definition, ExternalSvm.Update { + private ExternalSvmInner 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 ExternalSvmProperties properties() { + return this.innerModel().properties(); + } + + 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 ExternalSvmInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String externalClusterName; + + private String externalSvmName; + + private ExternalSvmTagsUpdate updateProperties; + + public ExternalSvmImpl withExistingExternalCluster(String resourceGroupName, String externalClusterName) { + this.resourceGroupName = resourceGroupName; + this.externalClusterName = externalClusterName; + return this; + } + + public ExternalSvm create() { + this.innerObject = serviceManager.serviceClient() + .getExternalSvms() + .createOrUpdate(resourceGroupName, externalClusterName, externalSvmName, this.innerModel(), Context.NONE); + return this; + } + + public ExternalSvm create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalSvms() + .createOrUpdate(resourceGroupName, externalClusterName, externalSvmName, this.innerModel(), context); + return this; + } + + ExternalSvmImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ExternalSvmInner(); + this.serviceManager = serviceManager; + this.externalSvmName = name; + } + + public ExternalSvmImpl update() { + this.updateProperties = new ExternalSvmTagsUpdate(); + return this; + } + + public ExternalSvm apply() { + this.innerObject = serviceManager.serviceClient() + .getExternalSvms() + .update(resourceGroupName, externalClusterName, externalSvmName, updateProperties, Context.NONE); + return this; + } + + public ExternalSvm apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalSvms() + .update(resourceGroupName, externalClusterName, externalSvmName, updateProperties, context); + return this; + } + + ExternalSvmImpl(ExternalSvmInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.externalClusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "externalClusters"); + this.externalSvmName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "externalSvms"); + } + + public ExternalSvm refresh() { + this.innerObject = serviceManager.serviceClient() + .getExternalSvms() + .getWithResponse(resourceGroupName, externalClusterName, externalSvmName, Context.NONE) + .getValue(); + return this; + } + + public ExternalSvm refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExternalSvms() + .getWithResponse(resourceGroupName, externalClusterName, externalSvmName, context) + .getValue(); + return this; + } + + public ExternalSvmImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ExternalSvmImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ExternalSvmImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public ExternalSvmImpl withProperties(ExternalSvmProperties 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/ExternalSvmsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsClientImpl.java new file mode 100644 index 0000000000000..44280aff58d6e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsClientImpl.java @@ -0,0 +1,1354 @@ +// Copyright (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.ExternalSvmsClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalSvmInner; +import com.azure.resourcemanager.netapp.implementation.models.ExternalSvmListResult; +import com.azure.resourcemanager.netapp.models.ExternalSvmTagsUpdate; +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 ExternalSvmsClient. + */ +public final class ExternalSvmsClientImpl implements ExternalSvmsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExternalSvmsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ExternalSvmsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExternalSvmsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ExternalSvmsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientExternalSvms to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientExternalSvms") + public interface ExternalSvmsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExternalSvmInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExternalSvmInner resource, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExternalSvmTagsUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExternalSvmTagsUpdate properties, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms/{externalSvmName}") + @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("externalClusterName") String externalClusterName, + @PathParam("externalSvmName") String externalSvmName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/externalSvms") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @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 listByParentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External SVM resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String externalClusterName, + String externalSvmName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalSvmName 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, externalClusterName, externalSvmName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External SVM resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String externalClusterName, + String externalSvmName) { + return getWithResponseAsync(resourceGroupName, externalClusterName, externalSvmName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 External SVM resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, externalClusterName, externalSvmName, accept, context); + } + + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External SVM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalSvmInner get(String resourceGroupName, String externalClusterName, String externalSvmName) { + return getWithResponse(resourceGroupName, externalClusterName, externalSvmName, Context.NONE).getValue(); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmInner resource) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.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, externalClusterName, externalSvmName, contentType, + accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, ExternalSvmInner resource) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, contentType, + accept, resource, Context.NONE); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, ExternalSvmInner resource, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, contentType, + accept, resource, context); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalSvmInner> beginCreateOrUpdateAsync( + String resourceGroupName, String externalClusterName, String externalSvmName, ExternalSvmInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, externalClusterName, externalSvmName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExternalSvmInner.class, ExternalSvmInner.class, this.client.getContext()); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalSvmInner> beginCreateOrUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, externalClusterName, externalSvmName, resource); + return this.client.getLroResult(response, ExternalSvmInner.class, + ExternalSvmInner.class, Context.NONE); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalSvmInner> beginCreateOrUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, externalClusterName, externalSvmName, resource, context); + return this.client.getLroResult(response, ExternalSvmInner.class, + ExternalSvmInner.class, context); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String externalClusterName, + String externalSvmName, ExternalSvmInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, externalClusterName, externalSvmName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalSvmInner createOrUpdate(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmInner resource) { + return beginCreateOrUpdate(resourceGroupName, externalClusterName, externalSvmName, resource).getFinalResult(); + } + + /** + * Create or update the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param resource 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalSvmInner createOrUpdate(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, externalClusterName, externalSvmName, resource, context) + .getFinalResult(); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmTagsUpdate properties) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.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, externalClusterName, externalSvmName, contentType, + accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, ExternalSvmTagsUpdate properties) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, contentType, + accept, properties, Context.NONE); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, ExternalSvmTagsUpdate properties, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, contentType, + accept, properties, context); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExternalSvmInner> beginUpdateAsync(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmTagsUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, externalClusterName, externalSvmName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExternalSvmInner.class, ExternalSvmInner.class, this.client.getContext()); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalSvmInner> beginUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmTagsUpdate properties) { + Response response + = updateWithResponse(resourceGroupName, externalClusterName, externalSvmName, properties); + return this.client.getLroResult(response, ExternalSvmInner.class, + ExternalSvmInner.class, Context.NONE); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, + * representing an SVM on an external NetApp ONTAP system. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExternalSvmInner> beginUpdate(String resourceGroupName, + String externalClusterName, String externalSvmName, ExternalSvmTagsUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, externalClusterName, externalSvmName, properties, context); + return this.client.getLroResult(response, ExternalSvmInner.class, + ExternalSvmInner.class, context); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String externalClusterName, + String externalSvmName, ExternalSvmTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, externalClusterName, externalSvmName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalSvmInner update(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmTagsUpdate properties) { + return beginUpdate(resourceGroupName, externalClusterName, externalSvmName, properties).getFinalResult(); + } + + /** + * Patch the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param properties 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 external SVM (Storage Virtual Machine, Vserver) resource, representing an SVM on an external NetApp ONTAP + * system. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExternalSvmInner update(String resourceGroupName, String externalClusterName, String externalSvmName, + ExternalSvmTagsUpdate properties, Context context) { + return beginUpdate(resourceGroupName, externalClusterName, externalSvmName, properties, context) + .getFinalResult(); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName, String externalSvmName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName, + String externalSvmName) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, Context.NONE); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 externalClusterName, + String externalSvmName, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (externalSvmName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalSvmName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, externalSvmName, context); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName, + String externalSvmName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, externalClusterName, externalSvmName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 externalClusterName, + String externalSvmName) { + Response response = deleteWithResponse(resourceGroupName, externalClusterName, externalSvmName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 externalClusterName, + String externalSvmName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, externalClusterName, externalSvmName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 externalClusterName, String externalSvmName) { + return beginDeleteAsync(resourceGroupName, externalClusterName, externalSvmName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 externalClusterName, String externalSvmName) { + beginDelete(resourceGroupName, externalClusterName, externalSvmName).getFinalResult(); + } + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 externalClusterName, String externalSvmName, Context context) { + beginDelete(resourceGroupName, externalClusterName, externalSvmName, context).getFinalResult(); + } + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalSvm list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String externalClusterName) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, 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 External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalSvm list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String resourceGroupName, String externalClusterName) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, externalClusterName), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalSvm list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, + String externalClusterName) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ExternalSvm list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, String externalClusterName, + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExternalSvm list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, externalClusterName), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ExternalSvm list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + Context context) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, externalClusterName, context), + nextLink -> listByParentNextSinglePage(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 ExternalSvm list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(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.listByParentNext(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 ExternalSvm list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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 ExternalSvm list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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(ExternalSvmsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsImpl.java new file mode 100644 index 0000000000000..26caa41a62275 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsImpl.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.ExternalSvmsClient; +import com.azure.resourcemanager.netapp.fluent.models.ExternalSvmInner; +import com.azure.resourcemanager.netapp.models.ExternalSvm; +import com.azure.resourcemanager.netapp.models.ExternalSvms; + +public final class ExternalSvmsImpl implements ExternalSvms { + private static final ClientLogger LOGGER = new ClientLogger(ExternalSvmsImpl.class); + + private final ExternalSvmsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public ExternalSvmsImpl(ExternalSvmsClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, externalClusterName, externalSvmName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalSvmImpl(inner.getValue(), this.manager())); + } + + public ExternalSvm get(String resourceGroupName, String externalClusterName, String externalSvmName) { + ExternalSvmInner inner = this.serviceClient().get(resourceGroupName, externalClusterName, externalSvmName); + if (inner != null) { + return new ExternalSvmImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String externalClusterName, String externalSvmName) { + this.serviceClient().delete(resourceGroupName, externalClusterName, externalSvmName); + } + + public void delete(String resourceGroupName, String externalClusterName, String externalSvmName, Context context) { + this.serviceClient().delete(resourceGroupName, externalClusterName, externalSvmName, context); + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalSvmImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExternalSvmImpl(inner1, this.manager())); + } + + public ExternalSvm 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + String externalSvmName = ResourceManagerUtils.getValueFromIdByName(id, "externalSvms"); + if (externalSvmName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalSvms'.", id))); + } + return this.getWithResponse(resourceGroupName, externalClusterName, externalSvmName, 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + String externalSvmName = ResourceManagerUtils.getValueFromIdByName(id, "externalSvms"); + if (externalSvmName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalSvms'.", id))); + } + return this.getWithResponse(resourceGroupName, externalClusterName, externalSvmName, 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + String externalSvmName = ResourceManagerUtils.getValueFromIdByName(id, "externalSvms"); + if (externalSvmName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalSvms'.", id))); + } + this.delete(resourceGroupName, externalClusterName, externalSvmName, 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 externalClusterName = ResourceManagerUtils.getValueFromIdByName(id, "externalClusters"); + if (externalClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalClusters'.", id))); + } + String externalSvmName = ResourceManagerUtils.getValueFromIdByName(id, "externalSvms"); + if (externalSvmName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'externalSvms'.", id))); + } + this.delete(resourceGroupName, externalClusterName, externalSvmName, context); + } + + private ExternalSvmsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ExternalSvmImpl define(String name) { + return new ExternalSvmImpl(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 6b3e284b11155..32a7cfd6fb758 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 @@ -13,6 +13,8 @@ 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; @@ -79,6 +81,10 @@ public List activeDirectories() { } } + public EntraIdConfig entraIdConfig() { + return this.innerModel().entraIdConfig(); + } + public AccountEncryption encryption() { return this.innerModel().encryption(); } @@ -272,6 +278,11 @@ public NetAppAccountImpl withActiveDirectories(List activeDirec } } + public NetAppAccountImpl withEntraIdConfig(EntraIdConfig entraIdConfig) { + this.innerModel().withEntraIdConfig(entraIdConfig); + return this; + } + public NetAppAccountImpl withEncryption(AccountEncryption encryption) { this.innerModel().withEncryption(encryption); return this; @@ -297,6 +308,11 @@ public NetAppAccountImpl withEncryption(AccountEncryptionPatch encryption) { return this; } + public NetAppAccountImpl withEntraIdConfig(EntraIdConfigPatch entraIdConfig) { + this.updateBody.withEntraIdConfig(entraIdConfig); + return this; + } + public NetAppAccountImpl withLdapConfiguration(LdapConfigurationPatch ldapConfiguration) { this.updateBody.withLdapConfiguration(ldapConfiguration); return this; 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 eebcb8427cc8c..034a8ca62768a 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,19 @@ 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.ClusterPeersClient; +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.ExternalCacheConnectionsClient; +import com.azure.resourcemanager.netapp.fluent.ExternalCachesClient; +import com.azure.resourcemanager.netapp.fluent.ExternalClustersClient; +import com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; @@ -47,6 +61,7 @@ import com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient; import com.azure.resourcemanager.netapp.fluent.SnapshotsClient; import com.azure.resourcemanager.netapp.fluent.SubvolumesClient; +import com.azure.resourcemanager.netapp.fluent.SvmPeersClient; import com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient; import com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient; import com.azure.resourcemanager.netapp.fluent.VolumesClient; @@ -330,6 +345,216 @@ 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 ExternalClustersClient object to access its operations. + */ + private final ExternalClustersClient externalClusters; + + /** + * Gets the ExternalClustersClient object to access its operations. + * + * @return the ExternalClustersClient object. + */ + public ExternalClustersClient getExternalClusters() { + return this.externalClusters; + } + + /** + * The ClusterPeersClient object to access its operations. + */ + private final ClusterPeersClient clusterPeers; + + /** + * Gets the ClusterPeersClient object to access its operations. + * + * @return the ClusterPeersClient object. + */ + public ClusterPeersClient getClusterPeers() { + return this.clusterPeers; + } + + /** + * The ExternalSvmsClient object to access its operations. + */ + private final ExternalSvmsClient externalSvms; + + /** + * Gets the ExternalSvmsClient object to access its operations. + * + * @return the ExternalSvmsClient object. + */ + public ExternalSvmsClient getExternalSvms() { + return this.externalSvms; + } + + /** + * The SvmPeersClient object to access its operations. + */ + private final SvmPeersClient svmPeers; + + /** + * Gets the SvmPeersClient object to access its operations. + * + * @return the SvmPeersClient object. + */ + public SvmPeersClient getSvmPeers() { + return this.svmPeers; + } + + /** + * The ExternalCachesClient object to access its operations. + */ + private final ExternalCachesClient externalCaches; + + /** + * Gets the ExternalCachesClient object to access its operations. + * + * @return the ExternalCachesClient object. + */ + public ExternalCachesClient getExternalCaches() { + return this.externalCaches; + } + + /** + * The ExternalCacheConnectionsClient object to access its operations. + */ + private final ExternalCacheConnectionsClient externalCacheConnections; + + /** + * Gets the ExternalCacheConnectionsClient object to access its operations. + * + * @return the ExternalCacheConnectionsClient object. + */ + public ExternalCacheConnectionsClient getExternalCacheConnections() { + return this.externalCacheConnections; + } + /** * The NetAppResourceQuotaLimitsClient object to access its operations. */ @@ -487,7 +712,7 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-08-01"; + this.apiVersion = "2026-08-15-preview"; this.operations = new OperationsClientImpl(this); this.netAppResourceQuotaLimitsAccounts = new NetAppResourceQuotaLimitsAccountsClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); @@ -501,6 +726,21 @@ 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.externalClusters = new ExternalClustersClientImpl(this); + this.clusterPeers = new ClusterPeersClientImpl(this); + this.externalSvms = new ExternalSvmsClientImpl(this); + this.svmPeers = new SvmPeersClientImpl(this); + this.externalCaches = new ExternalCachesClientImpl(this); + this.externalCacheConnections = new ExternalCacheConnectionsClientImpl(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/SvmPeerImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerImpl.java new file mode 100644 index 0000000000000..5f8d5c9de3d29 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerInner; +import com.azure.resourcemanager.netapp.models.SvmPeer; +import com.azure.resourcemanager.netapp.models.SvmPeerProperties; + +public final class SvmPeerImpl implements SvmPeer { + private SvmPeerInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + SvmPeerImpl(SvmPeerInner innerObject, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SvmPeerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public SvmPeerInner 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/SvmPeersClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersClientImpl.java new file mode 100644 index 0000000000000..b8ee9c7c041cb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersClientImpl.java @@ -0,0 +1,520 @@ +// Copyright (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.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.netapp.fluent.SvmPeersClient; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerInner; +import com.azure.resourcemanager.netapp.implementation.models.SvmPeerListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SvmPeersClient. + */ +public final class SvmPeersClientImpl implements SvmPeersClient { + /** + * The proxy service used to perform REST calls. + */ + private final SvmPeersService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of SvmPeersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SvmPeersClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(SvmPeersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientSvmPeers to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientSvmPeers") + public interface SvmPeersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers/{peerId}/svmPeers/{svmPeerId}") + @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("externalClusterName") String externalClusterName, @PathParam("peerId") String peerId, + @PathParam("svmPeerId") String svmPeerId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers/{peerId}/svmPeers/{svmPeerId}") + @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("externalClusterName") String externalClusterName, @PathParam("peerId") String peerId, + @PathParam("svmPeerId") String svmPeerId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers/{peerId}/svmPeers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, @PathParam("peerId") String peerId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/externalClusters/{externalClusterName}/clusterPeers/{peerId}/svmPeers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("externalClusterName") String externalClusterName, @PathParam("peerId") String peerId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @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 listByParentNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the SVM Peer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String externalClusterName, + String peerId, String svmPeerId) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + return Mono.error(new IllegalArgumentException("Parameter peerId is required and cannot be null.")); + } + if (svmPeerId == null) { + return Mono.error(new IllegalArgumentException("Parameter svmPeerId 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, externalClusterName, peerId, svmPeerId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the SVM Peer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String externalClusterName, String peerId, + String svmPeerId) { + return getWithResponseAsync(resourceGroupName, externalClusterName, peerId, svmPeerId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @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 SVM Peer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + String svmPeerId, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter peerId is required and cannot be null.")); + } + if (svmPeerId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter svmPeerId is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, externalClusterName, peerId, svmPeerId, accept, context); + } + + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the SVM Peer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SvmPeerInner get(String resourceGroupName, String externalClusterName, String peerId, String svmPeerId) { + return getWithResponse(resourceGroupName, externalClusterName, peerId, svmPeerId, Context.NONE).getValue(); + } + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 SvmPeer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String externalClusterName, String peerId) { + 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 (externalClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + return Mono.error(new IllegalArgumentException("Parameter peerId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, peerId, 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 SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 SvmPeer list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String resourceGroupName, String externalClusterName, + String peerId) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, externalClusterName, peerId), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 SvmPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, String externalClusterName, + String peerId) { + 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter peerId is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, peerId, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 SvmPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, String externalClusterName, + String peerId, 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 (externalClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter externalClusterName is required and cannot be null.")); + } + if (peerId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter peerId is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, externalClusterName, peerId, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 SvmPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String peerId) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, externalClusterName, peerId), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 SvmPeer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId, + Context context) { + return new PagedIterable<>( + () -> listByParentSinglePage(resourceGroupName, externalClusterName, peerId, context), + nextLink -> listByParentNextSinglePage(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 SvmPeer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(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.listByParentNext(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 SvmPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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 SvmPeer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(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.listByParentNextSync(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(SvmPeersClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersImpl.java new file mode 100644 index 0000000000000..c10cad368cf78 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersImpl.java @@ -0,0 +1,67 @@ +// Copyright (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.SvmPeersClient; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerInner; +import com.azure.resourcemanager.netapp.models.SvmPeer; +import com.azure.resourcemanager.netapp.models.SvmPeers; + +public final class SvmPeersImpl implements SvmPeers { + private static final ClientLogger LOGGER = new ClientLogger(SvmPeersImpl.class); + + private final SvmPeersClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public SvmPeersImpl(SvmPeersClient innerClient, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + String svmPeerId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, externalClusterName, peerId, svmPeerId, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SvmPeerImpl(inner.getValue(), this.manager())); + } + + public SvmPeer get(String resourceGroupName, String externalClusterName, String peerId, String svmPeerId) { + SvmPeerInner inner = this.serviceClient().get(resourceGroupName, externalClusterName, peerId, svmPeerId); + if (inner != null) { + return new SvmPeerImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName, peerId); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SvmPeerImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId, + Context context) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, externalClusterName, peerId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SvmPeerImpl(inner1, this.manager())); + } + + private SvmPeersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java index 3d7b5ddb758e7..70050767c6079 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 @@ -10,6 +10,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; import com.azure.resourcemanager.netapp.models.AuthorizeRequest; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; @@ -23,6 +24,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; @@ -38,9 +41,13 @@ 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.SmbOplocks; 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.VolumeNamespaceProperties; import com.azure.resourcemanager.netapp.models.VolumePatch; +import com.azure.resourcemanager.netapp.models.VolumePatchNamespaceProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; @@ -220,6 +227,10 @@ public Boolean smbContinuouslyAvailable() { return this.innerModel().smbContinuouslyAvailable(); } + public SmbOplocks smbOplocks() { + return this.innerModel().smbOplocks(); + } + public Float throughputMibps() { return this.innerModel().throughputMibps(); } @@ -240,6 +251,10 @@ public Boolean ldapEnabled() { return this.innerModel().ldapEnabled(); } + public LdapServerType ldapServerType() { + return this.innerModel().ldapServerType(); + } + public Boolean coolAccess() { return this.innerModel().coolAccess(); } @@ -285,6 +300,10 @@ public Boolean isDefaultQuotaEnabled() { return this.innerModel().isDefaultQuotaEnabled(); } + public AsyncDirectoryDelete asyncDirectoryDelete() { + return this.innerModel().asyncDirectoryDelete(); + } + public Long defaultUserQuotaInKiBs() { return this.innerModel().defaultUserQuotaInKiBs(); } @@ -342,6 +361,10 @@ public Boolean isLargeVolume() { return this.innerModel().isLargeVolume(); } + public LargeVolumeType largeVolumeType() { + return this.innerModel().largeVolumeType(); + } + public String originatingResourceId() { return this.innerModel().originatingResourceId(); } @@ -350,10 +373,18 @@ public Long inheritedSizeInBytes() { return this.innerModel().inheritedSizeInBytes(); } + public VolumeLanguage language() { + return this.innerModel().language(); + } + public BreakthroughMode breakthroughMode() { return this.innerModel().breakthroughMode(); } + public VolumeNamespaceProperties geoNamespaceProperties() { + return this.innerModel().geoNamespaceProperties(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -797,6 +828,16 @@ public VolumeImpl withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable) return this; } + public VolumeImpl withSmbOplocks(SmbOplocks smbOplocks) { + if (isInCreateMode()) { + this.innerModel().withSmbOplocks(smbOplocks); + return this; + } else { + this.updateBody.withSmbOplocks(smbOplocks); + return this; + } + } + public VolumeImpl withThroughputMibps(Float throughputMibps) { if (isInCreateMode()) { this.innerModel().withThroughputMibps(throughputMibps); @@ -822,6 +863,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); @@ -887,6 +933,16 @@ public VolumeImpl withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { } } + public VolumeImpl withAsyncDirectoryDelete(AsyncDirectoryDelete asyncDirectoryDelete) { + if (isInCreateMode()) { + this.innerModel().withAsyncDirectoryDelete(asyncDirectoryDelete); + return this; + } else { + this.updateBody.withAsyncDirectoryDelete(asyncDirectoryDelete); + return this; + } + } + public VolumeImpl withDefaultUserQuotaInKiBs(Long defaultUserQuotaInKiBs) { if (isInCreateMode()) { this.innerModel().withDefaultUserQuotaInKiBs(defaultUserQuotaInKiBs); @@ -937,11 +993,26 @@ 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; } + public VolumeImpl withGeoNamespaceProperties(VolumeNamespaceProperties geoNamespaceProperties) { + this.innerModel().withGeoNamespaceProperties(geoNamespaceProperties); + return this; + } + public VolumeImpl withUsageThreshold(Long usageThreshold) { this.updateBody.withUsageThreshold(usageThreshold); return this; @@ -957,6 +1028,11 @@ public VolumeImpl withDataProtection(VolumePatchPropertiesDataProtection dataPro return this; } + public VolumeImpl withGeoNamespaceProperties(VolumePatchNamespaceProperties geoNamespaceProperties) { + this.updateBody.withGeoNamespaceProperties(geoNamespaceProperties); + 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/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 0000000000000..c4156bf746f6c --- /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/ClusterPeerListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ClusterPeerListResult.java new file mode 100644 index 0000000000000..f8b2d51d5924d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ClusterPeerListResult.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.ClusterPeerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ClusterPeer list operation. + */ +@Immutable +public final class ClusterPeerListResult implements JsonSerializable { + /* + * The ClusterPeer items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ClusterPeerListResult class. + */ + private ClusterPeerListResult() { + } + + /** + * Get the value property: The ClusterPeer 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 ClusterPeerListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterPeerListResult.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 ClusterPeerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterPeerListResult 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 ClusterPeerListResult. + */ + public static ClusterPeerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterPeerListResult deserializedClusterPeerListResult = new ClusterPeerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ClusterPeerInner.fromJson(reader1)); + deserializedClusterPeerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedClusterPeerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterPeerListResult; + }); + } +} 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 0000000000000..39dc1ba7e3414 --- /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 0000000000000..0667488f7b956 --- /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 0000000000000..aaaed85dae68d --- /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 0000000000000..a81d1b7f1925c --- /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 0000000000000..9eccce4ead039 --- /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 0000000000000..c8fbd65c62040 --- /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 0000000000000..b67a4f4bcf8c8 --- /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 0000000000000..e14266cfa95ee --- /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 0000000000000..9ef3accbd8b3b --- /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/implementation/models/ExternalCacheConnectionList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalCacheConnectionList.java new file mode 100644 index 0000000000000..b34b68fd87408 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalCacheConnectionList.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.ExternalCacheConnectionInner; +import java.io.IOException; +import java.util.List; + +/** + * List of External Cache Connection resources. + */ +@Immutable +public final class ExternalCacheConnectionList implements JsonSerializable { + /* + * The ExternalCacheConnection items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExternalCacheConnectionList class. + */ + private ExternalCacheConnectionList() { + } + + /** + * Get the value property: The ExternalCacheConnection 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 ExternalCacheConnectionList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalCacheConnectionList.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 ExternalCacheConnectionList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheConnectionList 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 ExternalCacheConnectionList. + */ + public static ExternalCacheConnectionList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheConnectionList deserializedExternalCacheConnectionList = new ExternalCacheConnectionList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExternalCacheConnectionInner.fromJson(reader1)); + deserializedExternalCacheConnectionList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExternalCacheConnectionList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheConnectionList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalCacheListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalCacheListResult.java new file mode 100644 index 0000000000000..1a6d895729841 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalCacheListResult.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.ExternalCacheInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExternalCache list operation. + */ +@Immutable +public final class ExternalCacheListResult implements JsonSerializable { + /* + * The ExternalCache items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExternalCacheListResult class. + */ + private ExternalCacheListResult() { + } + + /** + * Get the value property: The ExternalCache 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 ExternalCacheListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalCacheListResult.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 ExternalCacheListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheListResult 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 ExternalCacheListResult. + */ + public static ExternalCacheListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheListResult deserializedExternalCacheListResult = new ExternalCacheListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ExternalCacheInner.fromJson(reader1)); + deserializedExternalCacheListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExternalCacheListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalClusterList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalClusterList.java new file mode 100644 index 0000000000000..65c8ff96baa38 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalClusterList.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.ExternalClusterInner; +import java.io.IOException; +import java.util.List; + +/** + * List of External Cluster resources. + */ +@Immutable +public final class ExternalClusterList implements JsonSerializable { + /* + * The ExternalCluster items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExternalClusterList class. + */ + private ExternalClusterList() { + } + + /** + * Get the value property: The ExternalCluster 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 ExternalClusterList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalClusterList.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 ExternalClusterList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalClusterList 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 ExternalClusterList. + */ + public static ExternalClusterList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalClusterList deserializedExternalClusterList = new ExternalClusterList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExternalClusterInner.fromJson(reader1)); + deserializedExternalClusterList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExternalClusterList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalClusterList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalSvmListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalSvmListResult.java new file mode 100644 index 0000000000000..f08815d398ce7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalSvmListResult.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.ExternalSvmInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExternalSvm list operation. + */ +@Immutable +public final class ExternalSvmListResult implements JsonSerializable { + /* + * The ExternalSvm items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExternalSvmListResult class. + */ + private ExternalSvmListResult() { + } + + /** + * Get the value property: The ExternalSvm 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 ExternalSvmListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalSvmListResult.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 ExternalSvmListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalSvmListResult 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 ExternalSvmListResult. + */ + public static ExternalSvmListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalSvmListResult deserializedExternalSvmListResult = new ExternalSvmListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ExternalSvmInner.fromJson(reader1)); + deserializedExternalSvmListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExternalSvmListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalSvmListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/SvmPeerListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/SvmPeerListResult.java new file mode 100644 index 0000000000000..b8abed8a65459 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/SvmPeerListResult.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.SvmPeerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a SvmPeer list operation. + */ +@Immutable +public final class SvmPeerListResult implements JsonSerializable { + /* + * The SvmPeer items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of SvmPeerListResult class. + */ + private SvmPeerListResult() { + } + + /** + * Get the value property: The SvmPeer 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 SvmPeerListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SvmPeerListResult.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 SvmPeerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SvmPeerListResult 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 SvmPeerListResult. + */ + public static SvmPeerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SvmPeerListResult deserializedSvmPeerListResult = new SvmPeerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SvmPeerInner.fromJson(reader1)); + deserializedSvmPeerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSvmPeerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSvmPeerListResult; + }); + } +} 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 0000000000000..f791224f4e969 --- /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 0000000000000..5d427b5196c1d --- /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 0000000000000..bbd3b59567000 --- /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 0000000000000..bcf5c74329a32 --- /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 0000000000000..512c71a48c3a8 --- /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/AsyncDirectoryDelete.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AsyncDirectoryDelete.java new file mode 100644 index 0000000000000..8086ef44ca16a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AsyncDirectoryDelete.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; + +/** + * Async Directory Delete configuration for the volume. + */ +@Fluent +public final class AsyncDirectoryDelete implements JsonSerializable { + /* + * Specifies whether Async Directory Delete is enabled for the volume. + */ + private AsyncDirectoryDeleteStatus status; + + /* + * The name of the Trash bin folder for deleted files. Max length of 255. Must contain at least one alphanumeric + * character (A-Z, a-z, 0-9) and may include dots (.), underscores (_), and hyphens (-). + */ + private String trashBinName; + + /** + * Creates an instance of AsyncDirectoryDelete class. + */ + public AsyncDirectoryDelete() { + } + + /** + * Get the status property: Specifies whether Async Directory Delete is enabled for the volume. + * + * @return the status value. + */ + public AsyncDirectoryDeleteStatus status() { + return this.status; + } + + /** + * Set the status property: Specifies whether Async Directory Delete is enabled for the volume. + * + * @param status the status value to set. + * @return the AsyncDirectoryDelete object itself. + */ + public AsyncDirectoryDelete withStatus(AsyncDirectoryDeleteStatus status) { + this.status = status; + return this; + } + + /** + * Get the trashBinName property: The name of the Trash bin folder for deleted files. Max length of 255. Must + * contain at least one alphanumeric character (A-Z, a-z, 0-9) and may include dots (.), underscores (_), and + * hyphens (-). + * + * @return the trashBinName value. + */ + public String trashBinName() { + return this.trashBinName; + } + + /** + * Set the trashBinName property: The name of the Trash bin folder for deleted files. Max length of 255. Must + * contain at least one alphanumeric character (A-Z, a-z, 0-9) and may include dots (.), underscores (_), and + * hyphens (-). + * + * @param trashBinName the trashBinName value to set. + * @return the AsyncDirectoryDelete object itself. + */ + public AsyncDirectoryDelete withTrashBinName(String trashBinName) { + this.trashBinName = trashBinName; + 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("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("trashBinName", this.trashBinName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AsyncDirectoryDelete from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AsyncDirectoryDelete 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 AsyncDirectoryDelete. + */ + public static AsyncDirectoryDelete fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AsyncDirectoryDelete deserializedAsyncDirectoryDelete = new AsyncDirectoryDelete(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedAsyncDirectoryDelete.status = AsyncDirectoryDeleteStatus.fromString(reader.getString()); + } else if ("trashBinName".equals(fieldName)) { + deserializedAsyncDirectoryDelete.trashBinName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAsyncDirectoryDelete; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AsyncDirectoryDeleteStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AsyncDirectoryDeleteStatus.java new file mode 100644 index 0000000000000..bc0890f6bf725 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AsyncDirectoryDeleteStatus.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; + +/** + * Whether Async Directory Delete is enabled for the volume. + */ +public final class AsyncDirectoryDeleteStatus extends ExpandableStringEnum { + /** + * Async Directory Delete is enabled. + */ + public static final AsyncDirectoryDeleteStatus ENABLED = fromString("Enabled"); + + /** + * Async Directory Delete is disabled. + */ + public static final AsyncDirectoryDeleteStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AsyncDirectoryDeleteStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AsyncDirectoryDeleteStatus() { + } + + /** + * Creates or finds a AsyncDirectoryDeleteStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding AsyncDirectoryDeleteStatus. + */ + public static AsyncDirectoryDeleteStatus fromString(String name) { + return fromString(name, AsyncDirectoryDeleteStatus.class); + } + + /** + * Gets known AsyncDirectoryDeleteStatus values. + * + * @return known AsyncDirectoryDeleteStatus values. + */ + public static Collection values() { + return values(AsyncDirectoryDeleteStatus.class); + } +} 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 cb345a4eb4958..abe1b1ed9488f 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 fee779b57f66d..8dad9c50f96b2 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 5b72460c559e1..32b16041a945b 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 0000000000000..3b1409dad2b9d --- /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 0000000000000..5af7e272e2e4f --- /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 0000000000000..166f957b4018a --- /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 0000000000000..b12b14137a726 --- /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/ClusterPeer.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeer.java new file mode 100644 index 0000000000000..8e8cb24659377 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeer.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.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerInner; + +/** + * An immutable client-side representation of ClusterPeer. + */ +public interface ClusterPeer { + /** + * 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. + */ + ClusterPeerProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ClusterPeerInner object. + * + * @return the inner object. + */ + ClusterPeerInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerProperties.java new file mode 100644 index 0000000000000..adf63ca265842 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerProperties.java @@ -0,0 +1,235 @@ +// Copyright (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; +import java.util.List; + +/** + * Cluster Peer properties. + */ +@Immutable +public final class ClusterPeerProperties implements JsonSerializable { + /* + * Azure lifecycle management + */ + private ProvisioningState provisioningState; + + /* + * Name of the Azure NetApp Files (ANF) cluster + */ + private String anfClusterName; + + /* + * Name of the external ONTAP cluster, discovered during cluster peering + */ + private String ontapClusterName; + + /* + * The ONTAP version of the external cluster. + */ + private String ontapVersion; + + /* + * Status of the peer relationship + */ + private ClusterPeerStatus status; + + /* + * External volume replication resource IDs + */ + private List hybridReplicationResourceIds; + + /* + * External cache connection resource IDs + */ + private List externalCacheConnectionResourceIds; + + /* + * Command to execute to create the peer relationship + */ + private String command; + + /* + * Network interfaces created that allow communications between the clusters + */ + private List networkInterfaces; + + /* + * Cluster Peer Subnet Resource ID + */ + private String clusterPeerSubnetResourceId; + + /** + * Creates an instance of ClusterPeerProperties class. + */ + private ClusterPeerProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the anfClusterName property: Name of the Azure NetApp Files (ANF) cluster. + * + * @return the anfClusterName value. + */ + public String anfClusterName() { + return this.anfClusterName; + } + + /** + * Get the ontapClusterName property: Name of the external ONTAP cluster, discovered during cluster peering. + * + * @return the ontapClusterName value. + */ + public String ontapClusterName() { + return this.ontapClusterName; + } + + /** + * Get the ontapVersion property: The ONTAP version of the external cluster. + * + * @return the ontapVersion value. + */ + public String ontapVersion() { + return this.ontapVersion; + } + + /** + * Get the status property: Status of the peer relationship. + * + * @return the status value. + */ + public ClusterPeerStatus status() { + return this.status; + } + + /** + * Get the hybridReplicationResourceIds property: External volume replication resource IDs. + * + * @return the hybridReplicationResourceIds value. + */ + public List hybridReplicationResourceIds() { + return this.hybridReplicationResourceIds; + } + + /** + * Get the externalCacheConnectionResourceIds property: External cache connection resource IDs. + * + * @return the externalCacheConnectionResourceIds value. + */ + public List externalCacheConnectionResourceIds() { + return this.externalCacheConnectionResourceIds; + } + + /** + * Get the command property: Command to execute to create the peer relationship. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Get the networkInterfaces property: Network interfaces created that allow communications between the clusters. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Get the clusterPeerSubnetResourceId property: Cluster Peer Subnet Resource ID. + * + * @return the clusterPeerSubnetResourceId value. + */ + public String clusterPeerSubnetResourceId() { + return this.clusterPeerSubnetResourceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkInterfaces() != null) { + networkInterfaces().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ClusterPeerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ClusterPeerProperties 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 ClusterPeerProperties. + */ + public static ClusterPeerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ClusterPeerProperties deserializedClusterPeerProperties = new ClusterPeerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedClusterPeerProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("anfClusterName".equals(fieldName)) { + deserializedClusterPeerProperties.anfClusterName = reader.getString(); + } else if ("ontapClusterName".equals(fieldName)) { + deserializedClusterPeerProperties.ontapClusterName = reader.getString(); + } else if ("ontapVersion".equals(fieldName)) { + deserializedClusterPeerProperties.ontapVersion = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedClusterPeerProperties.status = ClusterPeerStatus.fromString(reader.getString()); + } else if ("hybridReplicationResourceIds".equals(fieldName)) { + List hybridReplicationResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterPeerProperties.hybridReplicationResourceIds = hybridReplicationResourceIds; + } else if ("externalCacheConnectionResourceIds".equals(fieldName)) { + List externalCacheConnectionResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedClusterPeerProperties.externalCacheConnectionResourceIds + = externalCacheConnectionResourceIds; + } else if ("command".equals(fieldName)) { + deserializedClusterPeerProperties.command = reader.getString(); + } else if ("networkInterfaces".equals(fieldName)) { + List networkInterfaces + = reader.readArray(reader1 -> ExternalResourceNetworkInterfaces.fromJson(reader1)); + deserializedClusterPeerProperties.networkInterfaces = networkInterfaces; + } else if ("clusterPeerSubnetResourceId".equals(fieldName)) { + deserializedClusterPeerProperties.clusterPeerSubnetResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedClusterPeerProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerStatus.java new file mode 100644 index 0000000000000..a7e1bf306f0c7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Cluster Peer status enum. + */ +public final class ClusterPeerStatus extends ExpandableStringEnum { + /** + * Active peering. + */ + public static final ClusterPeerStatus ACTIVE = fromString("Active"); + + /** + * Error state, an error occurred during peering, the error details can be seen by running this command on the + * external ONTAP cluster for more details (command: cluster peer show). + */ + public static final ClusterPeerStatus ERROR = fromString("Error"); + + /** + * Pending state, the peering needs to be accepted on your cluster. + */ + public static final ClusterPeerStatus PENDING = fromString("Pending"); + + /** + * Creates a new instance of ClusterPeerStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterPeerStatus() { + } + + /** + * Creates or finds a ClusterPeerStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterPeerStatus. + */ + public static ClusterPeerStatus fromString(String name) { + return fromString(name, ClusterPeerStatus.class); + } + + /** + * Gets known ClusterPeerStatus values. + * + * @return known ClusterPeerStatus values. + */ + public static Collection values() { + return values(ClusterPeerStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeers.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeers.java new file mode 100644 index 0000000000000..3f69861310df9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeers.java @@ -0,0 +1,67 @@ +// Copyright (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 ClusterPeers. + */ +public interface ClusterPeers { + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 Cluster Peer along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + Context context); + + /** + * Get the Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Cluster Peer. + */ + ClusterPeer get(String resourceGroupName, String externalClusterName, String peerId); + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ClusterPeer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName); + + /** + * List all Cluster Peers under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ClusterPeer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName, Context context); +} 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 98b4c8cedd84b..4366a60c1e51c 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 0000000000000..74a275dbed061 --- /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 0000000000000..ba88af2cec9b8 --- /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 0000000000000..73c6fe0da659e --- /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 0000000000000..10032af751448 --- /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 0000000000000..d0a352417a676 --- /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 0000000000000..5d92beb9983b3 --- /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 0000000000000..75cece14fea6c --- /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 0000000000000..c05d1474cc2a2 --- /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 0000000000000..a829e3c742914 --- /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 0000000000000..6b507c88adf5b --- /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 0000000000000..97c446acbc60e --- /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 0000000000000..feb77d0173c41 --- /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 0000000000000..f494ee77a458f --- /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 0000000000000..76dece2d90fec --- /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 0000000000000..7eb3253c88b5e --- /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 0000000000000..8e5406661ee98 --- /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 0000000000000..2b73e7208cf0d --- /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 0000000000000..9f6b3c4225499 --- /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 0000000000000..e158b9e65f00d --- /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 0000000000000..fc6b3baa90255 --- /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 0000000000000..4f03b65a3831f --- /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 0000000000000..c0edc78dae907 --- /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 0000000000000..b88a394b7bafe --- /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 0000000000000..712d1fc12fac4 --- /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 0000000000000..e4340a9c9b29a --- /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 0000000000000..75a5ab4ad93f8 --- /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 0000000000000..f351a7dc8d798 --- /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 0000000000000..86e47d8087201 --- /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 0000000000000..32b4063961f9d --- /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 0000000000000..e0b7f1ab7fcff --- /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 0000000000000..b03bf923133d0 --- /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 0000000000000..8cd6c9a184f11 --- /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 0000000000000..5869cd66b457c --- /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 0000000000000..189fde0509d6d --- /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 0000000000000..aa4cc4f721a70 --- /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 0000000000000..d6a30768d5f2a --- /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 0000000000000..438fe0bd73b96 --- /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 0000000000000..72aeb2eb784d4 --- /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 0000000000000..d7eba1c8da06a --- /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 0000000000000..8595a9bd48196 --- /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 0000000000000..7766dfc4442cf --- /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 0000000000000..ce54c98ff0ed0 --- /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 0000000000000..9e1816bc2354d --- /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 0000000000000..75aed519de083 --- /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 0000000000000..a0a76305002dc --- /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 0000000000000..d21f63d3ca155 --- /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 0000000000000..bdec028a79b54 --- /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 0000000000000..1cbac2277d200 --- /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 0000000000000..e606a93f9402b --- /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 0000000000000..c9224f647b392 --- /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 0000000000000..aeb1d8a2d1a3b --- /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 0000000000000..62a9b5ad9ac88 --- /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 0000000000000..92a3c2587f964 --- /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 0000000000000..aa698ce37da13 --- /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 0000000000000..659566146864d --- /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 0000000000000..554beba8f26a4 --- /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 0000000000000..0ad6d3a993ded --- /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 0000000000000..5bef7dd86892e --- /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 0000000000000..1275a92577bca --- /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 0000000000000..6a1bb984ee919 --- /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 0000000000000..d4c03bb13886c --- /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 0000000000000..b6ff08208f5c6 --- /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 0000000000000..1f1ec4a9d78e6 --- /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 0000000000000..204f7885a30ca --- /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 0000000000000..047910d442013 --- /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 0000000000000..49adf76f4df00 --- /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 0000000000000..4d419b26fff65 --- /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 0000000000000..3c165fdacb654 --- /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 0000000000000..2689c7d165b90 --- /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 0000000000000..71777b63ff486 --- /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 0000000000000..675657764f7d4 --- /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/ExternalCache.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCache.java new file mode 100644 index 0000000000000..daf9a96bb67d3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCache.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.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheInner; + +/** + * An immutable client-side representation of ExternalCache. + */ +public interface ExternalCache { + /** + * 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. + */ + ExternalCacheProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ExternalCacheInner object. + * + * @return the inner object. + */ + ExternalCacheInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnection.java new file mode 100644 index 0000000000000..466c5a3aae04e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnection.java @@ -0,0 +1,252 @@ +// Copyright (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.ExternalCacheConnectionInner; +import java.util.Map; + +/** + * An immutable client-side representation of ExternalCacheConnection. + */ +public interface ExternalCacheConnection { + /** + * 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. + */ + ExternalCacheConnectionProperties properties(); + + /** + * 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.ExternalCacheConnectionInner object. + * + * @return the inner object. + */ + ExternalCacheConnectionInner innerModel(); + + /** + * The entirety of the ExternalCacheConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ExternalCacheConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ExternalCacheConnection definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ExternalCacheConnection 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 ExternalCacheConnection 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 ExternalCacheConnection 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. + */ + ExternalCacheConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ExternalCacheConnection create(Context context); + } + + /** + * The stage of the ExternalCacheConnection 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 ExternalCacheConnection 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(ExternalCacheConnectionProperties properties); + } + } + + /** + * Begins update for the ExternalCacheConnection resource. + * + * @return the stage of resource update. + */ + ExternalCacheConnection.Update update(); + + /** + * The template for ExternalCacheConnection update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ExternalCacheConnection apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ExternalCacheConnection apply(Context context); + } + + /** + * The ExternalCacheConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the ExternalCacheConnection 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. + */ + ExternalCacheConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ExternalCacheConnection refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionProperties.java new file mode 100644 index 0000000000000..b797d24da356c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionProperties.java @@ -0,0 +1,271 @@ +// Copyright (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; + +/** + * External Cache Connection properties. + */ +@Fluent +public final class ExternalCacheConnectionProperties implements JsonSerializable { + /* + * Current status of the operation + */ + private ProvisioningState provisioningState; + + /* + * Origin volume resource ID, the ANF volume that acts as the origin for the cache connection + */ + private String originVolumeResourceId; + + /* + * Name of the cache associated with this connection + */ + private String externalCacheName; + + /* + * External SVM resource ID, the external storage virtual machine associated with this cache connection + */ + private String externalSvmResourceId; + + /* + * The Azure Resource URI for a delegated subnet used for cluster peering + */ + private String clusterPeerSubnetResourceId; + + /* + * Resource ID of the cluster peer + */ + private String clusterPeerResourceId; + + /* + * Resource ID of the SVM peer + */ + private String svmPeerResourceId; + + /* + * Setup information for the external cache connection + */ + private SetupInformation setupInformation; + + /** + * Creates an instance of ExternalCacheConnectionProperties class. + */ + public ExternalCacheConnectionProperties() { + } + + /** + * Get the provisioningState property: Current status of the operation. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the originVolumeResourceId property: Origin volume resource ID, the ANF volume that acts as the origin for + * the cache connection. + * + * @return the originVolumeResourceId value. + */ + public String originVolumeResourceId() { + return this.originVolumeResourceId; + } + + /** + * Set the originVolumeResourceId property: Origin volume resource ID, the ANF volume that acts as the origin for + * the cache connection. + * + * @param originVolumeResourceId the originVolumeResourceId value to set. + * @return the ExternalCacheConnectionProperties object itself. + */ + public ExternalCacheConnectionProperties withOriginVolumeResourceId(String originVolumeResourceId) { + this.originVolumeResourceId = originVolumeResourceId; + return this; + } + + /** + * Get the externalCacheName property: Name of the cache associated with this connection. + * + * @return the externalCacheName value. + */ + public String externalCacheName() { + return this.externalCacheName; + } + + /** + * Set the externalCacheName property: Name of the cache associated with this connection. + * + * @param externalCacheName the externalCacheName value to set. + * @return the ExternalCacheConnectionProperties object itself. + */ + public ExternalCacheConnectionProperties withExternalCacheName(String externalCacheName) { + this.externalCacheName = externalCacheName; + return this; + } + + /** + * Get the externalSvmResourceId property: External SVM resource ID, the external storage virtual machine associated + * with this cache connection. + * + * @return the externalSvmResourceId value. + */ + public String externalSvmResourceId() { + return this.externalSvmResourceId; + } + + /** + * Set the externalSvmResourceId property: External SVM resource ID, the external storage virtual machine associated + * with this cache connection. + * + * @param externalSvmResourceId the externalSvmResourceId value to set. + * @return the ExternalCacheConnectionProperties object itself. + */ + public ExternalCacheConnectionProperties withExternalSvmResourceId(String externalSvmResourceId) { + this.externalSvmResourceId = externalSvmResourceId; + return this; + } + + /** + * Get the clusterPeerSubnetResourceId property: The Azure Resource URI for a delegated subnet used for cluster + * peering. + * + * @return the clusterPeerSubnetResourceId value. + */ + public String clusterPeerSubnetResourceId() { + return this.clusterPeerSubnetResourceId; + } + + /** + * Set the clusterPeerSubnetResourceId property: The Azure Resource URI for a delegated subnet used for cluster + * peering. + * + * @param clusterPeerSubnetResourceId the clusterPeerSubnetResourceId value to set. + * @return the ExternalCacheConnectionProperties object itself. + */ + public ExternalCacheConnectionProperties withClusterPeerSubnetResourceId(String clusterPeerSubnetResourceId) { + this.clusterPeerSubnetResourceId = clusterPeerSubnetResourceId; + return this; + } + + /** + * Get the clusterPeerResourceId property: Resource ID of the cluster peer. + * + * @return the clusterPeerResourceId value. + */ + public String clusterPeerResourceId() { + return this.clusterPeerResourceId; + } + + /** + * Get the svmPeerResourceId property: Resource ID of the SVM peer. + * + * @return the svmPeerResourceId value. + */ + public String svmPeerResourceId() { + return this.svmPeerResourceId; + } + + /** + * Get the setupInformation property: Setup information for the external cache connection. + * + * @return the setupInformation value. + */ + public SetupInformation setupInformation() { + return this.setupInformation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (originVolumeResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property originVolumeResourceId in model ExternalCacheConnectionProperties")); + } + if (externalCacheName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property externalCacheName in model ExternalCacheConnectionProperties")); + } + if (externalSvmResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property externalSvmResourceId in model ExternalCacheConnectionProperties")); + } + if (setupInformation() != null) { + setupInformation().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalCacheConnectionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("originVolumeResourceId", this.originVolumeResourceId); + jsonWriter.writeStringField("externalCacheName", this.externalCacheName); + jsonWriter.writeStringField("externalSvmResourceId", this.externalSvmResourceId); + jsonWriter.writeStringField("clusterPeerSubnetResourceId", this.clusterPeerSubnetResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalCacheConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheConnectionProperties 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 ExternalCacheConnectionProperties. + */ + public static ExternalCacheConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheConnectionProperties deserializedExternalCacheConnectionProperties + = new ExternalCacheConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("originVolumeResourceId".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.originVolumeResourceId = reader.getString(); + } else if ("externalCacheName".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.externalCacheName = reader.getString(); + } else if ("externalSvmResourceId".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.externalSvmResourceId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("clusterPeerSubnetResourceId".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.clusterPeerSubnetResourceId = reader.getString(); + } else if ("clusterPeerResourceId".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.clusterPeerResourceId = reader.getString(); + } else if ("svmPeerResourceId".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.svmPeerResourceId = reader.getString(); + } else if ("setupInformation".equals(fieldName)) { + deserializedExternalCacheConnectionProperties.setupInformation = SetupInformation.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheConnectionProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionStatus.java new file mode 100644 index 0000000000000..893ba3d4c96ef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionStatus.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; + +/** + * Represents the status of an external cache connection. + */ +public final class ExternalCacheConnectionStatus extends ExpandableStringEnum { + /** + * The cache connection is pending. + */ + public static final ExternalCacheConnectionStatus PENDING = fromString("Pending"); + + /** + * The cache is connected. + */ + public static final ExternalCacheConnectionStatus CONNECTED = fromString("Connected"); + + /** + * The cache is disconnected. + */ + public static final ExternalCacheConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * The cache status is unknown. This is a transient state and should change to either connected or disconnected. + */ + public static final ExternalCacheConnectionStatus UNKNOWN = fromString("Unknown"); + + /** + * The cache was discovered on-premises but has no corresponding ExternalCacheConnection resource. + */ + public static final ExternalCacheConnectionStatus UNSUPPORTED = fromString("Unsupported"); + + /** + * Creates a new instance of ExternalCacheConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalCacheConnectionStatus() { + } + + /** + * Creates or finds a ExternalCacheConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalCacheConnectionStatus. + */ + public static ExternalCacheConnectionStatus fromString(String name) { + return fromString(name, ExternalCacheConnectionStatus.class); + } + + /** + * Gets known ExternalCacheConnectionStatus values. + * + * @return known ExternalCacheConnectionStatus values. + */ + public static Collection values() { + return values(ExternalCacheConnectionStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionTagsUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionTagsUpdate.java new file mode 100644 index 0000000000000..66bc226980d01 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionTagsUpdate.java @@ -0,0 +1,96 @@ +// Copyright (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 updating tags in ExternalCacheConnection resources. + */ +@Fluent +public final class ExternalCacheConnectionTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of ExternalCacheConnectionTagsUpdate class. + */ + public ExternalCacheConnectionTagsUpdate() { + } + + /** + * 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 ExternalCacheConnectionTagsUpdate object itself. + */ + public ExternalCacheConnectionTagsUpdate 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 ExternalCacheConnectionTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheConnectionTagsUpdate 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 ExternalCacheConnectionTagsUpdate. + */ + public static ExternalCacheConnectionTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheConnectionTagsUpdate deserializedExternalCacheConnectionTagsUpdate + = new ExternalCacheConnectionTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExternalCacheConnectionTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheConnectionTagsUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnections.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnections.java new file mode 100644 index 0000000000000..1a7f3db866b8e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnections.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 ExternalCacheConnections. + */ +public interface ExternalCacheConnections { + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 External Cache Connection along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String externalCacheConnectionName, Context context); + + /** + * Get the External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache Connection. + */ + ExternalCacheConnection getByResourceGroup(String resourceGroupName, String externalCacheConnectionName); + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 externalCacheConnectionName); + + /** + * Delete the specified External Cache Connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalCacheConnectionName The name of the ExternalCacheConnection. + * @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 externalCacheConnectionName, Context context); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all External Cache Connections 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 list of External Cache Connection resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the External Cache Connection. + * + * @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 External Cache Connection along with {@link Response}. + */ + ExternalCacheConnection getById(String id); + + /** + * Get the External Cache Connection. + * + * @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 External Cache Connection along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified External Cache Connection. + * + * @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 External Cache Connection. + * + * @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 ExternalCacheConnection resource. + * + * @param name resource name. + * @return the first stage of the new ExternalCacheConnection definition. + */ + ExternalCacheConnection.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheProperties.java new file mode 100644 index 0000000000000..aae3add534d27 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheProperties.java @@ -0,0 +1,212 @@ +// Copyright (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; + +/** + * External Cache properties. + */ +@Immutable +public final class ExternalCacheProperties implements JsonSerializable { + /* + * Azure lifecycle management + */ + private ProvisioningState provisioningState; + + /* + * Name of the cache volume on the external ONTAP system + */ + private String externalCacheName; + + /* + * Origin volume resource ID, the ANF volume that acts as the origin for this cache + */ + private String originVolumeResourceId; + + /* + * Name of the origin volume associated with this cache + */ + private String originVolumeName; + + /* + * Name of the origin SVM (Storage Virtual Machine) associated with this cache + */ + private String originSvmName; + + /* + * Size of the cache in bytes + */ + private Long sizeInBytes; + + /* + * State of the remote cache volume + */ + private ExternalCacheState state; + + /* + * The ONTAP CLI command to create this cache + */ + private String createCommand; + + /* + * Connection status of the external cache + */ + private ExternalCacheConnectionStatus connectionStatus; + + /** + * Creates an instance of ExternalCacheProperties class. + */ + private ExternalCacheProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the externalCacheName property: Name of the cache volume on the external ONTAP system. + * + * @return the externalCacheName value. + */ + public String externalCacheName() { + return this.externalCacheName; + } + + /** + * Get the originVolumeResourceId property: Origin volume resource ID, the ANF volume that acts as the origin for + * this cache. + * + * @return the originVolumeResourceId value. + */ + public String originVolumeResourceId() { + return this.originVolumeResourceId; + } + + /** + * Get the originVolumeName property: Name of the origin volume associated with this cache. + * + * @return the originVolumeName value. + */ + public String originVolumeName() { + return this.originVolumeName; + } + + /** + * Get the originSvmName property: Name of the origin SVM (Storage Virtual Machine) associated with this cache. + * + * @return the originSvmName value. + */ + public String originSvmName() { + return this.originSvmName; + } + + /** + * Get the sizeInBytes property: Size of the cache in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the state property: State of the remote cache volume. + * + * @return the state value. + */ + public ExternalCacheState state() { + return this.state; + } + + /** + * Get the createCommand property: The ONTAP CLI command to create this cache. + * + * @return the createCommand value. + */ + public String createCommand() { + return this.createCommand; + } + + /** + * Get the connectionStatus property: Connection status of the external cache. + * + * @return the connectionStatus value. + */ + public ExternalCacheConnectionStatus connectionStatus() { + return this.connectionStatus; + } + + /** + * 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 ExternalCacheProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalCacheProperties 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 ExternalCacheProperties. + */ + public static ExternalCacheProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalCacheProperties deserializedExternalCacheProperties = new ExternalCacheProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedExternalCacheProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("externalCacheName".equals(fieldName)) { + deserializedExternalCacheProperties.externalCacheName = reader.getString(); + } else if ("originVolumeResourceId".equals(fieldName)) { + deserializedExternalCacheProperties.originVolumeResourceId = reader.getString(); + } else if ("originVolumeName".equals(fieldName)) { + deserializedExternalCacheProperties.originVolumeName = reader.getString(); + } else if ("originSvmName".equals(fieldName)) { + deserializedExternalCacheProperties.originSvmName = reader.getString(); + } else if ("sizeInBytes".equals(fieldName)) { + deserializedExternalCacheProperties.sizeInBytes = reader.getNullable(JsonReader::getLong); + } else if ("state".equals(fieldName)) { + deserializedExternalCacheProperties.state = ExternalCacheState.fromString(reader.getString()); + } else if ("createCommand".equals(fieldName)) { + deserializedExternalCacheProperties.createCommand = reader.getString(); + } else if ("connectionStatus".equals(fieldName)) { + deserializedExternalCacheProperties.connectionStatus + = ExternalCacheConnectionStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalCacheProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheState.java new file mode 100644 index 0000000000000..beae1d138ce76 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheState.java @@ -0,0 +1,71 @@ +// Copyright (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; + +/** + * State of a remote cache volume on an external ONTAP system. + */ +public final class ExternalCacheState extends ExpandableStringEnum { + /** + * The remote cache volume is in an error state. + */ + public static final ExternalCacheState ERROR = fromString("error"); + + /** + * The remote cache volume is in a mixed state. + */ + public static final ExternalCacheState MIXED = fromString("mixed"); + + /** + * The remote cache volume is offline. + */ + public static final ExternalCacheState OFFLINE = fromString("offline"); + + /** + * The remote cache volume is online. + */ + public static final ExternalCacheState ONLINE = fromString("online"); + + /** + * The remote cache volume is in a pending state. + */ + public static final ExternalCacheState PENDING = fromString("pending"); + + /** + * The remote cache volume is in an unsupported state. + */ + public static final ExternalCacheState UNSUPPORTED = fromString("unsupported"); + + /** + * Creates a new instance of ExternalCacheState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalCacheState() { + } + + /** + * Creates or finds a ExternalCacheState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalCacheState. + */ + public static ExternalCacheState fromString(String name) { + return fromString(name, ExternalCacheState.class); + } + + /** + * Gets known ExternalCacheState values. + * + * @return known ExternalCacheState values. + */ + public static Collection values() { + return values(ExternalCacheState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCaches.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCaches.java new file mode 100644 index 0000000000000..2a3784da3b8f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCaches.java @@ -0,0 +1,76 @@ +// Copyright (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 ExternalCaches. + */ +public interface ExternalCaches { + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @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 External Cache along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String externalClusterName, + String externalSvmName, String externalCacheResourceName, Context context); + + /** + * Get the External Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @param externalCacheResourceName The externalCacheName with unique identifier added and leading underscores (if + * any) removed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cache. + */ + ExternalCache get(String resourceGroupName, String externalClusterName, String externalSvmName, + String externalCacheResourceName); + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ExternalCache list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName); + + /** + * List all External Caches under an External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 ExternalCache list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName, + String externalSvmName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCluster.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCluster.java new file mode 100644 index 0000000000000..fbb060f3ed068 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalCluster.java @@ -0,0 +1,299 @@ +// Copyright (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.ExternalClusterInner; +import java.util.Map; + +/** + * An immutable client-side representation of ExternalCluster. + */ +public interface ExternalCluster { + /** + * 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. + */ + ExternalClusterProperties properties(); + + /** + * 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.ExternalClusterInner object. + * + * @return the inner object. + */ + ExternalClusterInner innerModel(); + + /** + * The entirety of the ExternalCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ExternalCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ExternalCluster definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ExternalCluster 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 ExternalCluster 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 ExternalCluster 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. + */ + ExternalCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ExternalCluster create(Context context); + } + + /** + * The stage of the ExternalCluster 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 ExternalCluster 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(ExternalClusterProperties properties); + } + + /** + * The stage of the ExternalCluster 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 ExternalCluster resource. + * + * @return the stage of resource update. + */ + ExternalCluster.Update update(); + + /** + * The template for ExternalCluster update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ExternalCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ExternalCluster apply(Context context); + } + + /** + * The ExternalCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the ExternalCluster 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 ExternalCluster 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 ExternalCluster 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(ExternalClusterUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ExternalCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ExternalCluster refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterProperties.java new file mode 100644 index 0000000000000..8d927c0b70675 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterProperties.java @@ -0,0 +1,163 @@ +// Copyright (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; + +/** + * External Cluster properties. + */ +@Fluent +public final class ExternalClusterProperties implements JsonSerializable { + /* + * Azure lifecycle management + */ + private ProvisioningState provisioningState; + + /* + * Intercluster LIFs, external cluster IPs for cluster peer connection + */ + private List interclusterLifsIpAddresses; + + /* + * Key Vault authentication configuration for cluster peering passphrase + */ + private KeyVaultClusterPeerPassphraseProperties clusterPeerPassphraseKeyVault; + + /** + * Creates an instance of ExternalClusterProperties class. + */ + public ExternalClusterProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the interclusterLifsIpAddresses property: Intercluster LIFs, external cluster IPs for cluster peer + * connection. + * + * @return the interclusterLifsIpAddresses value. + */ + public List interclusterLifsIpAddresses() { + return this.interclusterLifsIpAddresses; + } + + /** + * Set the interclusterLifsIpAddresses property: Intercluster LIFs, external cluster IPs for cluster peer + * connection. + * + * @param interclusterLifsIpAddresses the interclusterLifsIpAddresses value to set. + * @return the ExternalClusterProperties object itself. + */ + public ExternalClusterProperties withInterclusterLifsIpAddresses(List interclusterLifsIpAddresses) { + this.interclusterLifsIpAddresses = interclusterLifsIpAddresses; + return this; + } + + /** + * Get the clusterPeerPassphraseKeyVault property: Key Vault authentication configuration for cluster peering + * passphrase. + * + * @return the clusterPeerPassphraseKeyVault value. + */ + public KeyVaultClusterPeerPassphraseProperties clusterPeerPassphraseKeyVault() { + return this.clusterPeerPassphraseKeyVault; + } + + /** + * Set the clusterPeerPassphraseKeyVault property: Key Vault authentication configuration for cluster peering + * passphrase. + * + * @param clusterPeerPassphraseKeyVault the clusterPeerPassphraseKeyVault value to set. + * @return the ExternalClusterProperties object itself. + */ + public ExternalClusterProperties + withClusterPeerPassphraseKeyVault(KeyVaultClusterPeerPassphraseProperties clusterPeerPassphraseKeyVault) { + this.clusterPeerPassphraseKeyVault = clusterPeerPassphraseKeyVault; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (interclusterLifsIpAddresses() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property interclusterLifsIpAddresses in model ExternalClusterProperties")); + } + if (clusterPeerPassphraseKeyVault() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clusterPeerPassphraseKeyVault in model ExternalClusterProperties")); + } else { + clusterPeerPassphraseKeyVault().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalClusterProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("interclusterLifsIpAddresses", this.interclusterLifsIpAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("clusterPeerPassphraseKeyVault", this.clusterPeerPassphraseKeyVault); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalClusterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalClusterProperties 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 ExternalClusterProperties. + */ + public static ExternalClusterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalClusterProperties deserializedExternalClusterProperties = new ExternalClusterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interclusterLifsIpAddresses".equals(fieldName)) { + List interclusterLifsIpAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedExternalClusterProperties.interclusterLifsIpAddresses = interclusterLifsIpAddresses; + } else if ("clusterPeerPassphraseKeyVault".equals(fieldName)) { + deserializedExternalClusterProperties.clusterPeerPassphraseKeyVault + = KeyVaultClusterPeerPassphraseProperties.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedExternalClusterProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalClusterProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdate.java new file mode 100644 index 0000000000000..d90c46940e6e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdate.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 ExternalCluster. + */ +@Fluent +public final class ExternalClusterUpdate 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 ExternalClusterUpdateProperties properties; + + /** + * Creates an instance of ExternalClusterUpdate class. + */ + public ExternalClusterUpdate() { + } + + /** + * 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 ExternalClusterUpdate object itself. + */ + public ExternalClusterUpdate 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 ExternalClusterUpdate object itself. + */ + public ExternalClusterUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExternalClusterUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExternalClusterUpdate object itself. + */ + public ExternalClusterUpdate withProperties(ExternalClusterUpdateProperties 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 ExternalClusterUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalClusterUpdate 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 ExternalClusterUpdate. + */ + public static ExternalClusterUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalClusterUpdate deserializedExternalClusterUpdate = new ExternalClusterUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedExternalClusterUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExternalClusterUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedExternalClusterUpdate.properties = ExternalClusterUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalClusterUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdateProperties.java new file mode 100644 index 0000000000000..c697d06ad8f3f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdateProperties.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.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 ExternalCluster. + */ +@Fluent +public final class ExternalClusterUpdateProperties implements JsonSerializable { + /* + * Intercluster LIFs, external cluster IPs for cluster peer connection + */ + private List interclusterLifsIpAddresses; + + /* + * Key Vault authentication configuration for cluster peering passphrase + */ + private KeyVaultClusterPeerPassphrasePatchProperties clusterPeerPassphraseKeyVault; + + /** + * Creates an instance of ExternalClusterUpdateProperties class. + */ + public ExternalClusterUpdateProperties() { + } + + /** + * Get the interclusterLifsIpAddresses property: Intercluster LIFs, external cluster IPs for cluster peer + * connection. + * + * @return the interclusterLifsIpAddresses value. + */ + public List interclusterLifsIpAddresses() { + return this.interclusterLifsIpAddresses; + } + + /** + * Set the interclusterLifsIpAddresses property: Intercluster LIFs, external cluster IPs for cluster peer + * connection. + * + * @param interclusterLifsIpAddresses the interclusterLifsIpAddresses value to set. + * @return the ExternalClusterUpdateProperties object itself. + */ + public ExternalClusterUpdateProperties withInterclusterLifsIpAddresses(List interclusterLifsIpAddresses) { + this.interclusterLifsIpAddresses = interclusterLifsIpAddresses; + return this; + } + + /** + * Get the clusterPeerPassphraseKeyVault property: Key Vault authentication configuration for cluster peering + * passphrase. + * + * @return the clusterPeerPassphraseKeyVault value. + */ + public KeyVaultClusterPeerPassphrasePatchProperties clusterPeerPassphraseKeyVault() { + return this.clusterPeerPassphraseKeyVault; + } + + /** + * Set the clusterPeerPassphraseKeyVault property: Key Vault authentication configuration for cluster peering + * passphrase. + * + * @param clusterPeerPassphraseKeyVault the clusterPeerPassphraseKeyVault value to set. + * @return the ExternalClusterUpdateProperties object itself. + */ + public ExternalClusterUpdateProperties + withClusterPeerPassphraseKeyVault(KeyVaultClusterPeerPassphrasePatchProperties clusterPeerPassphraseKeyVault) { + this.clusterPeerPassphraseKeyVault = clusterPeerPassphraseKeyVault; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clusterPeerPassphraseKeyVault() != null) { + clusterPeerPassphraseKeyVault().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("interclusterLifsIpAddresses", this.interclusterLifsIpAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("clusterPeerPassphraseKeyVault", this.clusterPeerPassphraseKeyVault); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalClusterUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalClusterUpdateProperties 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 ExternalClusterUpdateProperties. + */ + public static ExternalClusterUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalClusterUpdateProperties deserializedExternalClusterUpdateProperties + = new ExternalClusterUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("interclusterLifsIpAddresses".equals(fieldName)) { + List interclusterLifsIpAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedExternalClusterUpdateProperties.interclusterLifsIpAddresses + = interclusterLifsIpAddresses; + } else if ("clusterPeerPassphraseKeyVault".equals(fieldName)) { + deserializedExternalClusterUpdateProperties.clusterPeerPassphraseKeyVault + = KeyVaultClusterPeerPassphrasePatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalClusterUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusters.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusters.java new file mode 100644 index 0000000000000..f1c2b74c7e8a1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusters.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 ExternalClusters. + */ +public interface ExternalClusters { + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 External Cluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String externalClusterName, + Context context); + + /** + * Get the External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External Cluster. + */ + ExternalCluster getByResourceGroup(String resourceGroupName, String externalClusterName); + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 externalClusterName); + + /** + * Delete the specified External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 externalClusterName, Context context); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all External Clusters 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 list of External Cluster resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the External Cluster. + * + * @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 External Cluster along with {@link Response}. + */ + ExternalCluster getById(String id); + + /** + * Get the External Cluster. + * + * @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 External Cluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified External Cluster. + * + * @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 External Cluster. + * + * @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 ExternalCluster resource. + * + * @param name resource name. + * @return the first stage of the new ExternalCluster definition. + */ + ExternalCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalConnectionSetupState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalConnectionSetupState.java new file mode 100644 index 0000000000000..87005aa2211a2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalConnectionSetupState.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provides a machine-readable value for the status of the external connection setup. + */ +public final class ExternalConnectionSetupState extends ExpandableStringEnum { + /** + * The peering needs to be accepted on your cluster before the setup can proceed. see the command in + * 'SetupInformation.command' property. + */ + public static final ExternalConnectionSetupState CLUSTER_PEER_PENDING = fromString("ClusterPeerPending"); + + /** + * Need to accept the returned 'vserver peer accept' command on your cluster to finish SVM peering. See the command + * in 'SetupInformation.command' property. + */ + public static final ExternalConnectionSetupState VSERVER_PEER_REQUIRED = fromString("VServerPeerRequired"); + + /** + * External cache connection setup is complete. + */ + public static final ExternalConnectionSetupState NO_ACTION_REQUIRED = fromString("NoActionRequired"); + + /** + * Creates a new instance of ExternalConnectionSetupState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalConnectionSetupState() { + } + + /** + * Creates or finds a ExternalConnectionSetupState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalConnectionSetupState. + */ + public static ExternalConnectionSetupState fromString(String name) { + return fromString(name, ExternalConnectionSetupState.class); + } + + /** + * Gets known ExternalConnectionSetupState values. + * + * @return known ExternalConnectionSetupState values. + */ + public static Collection values() { + return values(ExternalConnectionSetupState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalResourceNetworkInterfaces.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalResourceNetworkInterfaces.java new file mode 100644 index 0000000000000..f57df8e5d64d0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalResourceNetworkInterfaces.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.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 java.io.IOException; + +/** + * External Resource Network Interfaces. + */ +@Immutable +public final class ExternalResourceNetworkInterfaces implements JsonSerializable { + /* + * Network Interface Resource ID + */ + private String networkInterfaceResourceId; + + /* + * Peer IP address used for peering + */ + private String peerIpAddress; + + /** + * Creates an instance of ExternalResourceNetworkInterfaces class. + */ + private ExternalResourceNetworkInterfaces() { + } + + /** + * Get the networkInterfaceResourceId property: Network Interface Resource ID. + * + * @return the networkInterfaceResourceId value. + */ + public String networkInterfaceResourceId() { + return this.networkInterfaceResourceId; + } + + /** + * Get the peerIpAddress property: Peer IP address used for peering. + * + * @return the peerIpAddress value. + */ + public String peerIpAddress() { + return this.peerIpAddress; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkInterfaceResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property networkInterfaceResourceId in model ExternalResourceNetworkInterfaces")); + } + if (peerIpAddress() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerIpAddress in model ExternalResourceNetworkInterfaces")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalResourceNetworkInterfaces.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkInterfaceResourceId", this.networkInterfaceResourceId); + jsonWriter.writeStringField("peerIpAddress", this.peerIpAddress); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalResourceNetworkInterfaces from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalResourceNetworkInterfaces 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 ExternalResourceNetworkInterfaces. + */ + public static ExternalResourceNetworkInterfaces fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalResourceNetworkInterfaces deserializedExternalResourceNetworkInterfaces + = new ExternalResourceNetworkInterfaces(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkInterfaceResourceId".equals(fieldName)) { + deserializedExternalResourceNetworkInterfaces.networkInterfaceResourceId = reader.getString(); + } else if ("peerIpAddress".equals(fieldName)) { + deserializedExternalResourceNetworkInterfaces.peerIpAddress = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExternalResourceNetworkInterfaces; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvm.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvm.java new file mode 100644 index 0000000000000..c66909329f9fd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvm.java @@ -0,0 +1,253 @@ +// Copyright (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.ExternalSvmInner; +import java.util.Map; + +/** + * An immutable client-side representation of ExternalSvm. + */ +public interface ExternalSvm { + /** + * 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. + */ + ExternalSvmProperties properties(); + + /** + * 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.ExternalSvmInner object. + * + * @return the inner object. + */ + ExternalSvmInner innerModel(); + + /** + * The entirety of the ExternalSvm definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ExternalSvm definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ExternalSvm definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ExternalSvm 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 ExternalSvm definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, externalClusterName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @return the next definition stage. + */ + WithCreate withExistingExternalCluster(String resourceGroupName, String externalClusterName); + } + + /** + * The stage of the ExternalSvm 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. + */ + ExternalSvm create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ExternalSvm create(Context context); + } + + /** + * The stage of the ExternalSvm 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 ExternalSvm 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(ExternalSvmProperties properties); + } + } + + /** + * Begins update for the ExternalSvm resource. + * + * @return the stage of resource update. + */ + ExternalSvm.Update update(); + + /** + * The template for ExternalSvm update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ExternalSvm apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ExternalSvm apply(Context context); + } + + /** + * The ExternalSvm update stages. + */ + interface UpdateStages { + /** + * The stage of the ExternalSvm 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. + */ + ExternalSvm refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ExternalSvm refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmProperties.java new file mode 100644 index 0000000000000..19dfa1352555a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmProperties.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.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; + +/** + * External SVM properties. + */ +@Fluent +public final class ExternalSvmProperties implements JsonSerializable { + /* + * Azure lifecycle management + */ + private ProvisioningState provisioningState; + + /* + * Name of the external ONTAP SVM (different from Azure resource name). Must be unique across the cluster. + */ + private String ontapSvmName; + + /* + * Resource IDs of associated SVM Peer relationships + */ + private List svmPeerResourceIds; + + /** + * Creates an instance of ExternalSvmProperties class. + */ + public ExternalSvmProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the ontapSvmName property: Name of the external ONTAP SVM (different from Azure resource name). Must be + * unique across the cluster. + * + * @return the ontapSvmName value. + */ + public String ontapSvmName() { + return this.ontapSvmName; + } + + /** + * Set the ontapSvmName property: Name of the external ONTAP SVM (different from Azure resource name). Must be + * unique across the cluster. + * + * @param ontapSvmName the ontapSvmName value to set. + * @return the ExternalSvmProperties object itself. + */ + public ExternalSvmProperties withOntapSvmName(String ontapSvmName) { + this.ontapSvmName = ontapSvmName; + return this; + } + + /** + * Get the svmPeerResourceIds property: Resource IDs of associated SVM Peer relationships. + * + * @return the svmPeerResourceIds value. + */ + public List svmPeerResourceIds() { + return this.svmPeerResourceIds; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ontapSvmName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ontapSvmName in model ExternalSvmProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExternalSvmProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ontapSvmName", this.ontapSvmName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExternalSvmProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalSvmProperties 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 ExternalSvmProperties. + */ + public static ExternalSvmProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalSvmProperties deserializedExternalSvmProperties = new ExternalSvmProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ontapSvmName".equals(fieldName)) { + deserializedExternalSvmProperties.ontapSvmName = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedExternalSvmProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("svmPeerResourceIds".equals(fieldName)) { + List svmPeerResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedExternalSvmProperties.svmPeerResourceIds = svmPeerResourceIds; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalSvmProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmTagsUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmTagsUpdate.java new file mode 100644 index 0000000000000..e965cd283c2c4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmTagsUpdate.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 updating tags in ExternalSvm resources. + */ +@Fluent +public final class ExternalSvmTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of ExternalSvmTagsUpdate class. + */ + public ExternalSvmTagsUpdate() { + } + + /** + * 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 ExternalSvmTagsUpdate object itself. + */ + public ExternalSvmTagsUpdate 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 ExternalSvmTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExternalSvmTagsUpdate 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 ExternalSvmTagsUpdate. + */ + public static ExternalSvmTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExternalSvmTagsUpdate deserializedExternalSvmTagsUpdate = new ExternalSvmTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExternalSvmTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedExternalSvmTagsUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvms.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvms.java new file mode 100644 index 0000000000000..891111aa1f3c6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvms.java @@ -0,0 +1,144 @@ +// Copyright (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 ExternalSvms. + */ +public interface ExternalSvms { + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 External SVM resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String externalClusterName, String externalSvmName, + Context context); + + /** + * Get the External SVM resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the External SVM resource. + */ + ExternalSvm get(String resourceGroupName, String externalClusterName, String externalSvmName); + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 externalClusterName, String externalSvmName); + + /** + * Delete the specified External SVM. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param externalSvmName The name of the ExternalSvm. + * @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 externalClusterName, String externalSvmName, Context context); + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ExternalSvm list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName); + + /** + * List all External SVMs under an External Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @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 ExternalSvm list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName, Context context); + + /** + * Get the External SVM resource. + * + * @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 External SVM resource along with {@link Response}. + */ + ExternalSvm getById(String id); + + /** + * Get the External SVM resource. + * + * @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 External SVM resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified External SVM. + * + * @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 External SVM. + * + * @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 ExternalSvm resource. + * + * @param name resource name. + * @return the first stage of the new ExternalSvm definition. + */ + ExternalSvm.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphrasePatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphrasePatchProperties.java new file mode 100644 index 0000000000000..da146cd7d7fad --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphrasePatchProperties.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.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; + +/** + * Key Vault authentication properties for PATCH operations. + */ +@Fluent +public final class KeyVaultClusterPeerPassphrasePatchProperties + implements JsonSerializable { + /* + * The Azure Key Vault URI where the passphrase for cluster peering handshake is stored + */ + private String keyVaultUri; + + /* + * The name of the secret in Azure Key Vault. Passphrase for cluster peering handshake is stored in this secret. + */ + private String secretName; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. If not provided, + * system-assigned identity will be used. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of KeyVaultClusterPeerPassphrasePatchProperties class. + */ + public KeyVaultClusterPeerPassphrasePatchProperties() { + } + + /** + * Get the keyVaultUri property: The Azure Key Vault URI where the passphrase for cluster peering handshake is + * stored. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Azure Key Vault URI where the passphrase for cluster peering handshake is + * stored. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the KeyVaultClusterPeerPassphrasePatchProperties object itself. + */ + public KeyVaultClusterPeerPassphrasePatchProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of the secret in Azure Key Vault. Passphrase for cluster peering handshake + * is stored in this secret. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of the secret in Azure Key Vault. Passphrase for cluster peering handshake + * is stored in this secret. + * + * @param secretName the secretName value to set. + * @return the KeyVaultClusterPeerPassphrasePatchProperties object itself. + */ + public KeyVaultClusterPeerPassphrasePatchProperties withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: The ARM resource identifier of the user assigned identity used + * to authenticate with key vault. If not provided, system-assigned identity will be used. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: The ARM resource identifier of the user assigned identity used + * to authenticate with key vault. If not provided, system-assigned identity will be used. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the KeyVaultClusterPeerPassphrasePatchProperties object itself. + */ + public KeyVaultClusterPeerPassphrasePatchProperties + withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + 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("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultClusterPeerPassphrasePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultClusterPeerPassphrasePatchProperties 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 KeyVaultClusterPeerPassphrasePatchProperties. + */ + public static KeyVaultClusterPeerPassphrasePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultClusterPeerPassphrasePatchProperties deserializedKeyVaultClusterPeerPassphrasePatchProperties + = new KeyVaultClusterPeerPassphrasePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedKeyVaultClusterPeerPassphrasePatchProperties.keyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedKeyVaultClusterPeerPassphrasePatchProperties.secretName = reader.getString(); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedKeyVaultClusterPeerPassphrasePatchProperties.userAssignedIdentityResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultClusterPeerPassphrasePatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphraseProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphraseProperties.java new file mode 100644 index 0000000000000..baf499902e2e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphraseProperties.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.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; + +/** + * Key Vault authentication properties. + */ +@Fluent +public final class KeyVaultClusterPeerPassphraseProperties + implements JsonSerializable { + /* + * The Azure Key Vault URI where the passphrase for cluster peering handshake is stored + */ + private String keyVaultUri; + + /* + * The name of the secret in Azure Key Vault. Passphrase for cluster peering handshake is stored in this secret. + */ + private String secretName; + + /* + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. If not provided, + * system-assigned identity will be used. + */ + private String userAssignedIdentityResourceId; + + /** + * Creates an instance of KeyVaultClusterPeerPassphraseProperties class. + */ + public KeyVaultClusterPeerPassphraseProperties() { + } + + /** + * Get the keyVaultUri property: The Azure Key Vault URI where the passphrase for cluster peering handshake is + * stored. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Azure Key Vault URI where the passphrase for cluster peering handshake is + * stored. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the KeyVaultClusterPeerPassphraseProperties object itself. + */ + public KeyVaultClusterPeerPassphraseProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of the secret in Azure Key Vault. Passphrase for cluster peering handshake + * is stored in this secret. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of the secret in Azure Key Vault. Passphrase for cluster peering handshake + * is stored in this secret. + * + * @param secretName the secretName value to set. + * @return the KeyVaultClusterPeerPassphraseProperties object itself. + */ + public KeyVaultClusterPeerPassphraseProperties withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the userAssignedIdentityResourceId property: The ARM resource identifier of the user assigned identity used + * to authenticate with key vault. If not provided, system-assigned identity will be used. + * + * @return the userAssignedIdentityResourceId value. + */ + public String userAssignedIdentityResourceId() { + return this.userAssignedIdentityResourceId; + } + + /** + * Set the userAssignedIdentityResourceId property: The ARM resource identifier of the user assigned identity used + * to authenticate with key vault. If not provided, system-assigned identity will be used. + * + * @param userAssignedIdentityResourceId the userAssignedIdentityResourceId value to set. + * @return the KeyVaultClusterPeerPassphraseProperties object itself. + */ + public KeyVaultClusterPeerPassphraseProperties + withUserAssignedIdentityResourceId(String userAssignedIdentityResourceId) { + this.userAssignedIdentityResourceId = userAssignedIdentityResourceId; + 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 KeyVaultClusterPeerPassphraseProperties")); + } + if (secretName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretName in model KeyVaultClusterPeerPassphraseProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KeyVaultClusterPeerPassphraseProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + jsonWriter.writeStringField("userAssignedIdentityResourceId", this.userAssignedIdentityResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultClusterPeerPassphraseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultClusterPeerPassphraseProperties 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 KeyVaultClusterPeerPassphraseProperties. + */ + public static KeyVaultClusterPeerPassphraseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultClusterPeerPassphraseProperties deserializedKeyVaultClusterPeerPassphraseProperties + = new KeyVaultClusterPeerPassphraseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedKeyVaultClusterPeerPassphraseProperties.keyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedKeyVaultClusterPeerPassphraseProperties.secretName = reader.getString(); + } else if ("userAssignedIdentityResourceId".equals(fieldName)) { + deserializedKeyVaultClusterPeerPassphraseProperties.userAssignedIdentityResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultClusterPeerPassphraseProperties; + }); + } +} 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 0000000000000..7f151ae470b75 --- /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/NetAppAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java index ba1b8b5356059..31f37c3f09558 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. * @@ -209,8 +216,8 @@ interface WithResourceGroup { * 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, - DefinitionStages.WithLdapConfiguration { + DefinitionStages.WithActiveDirectories, DefinitionStages.WithEntraIdConfig, DefinitionStages.WithEncryption, + DefinitionStages.WithNfsV4IdDomain, DefinitionStages.WithLdapConfiguration { /** * Executes the create request. * @@ -266,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. */ @@ -319,7 +339,8 @@ interface WithLdapConfiguration { * The template for NetAppAccount update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithActiveDirectories, - UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain, UpdateStages.WithLdapConfiguration { + UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain, UpdateStages.WithEntraIdConfig, + UpdateStages.WithLdapConfiguration { /** * Executes the update request. * @@ -407,6 +428,19 @@ 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. */ 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 e7b63fa6ca9ee..8973dec95145e 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 @@ -160,6 +160,29 @@ public NetAppAccountPatch withNfsV4IdDomain(String nfsV4IdDomain) { return this; } + /** + * 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. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginVolume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginVolume.java new file mode 100644 index 0000000000000..9e617015c42c4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginVolume.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; + +/** + * Indicates whether a volume is designated as an origin for cache volumes. + */ +public final class OriginVolume extends ExpandableStringEnum { + /** + * This volume is not designated as an origin for cache volumes. + */ + public static final OriginVolume DISABLED = fromString("Disabled"); + + /** + * This volume is designated as an origin for one or more cache volumes. + */ + public static final OriginVolume ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of OriginVolume value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OriginVolume() { + } + + /** + * Creates or finds a OriginVolume from its string representation. + * + * @param name a name to look for. + * @return the corresponding OriginVolume. + */ + public static OriginVolume fromString(String name) { + return fromString(name, OriginVolume.class); + } + + /** + * Gets known OriginVolume values. + * + * @return known OriginVolume values. + */ + public static Collection values() { + return values(OriginVolume.class); + } +} 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 0000000000000..f787817200bd2 --- /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 0000000000000..c8074d6214cd3 --- /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 0000000000000..142d0abf11dd3 --- /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 0000000000000..d61ec62ff020e --- /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/SetupInformation.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SetupInformation.java new file mode 100644 index 0000000000000..557c73ed9c955 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SetupInformation.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.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; + +/** + * Setup Information for External Connection Setups. + */ +@Immutable +public final class SetupInformation implements JsonSerializable { + /* + * Setup status indicating the current step in the setup process + */ + private ExternalConnectionSetupState setupStatus; + + /* + * Additional status information + */ + private String statusInformation; + + /* + * Command to execute + */ + private String command; + + /** + * Creates an instance of SetupInformation class. + */ + private SetupInformation() { + } + + /** + * Get the setupStatus property: Setup status indicating the current step in the setup process. + * + * @return the setupStatus value. + */ + public ExternalConnectionSetupState setupStatus() { + return this.setupStatus; + } + + /** + * Get the statusInformation property: Additional status information. + * + * @return the statusInformation value. + */ + public String statusInformation() { + return this.statusInformation; + } + + /** + * Get the command property: Command to execute. + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * 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 SetupInformation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SetupInformation 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 SetupInformation. + */ + public static SetupInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SetupInformation deserializedSetupInformation = new SetupInformation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("setupStatus".equals(fieldName)) { + deserializedSetupInformation.setupStatus + = ExternalConnectionSetupState.fromString(reader.getString()); + } else if ("statusInformation".equals(fieldName)) { + deserializedSetupInformation.statusInformation = reader.getString(); + } else if ("command".equals(fieldName)) { + deserializedSetupInformation.command = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSetupInformation; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbOplocks.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbOplocks.java new file mode 100644 index 0000000000000..3b6ede1826f85 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbOplocks.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 opportunistic-lock setting shared by volume and cache resources. Omit the property when unspecified. + */ +public final class SmbOplocks extends ExpandableStringEnum { + /** + * SMB opportunistic locks share setting is disabled. + */ + public static final SmbOplocks DISABLED = fromString("Disabled"); + + /** + * SMB opportunistic locks share setting is enabled. + */ + public static final SmbOplocks ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of SmbOplocks value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SmbOplocks() { + } + + /** + * Creates or finds a SmbOplocks from its string representation. + * + * @param name a name to look for. + * @return the corresponding SmbOplocks. + */ + public static SmbOplocks fromString(String name) { + return fromString(name, SmbOplocks.class); + } + + /** + * Gets known SmbOplocks values. + * + * @return known SmbOplocks values. + */ + public static Collection values() { + return values(SmbOplocks.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java index 46563886c8329..f8eff41ee7ddb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java @@ -31,6 +31,11 @@ public final class SmbSettings implements JsonSerializable { */ private SmbNonBrowsable smbNonBrowsable; + /* + * Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable for SMB/DualProtocol cache + */ + private SmbOplocks smbOplocks; + /** * Creates an instance of SmbSettings class. */ @@ -103,6 +108,28 @@ public SmbSettings withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable) { return this; } + /** + * Get the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol cache. + * + * @return the smbOplocks value. + */ + public SmbOplocks smbOplocks() { + return this.smbOplocks; + } + + /** + * Set the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol cache. + * + * @param smbOplocks the smbOplocks value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbOplocks(SmbOplocks smbOplocks) { + this.smbOplocks = smbOplocks; + return this; + } + /** * Validates the instance. * @@ -122,6 +149,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.smbAccessBasedEnumeration == null ? null : this.smbAccessBasedEnumeration.toString()); jsonWriter.writeStringField("smbNonBrowsable", this.smbNonBrowsable == null ? null : this.smbNonBrowsable.toString()); + jsonWriter.writeStringField("smbOplocks", this.smbOplocks == null ? null : this.smbOplocks.toString()); return jsonWriter.writeEndObject(); } @@ -147,6 +175,8 @@ public static SmbSettings fromJson(JsonReader jsonReader) throws IOException { = SmbAccessBasedEnumeration.fromString(reader.getString()); } else if ("smbNonBrowsable".equals(fieldName)) { deserializedSmbSettings.smbNonBrowsable = SmbNonBrowsable.fromString(reader.getString()); + } else if ("smbOplocks".equals(fieldName)) { + deserializedSmbSettings.smbOplocks = SmbOplocks.fromString(reader.getString()); } else { reader.skipChildren(); } 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 0000000000000..ea3a485321dbb --- /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 0000000000000..54786c233ec7a --- /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/SvmPeer.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeer.java new file mode 100644 index 0000000000000..c7396aa2ece74 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeer.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.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.netapp.fluent.models.SvmPeerInner; + +/** + * An immutable client-side representation of SvmPeer. + */ +public interface SvmPeer { + /** + * 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. + */ + SvmPeerProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.SvmPeerInner object. + * + * @return the inner object. + */ + SvmPeerInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerProperties.java new file mode 100644 index 0000000000000..6b1ac9183e16e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerProperties.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.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; +import java.util.List; + +/** + * SVM Peer properties. + */ +@Immutable +public final class SvmPeerProperties implements JsonSerializable { + /* + * Azure lifecycle management + */ + private ProvisioningState provisioningState; + + /* + * Command to accept the peer relationship + */ + private String acceptCommand; + + /* + * Name of the Azure Net App Files (ANF) SVM + */ + private String anfSvmName; + + /* + * Resource ID of the external SVM + */ + private String externalSvmResourceId; + + /* + * Status of the peer relationship + */ + private SvmPeerStatus status; + + /* + * Peer types; expected values include "Replication" or "Cache" + */ + private List peerTypes; + + /* + * Resource IDs of Hybrid Replication resources associated with this SVM peer + */ + private List hybridReplicationResourceIds; + + /* + * Resource IDs of External Cache Connections associated with this SVM peer + */ + private List externalCacheConnectionResourceIds; + + /** + * Creates an instance of SvmPeerProperties class. + */ + private SvmPeerProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the acceptCommand property: Command to accept the peer relationship. + * + * @return the acceptCommand value. + */ + public String acceptCommand() { + return this.acceptCommand; + } + + /** + * Get the anfSvmName property: Name of the Azure Net App Files (ANF) SVM. + * + * @return the anfSvmName value. + */ + public String anfSvmName() { + return this.anfSvmName; + } + + /** + * Get the externalSvmResourceId property: Resource ID of the external SVM. + * + * @return the externalSvmResourceId value. + */ + public String externalSvmResourceId() { + return this.externalSvmResourceId; + } + + /** + * Get the status property: Status of the peer relationship. + * + * @return the status value. + */ + public SvmPeerStatus status() { + return this.status; + } + + /** + * Get the peerTypes property: Peer types; expected values include "Replication" or "Cache". + * + * @return the peerTypes value. + */ + public List peerTypes() { + return this.peerTypes; + } + + /** + * Get the hybridReplicationResourceIds property: Resource IDs of Hybrid Replication resources associated with this + * SVM peer. + * + * @return the hybridReplicationResourceIds value. + */ + public List hybridReplicationResourceIds() { + return this.hybridReplicationResourceIds; + } + + /** + * Get the externalCacheConnectionResourceIds property: Resource IDs of External Cache Connections associated with + * this SVM peer. + * + * @return the externalCacheConnectionResourceIds value. + */ + public List externalCacheConnectionResourceIds() { + return this.externalCacheConnectionResourceIds; + } + + /** + * 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 SvmPeerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SvmPeerProperties 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 SvmPeerProperties. + */ + public static SvmPeerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SvmPeerProperties deserializedSvmPeerProperties = new SvmPeerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSvmPeerProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("acceptCommand".equals(fieldName)) { + deserializedSvmPeerProperties.acceptCommand = reader.getString(); + } else if ("anfSvmName".equals(fieldName)) { + deserializedSvmPeerProperties.anfSvmName = reader.getString(); + } else if ("externalSvmResourceId".equals(fieldName)) { + deserializedSvmPeerProperties.externalSvmResourceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedSvmPeerProperties.status = SvmPeerStatus.fromString(reader.getString()); + } else if ("peerTypes".equals(fieldName)) { + List peerTypes + = reader.readArray(reader1 -> SvmPeerType.fromString(reader1.getString())); + deserializedSvmPeerProperties.peerTypes = peerTypes; + } else if ("hybridReplicationResourceIds".equals(fieldName)) { + List hybridReplicationResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedSvmPeerProperties.hybridReplicationResourceIds = hybridReplicationResourceIds; + } else if ("externalCacheConnectionResourceIds".equals(fieldName)) { + List externalCacheConnectionResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedSvmPeerProperties.externalCacheConnectionResourceIds + = externalCacheConnectionResourceIds; + } else { + reader.skipChildren(); + } + } + + return deserializedSvmPeerProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerStatus.java new file mode 100644 index 0000000000000..a88378115a29a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerStatus.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; + +/** + * SVM Peer status enum. + */ +public final class SvmPeerStatus extends ExpandableStringEnum { + /** + * Active peering. + */ + public static final SvmPeerStatus ACTIVE = fromString("Active"); + + /** + * Error state, use command on your cluster for more details(command: vserver peer show). + */ + public static final SvmPeerStatus ERROR = fromString("Error"); + + /** + * Pending state, the peering needs to be accepted on your SVM (command: vserver peer accept). + */ + public static final SvmPeerStatus PENDING = fromString("Pending"); + + /** + * Creates a new instance of SvmPeerStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SvmPeerStatus() { + } + + /** + * Creates or finds a SvmPeerStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SvmPeerStatus. + */ + public static SvmPeerStatus fromString(String name) { + return fromString(name, SvmPeerStatus.class); + } + + /** + * Gets known SvmPeerStatus values. + * + * @return known SvmPeerStatus values. + */ + public static Collection values() { + return values(SvmPeerStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerType.java new file mode 100644 index 0000000000000..d726aba57c317 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerType.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; + +/** + * SVM peer relationship type enum. + */ +public final class SvmPeerType extends ExpandableStringEnum { + /** + * Replication peer. + */ + public static final SvmPeerType REPLICATION = fromString("Replication"); + + /** + * Cache peer. + */ + public static final SvmPeerType CACHE = fromString("Cache"); + + /** + * Creates a new instance of SvmPeerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SvmPeerType() { + } + + /** + * Creates or finds a SvmPeerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SvmPeerType. + */ + public static SvmPeerType fromString(String name) { + return fromString(name, SvmPeerType.class); + } + + /** + * Gets known SvmPeerType values. + * + * @return known SvmPeerType values. + */ + public static Collection values() { + return values(SvmPeerType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeers.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeers.java new file mode 100644 index 0000000000000..60efe40348015 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SvmPeers.java @@ -0,0 +1,72 @@ +// Copyright (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 SvmPeers. + */ +public interface SvmPeers { + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @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 SVM Peer along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String externalClusterName, String peerId, + String svmPeerId, Context context); + + /** + * Get the SVM Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @param svmPeerId The name of the SvmPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the SVM Peer. + */ + SvmPeer get(String resourceGroupName, String externalClusterName, String peerId, String svmPeerId); + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 SvmPeer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId); + + /** + * List and describe all SVM Peers under a Cluster Peer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param externalClusterName The name of the ExternalCluster. + * @param peerId The name of the ClusterPeer. + * @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 SvmPeer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String externalClusterName, String peerId, + Context context); +} 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 6223c64289031..4b7fe8b84b058 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. */ @@ -293,6 +295,14 @@ public interface Volume { */ Boolean smbContinuouslyAvailable(); + /** + * Gets the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @return the smbOplocks value. + */ + SmbOplocks smbOplocks(); + /** * Gets the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this volume and this will * be accepted as input only for manual qosType volume. @@ -333,6 +343,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. * @@ -421,6 +438,13 @@ public interface Volume { */ Boolean isDefaultQuotaEnabled(); + /** + * Gets the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @return the asyncDirectoryDelete value. + */ + AsyncDirectoryDelete asyncDirectoryDelete(); + /** * Gets the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, * the minimum value of 4 KiBs applies . @@ -520,6 +544,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. * @@ -534,6 +569,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. * @@ -541,6 +583,13 @@ public interface Volume { */ BreakthroughMode breakthroughMode(); + /** + * Gets the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @return the geoNamespaceProperties value. + */ + VolumeNamespaceProperties geoNamespaceProperties(); + /** * Gets the region of the resource. * @@ -645,12 +694,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,16 +736,19 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithZon DefinitionStages.WithSnapshotDirectoryVisible, DefinitionStages.WithKerberosEnabled, DefinitionStages.WithSecurityStyle, DefinitionStages.WithSmbEncryption, DefinitionStages.WithSmbAccessBasedEnumeration, DefinitionStages.WithSmbNonBrowsable, - DefinitionStages.WithSmbContinuouslyAvailable, DefinitionStages.WithThroughputMibps, - DefinitionStages.WithEncryptionKeySource, DefinitionStages.WithKeyVaultPrivateEndpointResourceId, - DefinitionStages.WithLdapEnabled, DefinitionStages.WithCoolAccess, DefinitionStages.WithCoolnessPeriod, + DefinitionStages.WithSmbContinuouslyAvailable, DefinitionStages.WithSmbOplocks, + DefinitionStages.WithThroughputMibps, DefinitionStages.WithEncryptionKeySource, + DefinitionStages.WithKeyVaultPrivateEndpointResourceId, 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.WithBreakthroughMode { + DefinitionStages.WithIsDefaultQuotaEnabled, DefinitionStages.WithAsyncDirectoryDelete, + DefinitionStages.WithDefaultUserQuotaInKiBs, DefinitionStages.WithDefaultGroupQuotaInKiBs, + DefinitionStages.WithCapacityPoolResourceId, DefinitionStages.WithProximityPlacementGroup, + DefinitionStages.WithVolumeSpecName, DefinitionStages.WithPlacementRules, + DefinitionStages.WithEnableSubvolumes, DefinitionStages.WithIsLargeVolume, + DefinitionStages.WithLargeVolumeType, DefinitionStages.WithLanguage, DefinitionStages.WithBreakthroughMode, + DefinitionStages.WithGeoNamespaceProperties { /** * Executes the create request. * @@ -989,6 +1045,21 @@ interface WithSmbContinuouslyAvailable { WithCreate withSmbContinuouslyAvailable(Boolean smbContinuouslyAvailable); } + /** + * The stage of the Volume definition allowing to specify smbOplocks. + */ + interface WithSmbOplocks { + /** + * Specifies the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. + * Only applicable for SMB/DualProtocol volume. + * + * @param smbOplocks Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. + * @return the next definition stage. + */ + WithCreate withSmbOplocks(SmbOplocks smbOplocks); + } + /** * The stage of the Volume definition allowing to specify throughputMibps. */ @@ -1050,6 +1121,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. */ @@ -1175,6 +1259,19 @@ interface WithIsDefaultQuotaEnabled { WithCreate withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled); } + /** + * The stage of the Volume definition allowing to specify asyncDirectoryDelete. + */ + interface WithAsyncDirectoryDelete { + /** + * Specifies the asyncDirectoryDelete property: Async Directory Delete configuration for the volume.. + * + * @param asyncDirectoryDelete Async Directory Delete configuration for the volume. + * @return the next definition stage. + */ + WithCreate withAsyncDirectoryDelete(AsyncDirectoryDelete asyncDirectoryDelete); + } + /** * The stage of the Volume definition allowing to specify defaultUserQuotaInKiBs. */ @@ -1289,6 +1386,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. */ @@ -1301,6 +1432,19 @@ interface WithBreakthroughMode { */ WithCreate withBreakthroughMode(BreakthroughMode breakthroughMode); } + + /** + * The stage of the Volume definition allowing to specify geoNamespaceProperties. + */ + interface WithGeoNamespaceProperties { + /** + * Specifies the geoNamespaceProperties property: Geographic namespace properties for this volume.. + * + * @param geoNamespaceProperties Geographic namespace properties for this volume. + * @return the next definition stage. + */ + WithCreate withGeoNamespaceProperties(VolumeNamespaceProperties geoNamespaceProperties); + } } /** @@ -1315,12 +1459,12 @@ interface WithBreakthroughMode { */ interface Update extends UpdateStages.WithTags, UpdateStages.WithServiceLevel, UpdateStages.WithUsageThreshold, UpdateStages.WithExportPolicy, UpdateStages.WithProtocolTypes, UpdateStages.WithThroughputMibps, - UpdateStages.WithDataProtection, UpdateStages.WithIsDefaultQuotaEnabled, + UpdateStages.WithDataProtection, UpdateStages.WithIsDefaultQuotaEnabled, UpdateStages.WithAsyncDirectoryDelete, UpdateStages.WithDefaultUserQuotaInKiBs, UpdateStages.WithDefaultGroupQuotaInKiBs, UpdateStages.WithUnixPermissions, UpdateStages.WithCoolAccess, UpdateStages.WithCoolnessPeriod, UpdateStages.WithCoolAccessRetrievalPolicy, UpdateStages.WithCoolAccessTieringPolicy, UpdateStages.WithSnapshotDirectoryVisible, UpdateStages.WithSmbAccessBasedEnumeration, - UpdateStages.WithSmbNonBrowsable { + UpdateStages.WithSmbNonBrowsable, UpdateStages.WithSmbOplocks, UpdateStages.WithGeoNamespaceProperties { /** * Executes the update request. * @@ -1375,12 +1519,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); @@ -1459,6 +1607,19 @@ interface WithIsDefaultQuotaEnabled { Update withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled); } + /** + * The stage of the Volume update allowing to specify asyncDirectoryDelete. + */ + interface WithAsyncDirectoryDelete { + /** + * Specifies the asyncDirectoryDelete property: Async Directory Delete configuration for the volume.. + * + * @param asyncDirectoryDelete Async Directory Delete configuration for the volume. + * @return the next definition stage. + */ + Update withAsyncDirectoryDelete(AsyncDirectoryDelete asyncDirectoryDelete); + } + /** * The stage of the Volume update allowing to specify defaultUserQuotaInKiBs. */ @@ -1630,6 +1791,34 @@ interface WithSmbNonBrowsable { */ Update withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable); } + + /** + * The stage of the Volume update allowing to specify smbOplocks. + */ + interface WithSmbOplocks { + /** + * Specifies the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. + * Only applicable for SMB/DualProtocol volume. + * + * @param smbOplocks Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. + * @return the next definition stage. + */ + Update withSmbOplocks(SmbOplocks smbOplocks); + } + + /** + * The stage of the Volume update allowing to specify geoNamespaceProperties. + */ + interface WithGeoNamespaceProperties { + /** + * Specifies the geoNamespaceProperties property: Geographic namespace properties for this volume.. + * + * @param geoNamespaceProperties Geographic namespace properties for this volume. + * @return the next definition stage. + */ + Update withGeoNamespaceProperties(VolumePatchNamespaceProperties geoNamespaceProperties); + } } /** 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 a28b0a81ef763..9c341e380b548 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. @@ -723,6 +727,31 @@ public VolumeGroupVolumeProperties withSmbContinuouslyAvailable(Boolean smbConti return this; } + /** + * Get the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @return the smbOplocks value. + */ + public SmbOplocks smbOplocks() { + return this.innerProperties() == null ? null : this.innerProperties().smbOplocks(); + } + + /** + * Set the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @param smbOplocks the smbOplocks value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withSmbOplocks(SmbOplocks smbOplocks) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withSmbOplocks(smbOplocks); + return this; + } + /** * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this volume and this will * be accepted as input only for manual qosType volume. @@ -833,6 +862,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. * @@ -1055,6 +1107,29 @@ public VolumeGroupVolumeProperties withIsDefaultQuotaEnabled(Boolean isDefaultQu return this; } + /** + * Get the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @return the asyncDirectoryDelete value. + */ + public AsyncDirectoryDelete asyncDirectoryDelete() { + return this.innerProperties() == null ? null : this.innerProperties().asyncDirectoryDelete(); + } + + /** + * Set the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @param asyncDirectoryDelete the asyncDirectoryDelete value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withAsyncDirectoryDelete(AsyncDirectoryDelete asyncDirectoryDelete) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withAsyncDirectoryDelete(asyncDirectoryDelete); + return this; + } + /** * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, * the minimum value of 4 KiBs applies . @@ -1295,6 +1370,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. * @@ -1313,6 +1419,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. * @@ -1336,6 +1465,29 @@ public VolumeGroupVolumeProperties withBreakthroughMode(BreakthroughMode breakth return this; } + /** + * Get the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @return the geoNamespaceProperties value. + */ + public VolumeNamespaceProperties geoNamespaceProperties() { + return this.innerProperties() == null ? null : this.innerProperties().geoNamespaceProperties(); + } + + /** + * Set the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @param geoNamespaceProperties the geoNamespaceProperties value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withGeoNamespaceProperties(VolumeNamespaceProperties geoNamespaceProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withGeoNamespaceProperties(geoNamespaceProperties); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeNamespaceProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeNamespaceProperties.java new file mode 100644 index 0000000000000..34d39aae95807 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeNamespaceProperties.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; + +/** + * Geographic namespace properties for a volume. + */ +@Fluent +public final class VolumeNamespaceProperties implements JsonSerializable { + /* + * Indicates whether this volume is designated as an origin for cache volumes. + */ + private OriginVolume originVolume; + + /** + * Creates an instance of VolumeNamespaceProperties class. + */ + public VolumeNamespaceProperties() { + } + + /** + * Get the originVolume property: Indicates whether this volume is designated as an origin for cache volumes. + * + * @return the originVolume value. + */ + public OriginVolume originVolume() { + return this.originVolume; + } + + /** + * Set the originVolume property: Indicates whether this volume is designated as an origin for cache volumes. + * + * @param originVolume the originVolume value to set. + * @return the VolumeNamespaceProperties object itself. + */ + public VolumeNamespaceProperties withOriginVolume(OriginVolume originVolume) { + this.originVolume = originVolume; + 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("originVolume", this.originVolume == null ? null : this.originVolume.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeNamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeNamespaceProperties 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 VolumeNamespaceProperties. + */ + public static VolumeNamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeNamespaceProperties deserializedVolumeNamespaceProperties = new VolumeNamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("originVolume".equals(fieldName)) { + deserializedVolumeNamespaceProperties.originVolume = OriginVolume.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeNamespaceProperties; + }); + } +} 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 35246dc1818ba..eb410faf56ee6 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. @@ -306,6 +310,29 @@ public VolumePatch withIsDefaultQuotaEnabled(Boolean isDefaultQuotaEnabled) { return this; } + /** + * Get the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @return the asyncDirectoryDelete value. + */ + public AsyncDirectoryDelete asyncDirectoryDelete() { + return this.innerProperties() == null ? null : this.innerProperties().asyncDirectoryDelete(); + } + + /** + * Set the asyncDirectoryDelete property: Async Directory Delete configuration for the volume. + * + * @param asyncDirectoryDelete the asyncDirectoryDelete value to set. + * @return the VolumePatch object itself. + */ + public VolumePatch withAsyncDirectoryDelete(AsyncDirectoryDelete asyncDirectoryDelete) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumePatchProperties(); + } + this.innerProperties().withAsyncDirectoryDelete(asyncDirectoryDelete); + return this; + } + /** * Get the defaultUserQuotaInKiBs property: Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, * the minimum value of 4 KiBs applies . @@ -574,6 +601,54 @@ public VolumePatch withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable) { return this; } + /** + * Get the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @return the smbOplocks value. + */ + public SmbOplocks smbOplocks() { + return this.innerProperties() == null ? null : this.innerProperties().smbOplocks(); + } + + /** + * Set the smbOplocks property: Enables or disables SMB opportunistic lock property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. + * + * @param smbOplocks the smbOplocks value to set. + * @return the VolumePatch object itself. + */ + public VolumePatch withSmbOplocks(SmbOplocks smbOplocks) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumePatchProperties(); + } + this.innerProperties().withSmbOplocks(smbOplocks); + return this; + } + + /** + * Get the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @return the geoNamespaceProperties value. + */ + public VolumePatchNamespaceProperties geoNamespaceProperties() { + return this.innerProperties() == null ? null : this.innerProperties().geoNamespaceProperties(); + } + + /** + * Set the geoNamespaceProperties property: Geographic namespace properties for this volume. + * + * @param geoNamespaceProperties the geoNamespaceProperties value to set. + * @return the VolumePatch object itself. + */ + public VolumePatch withGeoNamespaceProperties(VolumePatchNamespaceProperties geoNamespaceProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumePatchProperties(); + } + this.innerProperties().withGeoNamespaceProperties(geoNamespaceProperties); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchNamespaceProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchNamespaceProperties.java new file mode 100644 index 0000000000000..418382856c585 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchNamespaceProperties.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; + +/** + * Geographic namespace properties for a volume patch operation. + */ +@Fluent +public final class VolumePatchNamespaceProperties implements JsonSerializable { + /* + * Indicates whether this volume is designated as an origin for cache volumes. + */ + private OriginVolume originVolume; + + /** + * Creates an instance of VolumePatchNamespaceProperties class. + */ + public VolumePatchNamespaceProperties() { + } + + /** + * Get the originVolume property: Indicates whether this volume is designated as an origin for cache volumes. + * + * @return the originVolume value. + */ + public OriginVolume originVolume() { + return this.originVolume; + } + + /** + * Set the originVolume property: Indicates whether this volume is designated as an origin for cache volumes. + * + * @param originVolume the originVolume value to set. + * @return the VolumePatchNamespaceProperties object itself. + */ + public VolumePatchNamespaceProperties withOriginVolume(OriginVolume originVolume) { + this.originVolume = originVolume; + 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("originVolume", this.originVolume == null ? null : this.originVolume.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePatchNamespaceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePatchNamespaceProperties 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 VolumePatchNamespaceProperties. + */ + public static VolumePatchNamespaceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePatchNamespaceProperties deserializedVolumePatchNamespaceProperties + = new VolumePatchNamespaceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("originVolume".equals(fieldName)) { + deserializedVolumePatchNamespaceProperties.originVolume + = OriginVolume.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePatchNamespaceProperties; + }); + } +} 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 0000000000000..be50c34ba00da --- /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 e24706a21dbc0..270cc5820551d 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-08-01"},"crossLanguagePackageId":"Microsoft.NetApp","crossLanguageVersion":"364a2f7b75ab","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.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.AccountPropertiesPatch":"Microsoft.NetApp.AccountPropertiesPatch","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.AccountEncryptionPatch":"Microsoft.NetApp.AccountEncryptionPatch","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.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.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.EncryptionIdentityPatch":"Microsoft.NetApp.EncryptionIdentityPatch","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.KeyVaultPropertiesPatch":"Microsoft.NetApp.KeyVaultPropertiesPatch","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","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.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.SecureLdapType":"Microsoft.NetApp.SecureLdapType","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/AccountPropertiesPatch.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/AccountEncryptionPatch.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/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/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/EncryptionIdentityPatch.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/KeyVaultPropertiesPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.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/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/SecureLdapType.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-08-15-preview"},"crossLanguagePackageId":"Microsoft.NetApp","crossLanguageVersion":"871694fcb939","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.ClusterPeersClient":"Microsoft.NetApp.ClusterPeers","com.azure.resourcemanager.netapp.fluent.ClusterPeersClient.get":"Microsoft.NetApp.ClusterPeers.get","com.azure.resourcemanager.netapp.fluent.ClusterPeersClient.getWithResponse":"Microsoft.NetApp.ClusterPeers.get","com.azure.resourcemanager.netapp.fluent.ClusterPeersClient.listByParent":"Microsoft.NetApp.ClusterPeers.listByParent","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.ExternalCacheConnectionsClient":"Microsoft.NetApp.ExternalCacheConnections","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.beginCreateOrUpdate":"Microsoft.NetApp.ExternalCacheConnections.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.beginDelete":"Microsoft.NetApp.ExternalCacheConnections.delete","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.beginUpdate":"Microsoft.NetApp.ExternalCacheConnections.update","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.createOrUpdate":"Microsoft.NetApp.ExternalCacheConnections.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.delete":"Microsoft.NetApp.ExternalCacheConnections.delete","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.getByResourceGroup":"Microsoft.NetApp.ExternalCacheConnections.get","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ExternalCacheConnections.get","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.list":"Microsoft.NetApp.ExternalCacheConnections.listBySubscription","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.listByResourceGroup":"Microsoft.NetApp.ExternalCacheConnections.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ExternalCacheConnectionsClient.update":"Microsoft.NetApp.ExternalCacheConnections.update","com.azure.resourcemanager.netapp.fluent.ExternalCachesClient":"Microsoft.NetApp.ExternalCaches","com.azure.resourcemanager.netapp.fluent.ExternalCachesClient.get":"Microsoft.NetApp.ExternalCaches.get","com.azure.resourcemanager.netapp.fluent.ExternalCachesClient.getWithResponse":"Microsoft.NetApp.ExternalCaches.get","com.azure.resourcemanager.netapp.fluent.ExternalCachesClient.listByParent":"Microsoft.NetApp.ExternalCaches.listByParent","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient":"Microsoft.NetApp.ExternalClusters","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.beginCreateOrUpdate":"Microsoft.NetApp.ExternalClusters.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.beginDelete":"Microsoft.NetApp.ExternalClusters.delete","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.beginUpdate":"Microsoft.NetApp.ExternalClusters.update","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.createOrUpdate":"Microsoft.NetApp.ExternalClusters.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.delete":"Microsoft.NetApp.ExternalClusters.delete","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.getByResourceGroup":"Microsoft.NetApp.ExternalClusters.get","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ExternalClusters.get","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.list":"Microsoft.NetApp.ExternalClusters.listBySubscription","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.listByResourceGroup":"Microsoft.NetApp.ExternalClusters.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ExternalClustersClient.update":"Microsoft.NetApp.ExternalClusters.update","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient":"Microsoft.NetApp.ExternalSvms","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.beginCreateOrUpdate":"Microsoft.NetApp.ExternalSvms.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.beginDelete":"Microsoft.NetApp.ExternalSvms.delete","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.beginUpdate":"Microsoft.NetApp.ExternalSvms.update","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.createOrUpdate":"Microsoft.NetApp.ExternalSvms.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.delete":"Microsoft.NetApp.ExternalSvms.delete","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.get":"Microsoft.NetApp.ExternalSvms.get","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.getWithResponse":"Microsoft.NetApp.ExternalSvms.get","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.listByParent":"Microsoft.NetApp.ExternalSvms.listByParent","com.azure.resourcemanager.netapp.fluent.ExternalSvmsClient.update":"Microsoft.NetApp.ExternalSvms.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.SvmPeersClient":"Microsoft.NetApp.SvmPeers","com.azure.resourcemanager.netapp.fluent.SvmPeersClient.get":"Microsoft.NetApp.SvmPeers.get","com.azure.resourcemanager.netapp.fluent.SvmPeersClient.getWithResponse":"Microsoft.NetApp.SvmPeers.get","com.azure.resourcemanager.netapp.fluent.SvmPeersClient.listByParent":"Microsoft.NetApp.SvmPeers.listByParent","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.ClusterPeerInner":"Microsoft.NetApp.ClusterPeer","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.ExternalCacheConnectionInner":"Microsoft.NetApp.ExternalCacheConnection","com.azure.resourcemanager.netapp.fluent.models.ExternalCacheInner":"Microsoft.NetApp.ExternalCache","com.azure.resourcemanager.netapp.fluent.models.ExternalClusterInner":"Microsoft.NetApp.ExternalCluster","com.azure.resourcemanager.netapp.fluent.models.ExternalSvmInner":"Microsoft.NetApp.ExternalSvm","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.SvmPeerInner":"Microsoft.NetApp.SvmPeer","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.ClusterPeerListResult":"Azure.ResourceManager.ResourceListResult","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.ExternalCacheConnectionList":"Microsoft.NetApp.ExternalCacheConnectionList","com.azure.resourcemanager.netapp.implementation.models.ExternalCacheListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ExternalClusterList":"Microsoft.NetApp.ExternalClusterList","com.azure.resourcemanager.netapp.implementation.models.ExternalSvmListResult":"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.SvmPeerListResult":"Azure.ResourceManager.ResourceListResult","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.AccountEncryptionPatch":"Microsoft.NetApp.AccountEncryptionPatch","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.AsyncDirectoryDelete":"Microsoft.NetApp.AsyncDirectoryDelete","com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus":"Microsoft.NetApp.AsyncDirectoryDeleteStatus","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.ClusterPeerProperties":"Microsoft.NetApp.ClusterPeerProperties","com.azure.resourcemanager.netapp.models.ClusterPeerStatus":"Microsoft.NetApp.ClusterPeerStatus","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.EncryptionIdentityPatch":"Microsoft.NetApp.EncryptionIdentityPatch","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.ExternalCacheConnectionProperties":"Microsoft.NetApp.ExternalCacheConnectionProperties","com.azure.resourcemanager.netapp.models.ExternalCacheConnectionStatus":"Microsoft.NetApp.ExternalCacheConnectionStatus","com.azure.resourcemanager.netapp.models.ExternalCacheConnectionTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.netapp.models.ExternalCacheProperties":"Microsoft.NetApp.ExternalCacheProperties","com.azure.resourcemanager.netapp.models.ExternalCacheState":"Microsoft.NetApp.ExternalCacheState","com.azure.resourcemanager.netapp.models.ExternalClusterProperties":"Microsoft.NetApp.ExternalClusterProperties","com.azure.resourcemanager.netapp.models.ExternalClusterUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ExternalClusterUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ExternalConnectionSetupState":"Microsoft.NetApp.ExternalConnectionSetupState","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.ExternalResourceNetworkInterfaces":"Microsoft.NetApp.ExternalResourceNetworkInterfaces","com.azure.resourcemanager.netapp.models.ExternalSvmProperties":"Microsoft.NetApp.ExternalSvmProperties","com.azure.resourcemanager.netapp.models.ExternalSvmTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","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.KeyVaultClusterPeerPassphrasePatchProperties":"Microsoft.NetApp.KeyVaultClusterPeerPassphrasePatchProperties","com.azure.resourcemanager.netapp.models.KeyVaultClusterPeerPassphraseProperties":"Microsoft.NetApp.KeyVaultClusterPeerPassphraseProperties","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultPropertiesPatch":"Microsoft.NetApp.KeyVaultPropertiesPatch","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.OriginVolume":"Microsoft.NetApp.OriginVolume","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.SecureLdapType":"Microsoft.NetApp.SecureLdapType","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.SetupInformation":"Microsoft.NetApp.SetupInformation","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.SmbOplocks":"Microsoft.NetApp.SmbOplocks","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.SvmPeerProperties":"Microsoft.NetApp.SvmPeerProperties","com.azure.resourcemanager.netapp.models.SvmPeerStatus":"Microsoft.NetApp.SvmPeerStatus","com.azure.resourcemanager.netapp.models.SvmPeerType":"Microsoft.NetApp.SvmPeerType","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.VolumeNamespaceProperties":"Microsoft.NetApp.VolumeNamespaceProperties","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchNamespaceProperties":"Microsoft.NetApp.VolumePatchNamespaceProperties","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/ClusterPeersClient.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/ExternalCacheConnectionsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalCachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalClustersClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ExternalSvmsClient.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/SvmPeersClient.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/ClusterPeerInner.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/ExternalCacheConnectionInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalCacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalClusterInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ExternalSvmInner.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/SvmPeerInner.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/ClusterPeerImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeersImpl.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/ExternalCacheConnectionImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheConnectionsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalCachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClusterImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalClustersImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ExternalSvmsImpl.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/SvmPeerImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeersImpl.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/ClusterPeerListResult.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/ExternalCacheConnectionList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalCacheListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalClusterList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ExternalSvmListResult.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/SvmPeerListResult.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/AccountEncryptionPatch.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/AsyncDirectoryDelete.java","src/main/java/com/azure/resourcemanager/netapp/models/AsyncDirectoryDeleteStatus.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/ClusterPeer.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/ClusterPeerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeers.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/EncryptionIdentityPatch.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/ExternalCache.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnection.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnectionTagsUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheConnections.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCacheState.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCaches.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalCluster.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusterUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalClusters.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalConnectionSetupState.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalResourceNetworkInterfaces.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvm.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvmTagsUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalSvms.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/KeyVaultClusterPeerPassphrasePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultClusterPeerPassphraseProperties.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/KeyVaultPropertiesPatch.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/OriginVolume.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/SecureLdapType.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/SetupInformation.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/SmbOplocks.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/SvmPeer.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/SvmPeerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerType.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeers.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/VolumeNamespaceProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchNamespaceProperties.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 c411aa3bf0d70..b529de108c172 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.ClusterPeersClientImpl$ClusterPeersService"],["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.ExternalCacheConnectionsClientImpl$ExternalCacheConnectionsService"],["com.azure.resourcemanager.netapp.implementation.ExternalCachesClientImpl$ExternalCachesService"],["com.azure.resourcemanager.netapp.implementation.ExternalClustersClientImpl$ExternalClustersService"],["com.azure.resourcemanager.netapp.implementation.ExternalSvmsClientImpl$ExternalSvmsService"],["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.SvmPeersClientImpl$SvmPeersService"],["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 bf2b4a6a6a0f1..c55b818203cb3 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-08-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2026-08-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 4c829d0dcc119..fd14355459836 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 @@ -16,7 +16,7 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -28,7 +28,7 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-08-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2026-08-15-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -55,7 +55,7 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-08-01/Accounts_CreateOrUpdateLdapConfig.json + * x-ms-original-file: 2026-08-15-preview/Accounts_CreateOrUpdateLdapConfig.json */ /** * Sample code: Accounts_CreateOrUpdateLdapConfig. 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 60b6147910814..ad045d747be3b 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-08-01/Accounts_Delete.json + * x-ms-original-file: 2026-08-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 384b5af9afe76..9301a7c11acd6 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-08-01/Accounts_Get.json + * x-ms-original-file: 2026-08-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 86cfd7bf8009f..75a696cd1d413 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-08-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2026-08-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 12ccc67a7621b..306c1b3c4d6ea 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-08-01/Accounts_List.json + * x-ms-original-file: 2026-08-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 d3454da5f3813..e29b2762fb876 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-08-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2026-08-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 index 282c846eeaaf2..ec256276f996b 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AccountsRefreshLdapBindPasswordSamples { /* - * x-ms-original-file: 2026-08-01/Accounts_RefreshLdapBindPassword.json + * x-ms-original-file: 2026-08-15-preview/Accounts_RefreshLdapBindPassword.json */ /** * Sample code: NetAppAccounts_RefreshLdapBindPassword. 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 db9948d15e5cf..a1d7d46bf676d 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-08-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2026-08-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 b60959a769cd2..b528ddf1c84d4 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-08-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2026-08-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 c84054f44e937..e9464b63816f5 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-08-01/Accounts_Update.json + * x-ms-original-file: 2026-08-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 0000000000000..5008e4edbb750 --- /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-08-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 0000000000000..890ddcacdcbe3 --- /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-08-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 0000000000000..04af9a4798215 --- /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-08-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 0000000000000..617e529376e4a --- /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-08-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 0000000000000..7271c15f26306 --- /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-08-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 0000000000000..49f96eaf0e108 --- /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-08-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 9b52db8aa9f0f..66338b085493c 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-08-01/BackupPolicies_Create.json + * x-ms-original-file: 2026-08-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 e8efe9003d771..91a16036d260b 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-08-01/BackupPolicies_Delete.json + * x-ms-original-file: 2026-08-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 a98965ac3b2fd..751648948daa0 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-08-01/BackupPolicies_Get.json + * x-ms-original-file: 2026-08-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 d758edcee66db..e867f969eea77 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-08-01/BackupPolicies_List.json + * x-ms-original-file: 2026-08-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 8fe5d417ee58f..4793470da5297 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-08-01/BackupPolicies_Update.json + * x-ms-original-file: 2026-08-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 8c2e4fc6007a4..14c5dba6e7ae6 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-08-01/BackupVaults_Create.json + * x-ms-original-file: 2026-08-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 4a20f2ddc8ac8..d85c8976b8dbd 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-08-01/BackupVaults_Delete.json + * x-ms-original-file: 2026-08-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 08fd57e7c30a1..396e9c267f793 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-08-01/BackupVaults_Get.json + * x-ms-original-file: 2026-08-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 e5f26b92ce70b..38a3026156d9f 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-08-01/BackupVaults_List.json + * x-ms-original-file: 2026-08-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 53df0b9258a4a..37cfa64a7e0fa 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-08-01/BackupVaults_Update.json + * x-ms-original-file: 2026-08-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 41076dec2ed2c..9bea2b2d34ca0 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-08-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2026-08-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 9faa89572fdc5..63081eabb99af 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-08-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2026-08-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 619fbfe7c84b0..8701bca046030 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-08-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2026-08-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 8b33783434a24..628df2f36b97f 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-08-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2026-08-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 f5bb58314d593..a7fafc1b3a5e1 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-08-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2026-08-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 46601ff871ca9..8276b8dd4c826 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,7 +9,7 @@ */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: 2026-08-01/Backups_ListByVault.json + * x-ms-original-file: 2026-08-15-preview/Backups_ListByVault.json */ /** * Sample code: Backups_ListByVault. 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 64a00565141be..717e2be3ca72e 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-08-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2026-08-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 7d234b83d0497..261cc3a2010d9 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-08-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2026-08-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 018760064ae29..7c7969b2bfc47 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-08-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2026-08-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 fe6806a17bc18..08c6cb1c5cec1 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-08-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2026-08-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 6d502de0f1c6e..debd36e4f5c26 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-08-01/Buckets_CreateOrUpdate.json + * x-ms-original-file: 2026-08-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-08-01/Buckets_CreateOrUpdateWithAkv.json + * x-ms-original-file: 2026-08-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 578297b705cfd..5a85e955a1d01 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-08-01/Buckets_Delete.json + * x-ms-original-file: 2026-08-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 6224da9c53d9a..d8ae2e1f34490 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-08-01/Buckets_GenerateAkvCredentials.json + * x-ms-original-file: 2026-08-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 31ff401719838..540027a71aa16 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-08-01/Buckets_GenerateCredentials.json + * x-ms-original-file: 2026-08-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 54ab0e22fb58c..ffa5c85693950 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-08-01/Buckets_Get.json + * x-ms-original-file: 2026-08-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 a79bbac4c46f3..c021a65094ea1 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-08-01/Buckets_List.json + * x-ms-original-file: 2026-08-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 bc13ec13c5532..8e3b3a71b0327 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-08-01/Buckets_RefreshCertificate.json + * x-ms-original-file: 2026-08-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 8481787756cfb..cc405028d0a51 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-08-01/Buckets_Update.json + * x-ms-original-file: 2026-08-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-08-01/Buckets_UpdateWithAkv.json + * x-ms-original-file: 2026-08-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 243b89447e6f3..ebff7419daf0c 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 @@ -9,6 +9,11 @@ import com.azure.resourcemanager.netapp.models.LdapServerType; import com.azure.resourcemanager.netapp.models.LdapState; import com.azure.resourcemanager.netapp.models.OriginClusterInformation; +import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; +import com.azure.resourcemanager.netapp.models.SmbEncryptionState; +import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.SmbOplocks; +import com.azure.resourcemanager.netapp.models.SmbSettings; import java.util.Arrays; /** @@ -16,7 +21,38 @@ */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Caches_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Caches_CreateOrUpdate_SMB.json + */ + /** + * Sample code: Caches_CreateOrUpdate_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesCreateOrUpdateSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches() + .define("cache1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withProperties(new CacheProperties().withFilePath("cache-smb-01") + .withSize(107374182400L) + .withCacheSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1") + .withPeeringSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1") + .withSmbSettings(new SmbSettings().withSmbEncryption(SmbEncryptionState.ENABLED) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbOplocks(SmbOplocks.ENABLED)) + .withEncryptionKeySource(EncryptionKeySource.MICROSOFT_NET_APP) + .withOriginClusterInformation(new OriginClusterInformation().withPeerClusterName("cluster1") + .withPeerAddresses(Arrays.asList("192.0.2.10", "192.0.2.11")) + .withPeerVserverName("vserver1") + .withPeerVolumeName("originvol1"))) + .create(); + } + + /* + * x-ms-original-file: 2026-08-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 b8b77fd7280cf..9b0bbeb9ffe0e 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-08-01/Caches_Delete.json + * x-ms-original-file: 2026-08-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 14a1ebf89612f..835bbcf54e944 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-08-01/Caches_Get.json + * x-ms-original-file: 2026-08-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 b481114974329..d4b6459df5f91 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-08-01/Caches_ListPeeringPassphrases.json + * x-ms-original-file: 2026-08-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 a9d7ca7f45de7..6f6f52bf0b997 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-08-01/Caches_List.json + * x-ms-original-file: 2026-08-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 1e89c479f9554..e553084a170d7 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-08-01/Caches_PoolChange.json + * x-ms-original-file: 2026-08-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 84b296d594065..929891c8266dc 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-08-01/Caches_ResetSmbPassword.json + * x-ms-original-file: 2026-08-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 5ef50b60e0261..13fefa4fc5b9e 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-08-01/Caches_Update.json + * x-ms-original-file: 2026-08-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/ClusterPeersGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ClusterPeersGetSamples.java new file mode 100644 index 0000000000000..18dd10d3a5feb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ClusterPeersGetSamples.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 ClusterPeers Get. + */ +public final class ClusterPeersGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ClusterPeers_Get.json + */ + /** + * Sample code: ClusterPeers_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void clusterPeersGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.clusterPeers() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "peerA", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ClusterPeersListByParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ClusterPeersListByParentSamples.java new file mode 100644 index 0000000000000..11f0c7c378740 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ClusterPeersListByParentSamples.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 ClusterPeers ListByParent. + */ +public final class ClusterPeersListByParentSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ClusterPeers_ListByParent.json + */ + /** + * Sample code: ClusterPeers_ListByParent. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void clusterPeersListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.clusterPeers() + .listByParent("contosoNetAppRg", "contoso-external-cluster", com.azure.core.util.Context.NONE); + } +} 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 0000000000000..848ab19b9f143 --- /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-08-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 0000000000000..eeadd328c4701 --- /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-08-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 0000000000000..d065ff8af3e25 --- /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-08-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 0000000000000..856903c8ca8b0 --- /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-08-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 0000000000000..1c47b1204b2d9 --- /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-08-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 0000000000000..23c1b93f1a826 --- /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-08-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 0000000000000..82576b611aede --- /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-08-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 0000000000000..3578e224aa264 --- /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-08-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 0000000000000..a111949d7572d --- /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-08-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 0000000000000..88a8e80db364f --- /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-08-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 0000000000000..8e9eef8bea282 --- /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-08-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 0000000000000..6cdeb5d3e91f5 --- /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-08-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 0000000000000..d546d37c025ed --- /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-08-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 0000000000000..e190a226c8643 --- /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-08-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 0000000000000..a54f1cdf82f62 --- /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-08-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 0000000000000..0edc83f67de8d --- /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-08-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 0000000000000..886ed71deb7f0 --- /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-08-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 0000000000000..a8cf8ff6d1aa6 --- /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-08-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 0000000000000..a021b103f4182 --- /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-08-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 0000000000000..d6903f4e42c6c --- /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-08-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 0000000000000..03008576b3182 --- /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-08-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 0000000000000..55a93089448c3 --- /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-08-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 0000000000000..16dd7899f9d59 --- /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-08-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 0000000000000..0dc1fad52e373 --- /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-08-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-08-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 0000000000000..2f5b0f594037f --- /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-08-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 0000000000000..f75d151cab835 --- /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-08-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 0000000000000..cdcbf11d89924 --- /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-08-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 0000000000000..0f61476703745 --- /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-08-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 0000000000000..e1445df2bd1e0 --- /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-08-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 0000000000000..fa6a997e881bb --- /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-08-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 0000000000000..960c08a2ad7aa --- /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-08-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 0000000000000..3616e0d0a3158 --- /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-08-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 0000000000000..32e6e1c431323 --- /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-08-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 0000000000000..0884bf43ee44f --- /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-08-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 0000000000000..20a08fb03b43d --- /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-08-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 0000000000000..b789a8fad330d --- /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-08-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 0000000000000..81bc5c9904aed --- /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-08-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 0000000000000..231ad49456ab7 --- /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-08-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 0000000000000..47befe6923f46 --- /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-08-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 0000000000000..cc06443d60b71 --- /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-08-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 0000000000000..9017ce20201bd --- /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-08-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 0000000000000..3531023dcba68 --- /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-08-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 0000000000000..74ccb1a1789a0 --- /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-08-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 0000000000000..e20287d901d23 --- /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-08-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/ExternalCacheConnectionsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..8a2f71c78f8ba --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsCreateOrUpdateSamples.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.resourcemanager.netapp.models.ExternalCacheConnectionProperties; + +/** + * Samples for ExternalCacheConnections CreateOrUpdate. + */ +public final class ExternalCacheConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_CreateOrUpdate.json + */ + /** + * Sample code: ExternalCacheConnections_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalCacheConnectionsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections() + .define("contosoCacheConnection") + .withRegion("eastus") + .withExistingResourceGroup("contosoNetAppRg") + .withProperties(new ExternalCacheConnectionProperties().withOriginVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.NetApp/netAppAccounts/contosoAccount/capacityPools/contosoPool/volumes/contosoVolume") + .withExternalCacheName("contosoCache") + .withExternalSvmResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.NetApp/externalClusters/contosoExternalCluster/externalSvms/contosoExternalSvm") + .withClusterPeerSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.Network/virtualNetworks/contosoVnet/subnets/contosoSubnet")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsDeleteSamples.java new file mode 100644 index 0000000000000..9ae5102a97129 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsDeleteSamples.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 ExternalCacheConnections Delete. + */ +public final class ExternalCacheConnectionsDeleteSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_Delete.json + */ + /** + * Sample code: ExternalCacheConnections_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCacheConnectionsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections() + .delete("contosoNetAppRg", "contosoCacheConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..c75957dc75e02 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsGetByResourceGroupSamples.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 ExternalCacheConnections GetByResourceGroup. + */ +public final class ExternalCacheConnectionsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_Get.json + */ + /** + * Sample code: ExternalCacheConnections_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCacheConnectionsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections() + .getByResourceGroupWithResponse("contosoNetAppRg", "contosoCacheConnection", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..acaf8d581ac26 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListByResourceGroupSamples.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 ExternalCacheConnections ListByResourceGroup. + */ +public final class ExternalCacheConnectionsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_ListByResourceGroup.json + */ + /** + * Sample code: ExternalCacheConnections_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalCacheConnectionsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections().listByResourceGroup("contosoNetAppRg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListSamples.java new file mode 100644 index 0000000000000..d64c025e479c6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListSamples.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 ExternalCacheConnections List. + */ +public final class ExternalCacheConnectionsListSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_ListBySubscription.json + */ + /** + * Sample code: ExternalCacheConnections_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalCacheConnectionsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCacheConnections().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsUpdateSamples.java new file mode 100644 index 0000000000000..140a5e53dcac6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsUpdateSamples.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.generated; + +import com.azure.resourcemanager.netapp.models.ExternalCacheConnection; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExternalCacheConnections Update. + */ +public final class ExternalCacheConnectionsUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCacheConnections_Update.json + */ + /** + * Sample code: ExternalCacheConnections_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCacheConnectionsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ExternalCacheConnection resource = manager.externalCacheConnections() + .getByResourceGroupWithResponse("contosoNetAppRg", "contosoCacheConnection", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("env", "prod")).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/ExternalCachesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCachesGetSamples.java new file mode 100644 index 0000000000000..12e60d16071f7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCachesGetSamples.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 ExternalCaches Get. + */ +public final class ExternalCachesGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCaches_Get.json + */ + /** + * Sample code: ExternalCaches_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCachesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCaches() + .getWithResponse("contosoNetAppRg", "contosoExternalCluster", "contosoExternalSvm", "contosoCache_AB12", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCachesListByParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCachesListByParentSamples.java new file mode 100644 index 0000000000000..b6db4c6aab34c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalCachesListByParentSamples.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 ExternalCaches ListByParent. + */ +public final class ExternalCachesListByParentSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalCaches_ListByParent.json + */ + /** + * Sample code: ExternalCaches_ListByParent. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalCachesListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalCaches() + .listByParent("contosoNetAppRg", "contosoExternalCluster", "contosoExternalSvm", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..1c7b455c052b0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersCreateOrUpdateSamples.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.ExternalClusterProperties; +import com.azure.resourcemanager.netapp.models.KeyVaultClusterPeerPassphraseProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExternalClusters CreateOrUpdate. + */ +public final class ExternalClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_CreateOrUpdate.json + */ + /** + * Sample code: ExternalClusters_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalClustersCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters() + .define("contoso-external-cluster") + .withRegion("eastus") + .withExistingResourceGroup("contosoNetAppRg") + .withProperties(new ExternalClusterProperties() + .withInterclusterLifsIpAddresses(Arrays.asList("10.0.1.100", "10.0.1.101")) + .withClusterPeerPassphraseKeyVault(new KeyVaultClusterPeerPassphraseProperties() + .withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder") + .withUserAssignedIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contosoIdentity1"))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoNetAppRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contosoIdentity1", + 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/ExternalClustersDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersDeleteSamples.java new file mode 100644 index 0000000000000..db53f4c3725cf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersDeleteSamples.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 ExternalClusters Delete. + */ +public final class ExternalClustersDeleteSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_Delete.json + */ + /** + * Sample code: ExternalClusters_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalClustersDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters() + .delete("contosoNetAppRg", "contoso-external-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..d4d727f5a27ce --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersGetByResourceGroupSamples.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 ExternalClusters GetByResourceGroup. + */ +public final class ExternalClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_Get.json + */ + /** + * Sample code: ExternalClusters_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalClustersGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters() + .getByResourceGroupWithResponse("contosoNetAppRg", "contoso-external-cluster", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersListByResourceGroupSamples.java new file mode 100644 index 0000000000000..9d2da5c11f73c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersListByResourceGroupSamples.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 ExternalClusters ListByResourceGroup. + */ +public final class ExternalClustersListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_ListByResourceGroup.json + */ + /** + * Sample code: ExternalClusters_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + externalClustersListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters().listByResourceGroup("contosoNetAppRg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersListSamples.java new file mode 100644 index 0000000000000..7016be6eb070b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersListSamples.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 ExternalClusters List. + */ +public final class ExternalClustersListSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_ListBySubscription.json + */ + /** + * Sample code: ExternalClusters_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalClustersListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalClusters().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersUpdateSamples.java new file mode 100644 index 0000000000000..1acea29fd84ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalClustersUpdateSamples.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.resourcemanager.netapp.models.ExternalCluster; +import com.azure.resourcemanager.netapp.models.ExternalClusterUpdateProperties; + +/** + * Samples for ExternalClusters Update. + */ +public final class ExternalClustersUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalClusters_Update.json + */ + /** + * Sample code: ExternalClusters_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalClustersUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ExternalCluster resource = manager.externalClusters() + .getByResourceGroupWithResponse("contosoNetAppRg", "contoso-external-cluster", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new ExternalClusterUpdateProperties()).apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..08b35b8155269 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsCreateOrUpdateSamples.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.resourcemanager.netapp.models.ExternalSvmProperties; + +/** + * Samples for ExternalSvms CreateOrUpdate. + */ +public final class ExternalSvmsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_CreateOrUpdate.json + */ + /** + * Sample code: ExternalSvms_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalSvmsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .define("contoso-svm") + .withRegion("eastus") + .withExistingExternalCluster("contosoNetAppRg", "contoso-external-cluster") + .withProperties(new ExternalSvmProperties().withOntapSvmName("contoso-svm")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsDeleteSamples.java new file mode 100644 index 0000000000000..fb2f08931528f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsDeleteSamples.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 ExternalSvms Delete. + */ +public final class ExternalSvmsDeleteSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_Delete.json + */ + /** + * Sample code: ExternalSvms_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalSvmsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .delete("contosoNetAppRg", "contoso-external-cluster", "contoso-svm", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsGetSamples.java new file mode 100644 index 0000000000000..7917880e585b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsGetSamples.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 ExternalSvms Get. + */ +public final class ExternalSvmsGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_Get.json + */ + /** + * Sample code: ExternalSvms_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalSvmsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "contoso-svm", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsListByParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsListByParentSamples.java new file mode 100644 index 0000000000000..413c5fe83e4c7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsListByParentSamples.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 ExternalSvms ListByParent. + */ +public final class ExternalSvmsListByParentSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_ListByParent.json + */ + /** + * Sample code: ExternalSvms_ListByParent. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalSvmsListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.externalSvms() + .listByParent("contosoNetAppRg", "contoso-external-cluster", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsUpdateSamples.java new file mode 100644 index 0000000000000..e8aaeecae015a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsUpdateSamples.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.generated; + +import com.azure.resourcemanager.netapp.models.ExternalSvm; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExternalSvms Update. + */ +public final class ExternalSvmsUpdateSamples { + /* + * x-ms-original-file: 2026-08-15-preview/ExternalSvms_Update.json + */ + /** + * Sample code: ExternalSvms_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void externalSvmsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ExternalSvm resource = manager.externalSvms() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "contoso-svm", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("environment", "production")).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/NetAppResourceCheckFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java index dca13b817baff..9fc8a27c74b59 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-08-01/CheckFilePathAvailability.json + * x-ms-original-file: 2026-08-15-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java index da508e6b88211..f19c8d1508887 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-08-01/CheckNameAvailability.json + * x-ms-original-file: 2026-08-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 2d344f186c7a0..7a2b4665d4e97 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-08-01/CheckQuotaAvailability.json + * x-ms-original-file: 2026-08-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 02bcbbb81936c..e6406f2b27df1 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-08-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2026-08-15-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java index 43a1b03d4b216..2e890a1e9931b 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-08-01/RegionInfo.json + * x-ms-original-file: 2026-08-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 ad649cd4bbcdb..c7d837106f33b 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-08-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2026-08-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 b75d935ad88ff..765963623e17e 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-08-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2026-08-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 91eca5df3a1e0..4011d5ffd3fe2 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-08-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2026-08-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 28138736f25c7..34fe47ccd9539 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-08-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2026-08-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 264181bddc9b5..82dc120b496fe 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-08-01/RegionInfos_Get.json + * x-ms-original-file: 2026-08-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 281d0f70c2a39..5e722adafa7e8 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-08-01/RegionInfos_List.json + * x-ms-original-file: 2026-08-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 f6f99de0aed78..6ac16d72f104c 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-08-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2026-08-15-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. 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 8a0c36cf6df3a..42466dbf52ed2 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-08-01/Usages_Get.json + * x-ms-original-file: 2026-08-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 3d310b0f9ba12..470c2138dfbca 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-08-01/Usages_List.json + * x-ms-original-file: 2026-08-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 d64d5fcdece4e..0fcc0510d9808 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-08-01/OperationList.json + * x-ms-original-file: 2026-08-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 329aedba7a52a..3b0b27a465aa8 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-08-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2026-08-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-08-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2026-08-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 36ad9a17832e8..f3318b8e5f277 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-08-01/Pools_Delete.json + * x-ms-original-file: 2026-08-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 bb33431bf7015..09671ba793746 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-08-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2026-08-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-08-01/Pools_Get.json + * x-ms-original-file: 2026-08-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 7c4a29dead3a8..8bf8b2643de72 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-08-01/Pools_List.json + * x-ms-original-file: 2026-08-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 78c800a6846d0..ef1605acbae72 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-08-01/Pools_Update.json + * x-ms-original-file: 2026-08-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-08-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2026-08-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 460c9c9f50268..8c427bb48ebf6 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-08-01/RansomwareReports_ClearSuspects.json + * x-ms-original-file: 2026-08-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 da06d2823f807..2758862e383d4 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-08-01/RansomwareReports_Get.json + * x-ms-original-file: 2026-08-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 0fa8c62d25874..e33d67a675c0e 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-08-01/RansomwareReports_List.json + * x-ms-original-file: 2026-08-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 e494c985b4b03..ed129a61e5186 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-08-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2026-08-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 7ac042334dcfa..db1a21f41a125 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-08-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2026-08-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 9cfd2b56cd9ca..ba6f55f10b257 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-08-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2026-08-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 160d49499ab27..bde13637f5de0 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-08-01/SnapshotPolicies_List.json + * x-ms-original-file: 2026-08-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 05ebfa532df74..bc93a06ce244e 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-08-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2026-08-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 9f19268ed95da..84253b7fa5f09 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-08-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2026-08-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 f7de613b30fd8..cb1022718452c 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-08-01/Snapshots_Create.json + * x-ms-original-file: 2026-08-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 91609f80353fd..f4567fc1d90b4 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-08-01/Snapshots_Delete.json + * x-ms-original-file: 2026-08-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 b77488a8c5ca1..ba205bf700d2f 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-08-01/Snapshots_Get.json + * x-ms-original-file: 2026-08-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 4624aeadc3450..7dbb362922d4e 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-08-01/Snapshots_List.json + * x-ms-original-file: 2026-08-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 04b557b8dad9f..1950968a16d21 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-08-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2026-08-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 f7fa76a153e9b..e53d159c1cddb 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-08-01/Subvolumes_Create.json + * x-ms-original-file: 2026-08-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 7799a1b81e064..2d4245a95a6e4 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-08-01/Subvolumes_Delete.json + * x-ms-original-file: 2026-08-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 90f265431103c..f6d2a3b6481c0 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-08-01/Subvolumes_Metadata.json + * x-ms-original-file: 2026-08-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 ba1611b6152cb..0e112af0293e4 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-08-01/Subvolumes_Get.json + * x-ms-original-file: 2026-08-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 1194b34ed24d8..fd922f1a66f42 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-08-01/Subvolumes_List.json + * x-ms-original-file: 2026-08-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 75fd9bb010d76..10e4eb2b5c6f6 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-08-01/Subvolumes_Update.json + * x-ms-original-file: 2026-08-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/SvmPeersGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SvmPeersGetSamples.java new file mode 100644 index 0000000000000..4d696f8d30165 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SvmPeersGetSamples.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 SvmPeers Get. + */ +public final class SvmPeersGetSamples { + /* + * x-ms-original-file: 2026-08-15-preview/SvmPeers_Get.json + */ + /** + * Sample code: SvmPeers_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void svmPeersGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.svmPeers() + .getWithResponse("contosoNetAppRg", "contoso-external-cluster", "peerA", "contoso-svm-peer-a", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SvmPeersListByParentSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SvmPeersListByParentSamples.java new file mode 100644 index 0000000000000..b51d9b034a632 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SvmPeersListByParentSamples.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 SvmPeers ListByParent. + */ +public final class SvmPeersListByParentSamples { + /* + * x-ms-original-file: 2026-08-15-preview/SvmPeers_ListByParent.json + */ + /** + * Sample code: SvmPeers_ListByParent. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void svmPeersListByParent(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.svmPeers() + .listByParent("contosoNetAppRg", "contoso-external-cluster", "peerA", com.azure.core.util.Context.NONE); + } +} 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 d4131cc7b49aa..f3009916ff59f 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 @@ -20,7 +20,7 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -180,7 +180,7 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -524,7 +524,7 @@ public static void volumeGroupsCreateOracle(com.azure.resourcemanager.netapp.Net } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_Custom.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_Custom.json */ /** * Sample code: VolumeGroups_Create_Custom. @@ -868,7 +868,7 @@ public static void volumeGroupsCreateCustom(com.azure.resourcemanager.netapp.Net } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Create_Custom_SMB.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Create_Custom_SMB.json */ /** * Sample code: VolumeGroups_Create_Custom_SMB. 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 1ff8d59cadb9b..fbc5c8db8c8e7 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-08-01/VolumeGroups_Delete.json + * x-ms-original-file: 2026-08-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 9fa54dedf55d7..8bf67b9537910 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,7 @@ */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_Custom.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_Custom.json */ /** * Sample code: VolumeGroups_Get_Custom. @@ -21,7 +21,7 @@ public static void volumeGroupsGetCustom(com.azure.resourcemanager.netapp.NetApp } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -33,7 +33,7 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_Custom_SMB.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_Get_Custom_SMB.json */ /** * Sample code: VolumeGroups_Get_Custom_SMB. @@ -45,7 +45,7 @@ public static void volumeGroupsGetCustomSMB(com.azure.resourcemanager.netapp.Net } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2026-08-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 0a19abc83cb58..842482c619589 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,7 @@ */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2026-08-01/VolumeGroups_List_Custom.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_List_Custom.json */ /** * Sample code: VolumeGroups_List_Custom. @@ -21,7 +21,7 @@ public static void volumeGroupsListCustom(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2026-08-15-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -33,7 +33,7 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2026-08-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2026-08-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 e1ef4aea4c69b..5f70de87b3ad2 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-08-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2026-08-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 01ebb63604fd0..e9c35d7fa773d 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-08-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2026-08-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 a848a3df49da6..43a25f30d6621 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-08-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2026-08-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 0b25fb7fd9126..842a78712ec6a 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-08-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2026-08-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 e24e876b64eee..f537d5b342732 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-08-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2026-08-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 e0cec09d30985..8618616a7bee8 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-08-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2026-08-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 b97ab55c4c7d5..d479cb0e50068 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-08-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2026-08-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 6349dd026deca..d8cfb6cad6171 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-08-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2026-08-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 f14a1a8d7aa93..a47a638d42bba 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-08-01/Volumes_BreakReplication.json + * x-ms-original-file: 2026-08-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 0b37a2e544068..80b1ab4ad2461 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java @@ -4,14 +4,20 @@ package com.azure.resourcemanager.netapp.generated; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; 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.SmbOplocks; +import java.util.Arrays; /** * Samples for Volumes CreateOrUpdate. */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2026-08-15-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -28,6 +34,35 @@ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetApp .withSubnetId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) + .withAsyncDirectoryDelete( + new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.ENABLED).withTrashBinName("trash")) + .create(); + } + + /* + * x-ms-original-file: 2026-08-15-preview/Volumes_CreateOrUpdate_SMB.json + */ + /** + * Sample code: Volumes_CreateOrUpdate_SMB. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesCreateOrUpdateSMB(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes() + .define("volume1") + .withRegion("eastus") + .withExistingCapacityPool("myRG", "account1", "pool1") + .withCreationToken("my-smb-volume") + .withUsageThreshold(107374182400L) + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withServiceLevel(ServiceLevel.PREMIUM) + .withProtocolTypes(Arrays.asList("CIFS")) + .withSmbEncryption(true) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbContinuouslyAvailable(true) + .withSmbOplocks(SmbOplocks.ENABLED) .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 21211108b875d..346ead6ea2800 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-08-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2026-08-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 a431b55dfb323..e3111930fdaae 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-08-01/Volumes_Delete.json + * x-ms-original-file: 2026-08-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 7941f3c4c660a..7bba54f55d5bc 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-08-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2026-08-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 05afcfc28136e..bc203eb8c13eb 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-08-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2026-08-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 8b0d54d79c6c9..a7180a1894afc 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,7 @@ */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ExtraLargeVolumes_Get.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ExtraLargeVolumes_Get.json */ /** * Sample code: Volumes_ExtralargeVolumeGet. @@ -21,7 +21,7 @@ public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.N } /* - * x-ms-original-file: 2026-08-01/Volumes_Get.json + * x-ms-original-file: 2026-08-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 3d2330cf39e47..7a53437dfc4a1 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-08-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2026-08-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 c28d2ad606c17..a8bb7c1e848d9 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-08-01/Volumes_ListQuotaReport.json + * x-ms-original-file: 2026-08-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 e3d8d0e8b6aba..8cadc034ac0be 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-08-01/Volumes_ListReplications.json + * x-ms-original-file: 2026-08-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 7a81737a738e5..23ec9770c5f40 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,7 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_ExtraLargeVolumes_List.json + * x-ms-original-file: 2026-08-15-preview/Volumes_ExtraLargeVolumes_List.json */ /** * Sample code: Volumes_ExtralargeVolumeList. @@ -21,7 +21,7 @@ public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp. } /* - * x-ms-original-file: 2026-08-01/Volumes_List.json + * x-ms-original-file: 2026-08-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 8172cad91eee1..786f518bf05fe 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-08-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2026-08-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 860a38fae6dfa..4028e0d68201f 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-08-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2026-08-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 51d42c8b76053..f44f1f6805d22 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-08-01/Volumes_PoolChange.json + * x-ms-original-file: 2026-08-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 bab8ed4c8867a..b12833cbcc3e0 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-08-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2026-08-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 fcbc971599cff..82f4daf6f414d 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-08-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2026-08-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 5c43c066e2099..7b5ab1f883463 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-08-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2026-08-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 9d64171faffa8..fbff90e9e45bb 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-08-01/Volumes_Relocate.json + * x-ms-original-file: 2026-08-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 c159f0f1de93a..34c2e6151dedf 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-08-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2026-08-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 1ca24a7e44638..59a474af60772 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-08-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2026-08-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 38e93e22f8b81..c45d64673c986 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-08-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2026-08-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 52bbe87780998..3c8eff294551f 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-08-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2026-08-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 e4c6f0fb78b1a..5a95e668c2470 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-08-01/Volumes_Revert.json + * x-ms-original-file: 2026-08-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 001069aec52c8..35460fbebdb6d 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-08-01/Volumes_SplitClone.json + * x-ms-original-file: 2026-08-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 70382993db198..76be1a74e68bd 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 @@ -4,6 +4,8 @@ package com.azure.resourcemanager.netapp.generated; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; import com.azure.resourcemanager.netapp.models.Volume; /** @@ -11,7 +13,7 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2026-08-01/Volumes_Update.json + * x-ms-original-file: 2026-08-15-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. @@ -22,6 +24,9 @@ public static void volumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesMan Volume resource = manager.volumes() .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) .getValue(); - resource.update().apply(); + resource.update() + .withAsyncDirectoryDelete( + new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.ENABLED).withTrashBinName("trash")) + .apply(); } } 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 7641a9a562bc2..51808e5c4a0a3 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("alwcjgckbb", "ccgzpraoxnyu", com.azure.core.util.Context.NONE); + manager.accounts().renewCredentials("sxgamtdtkw", "pt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AsyncDirectoryDeleteTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AsyncDirectoryDeleteTests.java new file mode 100644 index 0000000000000..6490670b2efe9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AsyncDirectoryDeleteTests.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.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; +import org.junit.jupiter.api.Assertions; + +public final class AsyncDirectoryDeleteTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AsyncDirectoryDelete model = BinaryData.fromString("{\"status\":\"Enabled\",\"trashBinName\":\"bfs\"}") + .toObject(AsyncDirectoryDelete.class); + Assertions.assertEquals(AsyncDirectoryDeleteStatus.ENABLED, model.status()); + Assertions.assertEquals("bfs", model.trashBinName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AsyncDirectoryDelete model + = new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.ENABLED).withTrashBinName("bfs"); + model = BinaryData.fromObject(model).toObject(AsyncDirectoryDelete.class); + Assertions.assertEquals(AsyncDirectoryDeleteStatus.ENABLED, model.status()); + Assertions.assertEquals("bfs", model.trashBinName()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java index 415de9e52c7df..808a786343fd5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java @@ -12,14 +12,14 @@ public final class AuthorizeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AuthorizeRequest model - = BinaryData.fromString("{\"remoteVolumeResourceId\":\"ogaok\"}").toObject(AuthorizeRequest.class); - Assertions.assertEquals("ogaok", model.remoteVolumeResourceId()); + = BinaryData.fromString("{\"remoteVolumeResourceId\":\"l\"}").toObject(AuthorizeRequest.class); + Assertions.assertEquals("l", model.remoteVolumeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("ogaok"); + AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("l"); model = BinaryData.fromObject(model).toObject(AuthorizeRequest.class); - Assertions.assertEquals("ogaok", model.remoteVolumeResourceId()); + Assertions.assertEquals("l", model.remoteVolumeResourceId()); } } 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 fbc03d719d14e..7a8bb6bad41fe 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\":\"fdv\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":74462923,\"weeklyBackupsToKeep\":1859021657,\"monthlyBackupsToKeep\":749394932,\"volumesAssigned\":1524186089,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"qswankltytmhdr\",\"volumeResourceId\":\"nnhdrl\",\"backupsCount\":750712079,\"policyEnabled\":true}]},\"etag\":\"gguxhemlwyw\",\"location\":\"eczgfb\",\"tags\":{\"rlsmdesqplpvmjc\":\"lelssxblycsxzujk\",\"vteo\":\"oewbid\"},\"id\":\"xvgpiude\",\"name\":\"gfsxzec\",\"type\":\"axwk\"}"; + = "{\"properties\":{\"backupPolicyId\":\"nyttzgix\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":300315496,\"weeklyBackupsToKeep\":862833559,\"monthlyBackupsToKeep\":1199722619,\"volumesAssigned\":989606937,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"kndrndpgfjo\",\"volumeResourceId\":\"daqotwfh\",\"backupsCount\":1320531554,\"policyEnabled\":true}]},\"etag\":\"abvcipowzaf\",\"location\":\"uumljcirvpefyc\",\"tags\":{\"lnsjhw\":\"ititjnsxza\"},\"id\":\"uyx\",\"name\":\"bxqvmvuayt\",\"type\":\"adxkxeqbwpntghy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,21 +33,21 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupPolicy response = manager.backupPolicies() - .define("mskwhqjjysl") - .withRegion("hpwpgddeimawzovg") - .withExistingNetAppAccount("plkeuachtomflryt", "wfpfmdgycx") - .withTags(mapOf("sqowxwc", "muikjcjcaztbws")) - .withDailyBackupsToKeep(1899940193) - .withWeeklyBackupsToKeep(1592039992) - .withMonthlyBackupsToKeep(1628656253) + .define("fzuvrzmz") + .withRegion("xdqaolfylnkkb") + .withExistingNetAppAccount("itmujdtvm", "lyymffhmjpddny") + .withTags(mapOf("fwobb", "vlywlt", "fnqzocr", "whlwy")) + .withDailyBackupsToKeep(1502399105) + .withWeeklyBackupsToKeep(1257411321) + .withMonthlyBackupsToKeep(921466837) .withEnabled(false) .create(); - Assertions.assertEquals("eczgfb", response.location()); - Assertions.assertEquals("lelssxblycsxzujk", response.tags().get("rlsmdesqplpvmjc")); - Assertions.assertEquals(74462923, response.dailyBackupsToKeep()); - Assertions.assertEquals(1859021657, response.weeklyBackupsToKeep()); - Assertions.assertEquals(749394932, response.monthlyBackupsToKeep()); + Assertions.assertEquals("uumljcirvpefyc", response.location()); + Assertions.assertEquals("ititjnsxza", response.tags().get("lnsjhw")); + Assertions.assertEquals(300315496, response.dailyBackupsToKeep()); + Assertions.assertEquals(862833559, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1199722619, response.monthlyBackupsToKeep()); Assertions.assertTrue(response.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java index 5ca19db097441..cb77934ec5fc6 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,7 +27,8 @@ 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("lawjmjsmwrok", "dxfzzzwyjaf", "tlhguynuchl", com.azure.core.util.Context.NONE); + manager.backupPolicies() + .delete("fkbebauzl", "btxxwpfhnjzud", "tpzkgmeboywhcz", 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 4e5cc7aac29ec..23f892c5f20e5 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\":\"tc\",\"provisioningState\":\"hplrvkmjcwmjvlg\",\"dailyBackupsToKeep\":2110078268,\"weeklyBackupsToKeep\":1459066733,\"monthlyBackupsToKeep\":1646632385,\"volumesAssigned\":1713547860,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"jpsfxsfu\",\"volumeResourceId\":\"lvt\",\"backupsCount\":629434147,\"policyEnabled\":false}]},\"etag\":\"idqlvhu\",\"location\":\"veo\",\"tags\":{\"z\":\"rvjfnmjmvlw\",\"lfojuidjp\":\"iblkujr\",\"ovvtzejetjkln\":\"uyjucejikzo\",\"k\":\"ikyju\"},\"id\":\"bqzolxr\",\"name\":\"vhqjwtrhtgvg\",\"type\":\"pcrrk\"}"; + = "{\"properties\":{\"backupPolicyId\":\"jhtollh\",\"provisioningState\":\"idmytzln\",\"dailyBackupsToKeep\":841014483,\"weeklyBackupsToKeep\":803016351,\"monthlyBackupsToKeep\":1973350448,\"volumesAssigned\":1248974557,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"swqagywvtxigvjrk\",\"volumeResourceId\":\"gaeukyawohpm\",\"backupsCount\":1302685190,\"policyEnabled\":false},{\"volumeName\":\"sklhsidsjtdlp\",\"volumeResourceId\":\"injgazlsvbzfcpuo\",\"backupsCount\":476616488,\"policyEnabled\":true},{\"volumeName\":\"ciklh\",\"volumeResourceId\":\"ekrdr\",\"backupsCount\":1537970955,\"policyEnabled\":true}]},\"etag\":\"i\",\"location\":\"h\",\"tags\":{\"lhydwbdbfgrlpu\":\"iv\",\"btahdeanii\":\"ytjlkesmmpath\"},\"id\":\"llbvgwzsfftedous\",\"name\":\"ktjtgra\",\"type\":\"aqo\"}"; 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("ulbmoichdlp", "fpubntnbatz", "iqsowsaaelc", com.azure.core.util.Context.NONE) + .getWithResponse("wmwwmjswen", "wwa", "ecleqioulndhzyo", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("veo", response.location()); - Assertions.assertEquals("rvjfnmjmvlw", response.tags().get("z")); - Assertions.assertEquals(2110078268, response.dailyBackupsToKeep()); - Assertions.assertEquals(1459066733, response.weeklyBackupsToKeep()); - Assertions.assertEquals(1646632385, response.monthlyBackupsToKeep()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("h", response.location()); + Assertions.assertEquals("iv", response.tags().get("lhydwbdbfgrlpu")); + Assertions.assertEquals(841014483, response.dailyBackupsToKeep()); + Assertions.assertEquals(803016351, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1973350448, response.monthlyBackupsToKeep()); + Assertions.assertFalse(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 23e642c19a421..8610967d61398 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\":\"pafolp\",\"provisioningState\":\"wamxqzrag\",\"dailyBackupsToKeep\":1193102156,\"weeklyBackupsToKeep\":1656670838,\"monthlyBackupsToKeep\":1755800422,\"volumesAssigned\":737806246,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"ejchcsrlz\",\"volumeResourceId\":\"mzlanru\",\"backupsCount\":1305520535,\"policyEnabled\":true}]},\"etag\":\"hcnzqt\",\"location\":\"hmqrhvthlaiwdc\",\"tags\":{\"gydlhqv\":\"lzzhzdtxet\",\"pxy\":\"n\",\"klbyulidwcw\":\"afiqgeaarbgjekg\",\"hj\":\"mzegjon\"},\"id\":\"rwgdnqzbrfks\",\"name\":\"zhzmtksjci\",\"type\":\"digsxcdgl\"}]}"; + = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"zwnykdidjchl\",\"provisioningState\":\"pwctofl\",\"dailyBackupsToKeep\":2128667253,\"weeklyBackupsToKeep\":956940245,\"monthlyBackupsToKeep\":322636738,\"volumesAssigned\":1176460687,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"g\",\"volumeResourceId\":\"wjiyewhfjsrwq\",\"backupsCount\":2044348979,\"policyEnabled\":false},{\"volumeName\":\"cwv\",\"volumeResourceId\":\"mdqntycnaw\",\"backupsCount\":504224699,\"policyEnabled\":false}]},\"etag\":\"gnuyeamcmhu\",\"location\":\"jecehokwc\",\"tags\":{\"rukoi\":\"wloesqrggvrbn\",\"lh\":\"aciduwjleip\"},\"id\":\"yxpzruzythqk\",\"name\":\"whbgxvellvul\",\"type\":\"xdm\"}]}"; 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("mltx", "whmozusgzvlnsnnj", com.azure.core.util.Context.NONE); + = manager.backupPolicies().list("qrhm", "gqbedygi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hmqrhvthlaiwdc", response.iterator().next().location()); - Assertions.assertEquals("lzzhzdtxet", response.iterator().next().tags().get("gydlhqv")); - Assertions.assertEquals(1193102156, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(1656670838, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(1755800422, response.iterator().next().monthlyBackupsToKeep()); - Assertions.assertFalse(response.iterator().next().enabled()); + Assertions.assertEquals("jecehokwc", response.iterator().next().location()); + Assertions.assertEquals("wloesqrggvrbn", response.iterator().next().tags().get("rukoi")); + Assertions.assertEquals(2128667253, response.iterator().next().dailyBackupsToKeep()); + Assertions.assertEquals(956940245, response.iterator().next().weeklyBackupsToKeep()); + Assertions.assertEquals(322636738, response.iterator().next().monthlyBackupsToKeep()); + Assertions.assertTrue(response.iterator().next().enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java index 9d72b02865f78..f762bcf52552a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java @@ -12,14 +12,14 @@ public final class BackupPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupPolicyId\":\"gzd\",\"provisioningState\":\"swe\",\"dailyBackupsToKeep\":151812446,\"weeklyBackupsToKeep\":2076786264,\"monthlyBackupsToKeep\":840450646,\"volumesAssigned\":1308163389,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"qhuexm\",\"volumeResourceId\":\"tlstvlzywem\",\"backupsCount\":218184123,\"policyEnabled\":true}]},\"etag\":\"dtclusiypb\",\"location\":\"gytguslfead\",\"tags\":{\"xgfpelolppv\":\"qukyhejhzi\"},\"id\":\"srp\",\"name\":\"vu\",\"type\":\"zraehtwd\"}],\"nextLink\":\"ftswibyrcdlbhsh\"}") + "{\"value\":[{\"properties\":{\"backupPolicyId\":\"zraehtwd\",\"provisioningState\":\"ftswibyrcdlbhsh\",\"dailyBackupsToKeep\":206253573,\"weeklyBackupsToKeep\":137143614,\"monthlyBackupsToKeep\":1289831716,\"volumesAssigned\":1007371026,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"evxccedcp\",\"volumeResourceId\":\"dyodnwzxltj\",\"backupsCount\":424916927,\"policyEnabled\":true},{\"volumeName\":\"iugcxnavvwxq\",\"volumeResourceId\":\"y\",\"backupsCount\":1643458041,\"policyEnabled\":false},{\"volumeName\":\"xwlmdjr\",\"volumeResourceId\":\"fgbvfvpdbo\",\"backupsCount\":2095776205,\"policyEnabled\":false}]},\"etag\":\"j\",\"location\":\"hkr\",\"tags\":{\"kghv\":\"deibqip\",\"pjorwkqnyhg\":\"ndzwmkrefa\",\"jivfxzsjabib\":\"ij\"},\"id\":\"ystawfsdjpvkvp\",\"name\":\"jxbkzbzkdvn\",\"type\":\"jabudurgkakmo\"},{\"properties\":{\"backupPolicyId\":\"hjjklff\",\"provisioningState\":\"ouw\",\"dailyBackupsToKeep\":931521782,\"weeklyBackupsToKeep\":1358338018,\"monthlyBackupsToKeep\":1728733823,\"volumesAssigned\":1485403905,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ikayuhqlbjbsybb\",\"volumeResourceId\":\"r\",\"backupsCount\":948234782,\"policyEnabled\":false},{\"volumeName\":\"fp\",\"volumeResourceId\":\"mpipaslthaqfxs\",\"backupsCount\":35596652,\"policyEnabled\":true},{\"volumeName\":\"bdsrez\",\"volumeResourceId\":\"rhneuyowq\",\"backupsCount\":638872994,\"policyEnabled\":false}]},\"etag\":\"sibircgpi\",\"location\":\"zimejzanlfzx\",\"tags\":{\"okixrjqcir\":\"rmbzo\",\"szrnwo\":\"zpfrla\"},\"id\":\"indfpwpjyl\",\"name\":\"bt\",\"type\":\"h\"}],\"nextLink\":\"sj\"}") .toObject(BackupPoliciesList.class); - Assertions.assertEquals("gytguslfead", model.value().get(0).location()); - Assertions.assertEquals("qukyhejhzi", model.value().get(0).tags().get("xgfpelolppv")); - Assertions.assertEquals(151812446, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(2076786264, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(840450646, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertTrue(model.value().get(0).enabled()); - Assertions.assertEquals("ftswibyrcdlbhsh", model.nextLink()); + Assertions.assertEquals("hkr", model.value().get(0).location()); + Assertions.assertEquals("deibqip", model.value().get(0).tags().get("kghv")); + Assertions.assertEquals(206253573, model.value().get(0).dailyBackupsToKeep()); + Assertions.assertEquals(137143614, model.value().get(0).weeklyBackupsToKeep()); + Assertions.assertEquals(1289831716, model.value().get(0).monthlyBackupsToKeep()); + Assertions.assertFalse(model.value().get(0).enabled()); + Assertions.assertEquals("sj", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java index 5490f6c90a636..836e55b6f9554 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java @@ -14,31 +14,31 @@ public final class BackupPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"backupPolicyId\":\"cckwyfzqwhxxbu\",\"provisioningState\":\"a\",\"dailyBackupsToKeep\":804013471,\"weeklyBackupsToKeep\":1280631673,\"monthlyBackupsToKeep\":608343994,\"volumesAssigned\":1372310139,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"or\",\"volumeResourceId\":\"lt\",\"backupsCount\":1325987050,\"policyEnabled\":true},{\"volumeName\":\"sobqw\",\"volumeResourceId\":\"dbnw\",\"backupsCount\":301965904,\"policyEnabled\":true},{\"volumeName\":\"qdpfuvglsbjjca\",\"volumeResourceId\":\"xbvtvudu\",\"backupsCount\":1320056895,\"policyEnabled\":true},{\"volumeName\":\"r\",\"volumeResourceId\":\"qtvcofudflvkgj\",\"backupsCount\":1622767746,\"policyEnabled\":true}]},\"etag\":\"nqvsaznqnto\",\"location\":\"dsg\",\"tags\":{\"wjue\":\"mkycgra\"},\"id\":\"aeburuvdmo\",\"name\":\"s\",\"type\":\"zlxwabmqoefkifr\"}") + "{\"properties\":{\"backupPolicyId\":\"cvinvkjjxdxrbuuk\",\"provisioningState\":\"lewyhmlwpaz\",\"dailyBackupsToKeep\":1765730251,\"weeklyBackupsToKeep\":437728645,\"monthlyBackupsToKeep\":1425896475,\"volumesAssigned\":2098727625,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"whxxbuyqax\",\"volumeResourceId\":\"eqz\",\"backupsCount\":1372310139,\"policyEnabled\":false},{\"volumeName\":\"lxorjaltolmncws\",\"volumeResourceId\":\"qwcsdbnwdcfhuc\",\"backupsCount\":895561091,\"policyEnabled\":true},{\"volumeName\":\"glsbjjc\",\"volumeResourceId\":\"vxb\",\"backupsCount\":152007455,\"policyEnabled\":false},{\"volumeName\":\"tncormrlxqtvco\",\"volumeResourceId\":\"dflvkg\",\"backupsCount\":1902610413,\"policyEnabled\":true}]},\"etag\":\"nnqvsa\",\"location\":\"qntorudsgsahmkyc\",\"tags\":{\"s\":\"uwjuetaeburuvdmo\",\"tpuqujmq\":\"zlxwabmqoefkifr\",\"jcntuj\":\"gkfbtndoaong\"},\"id\":\"tcje\",\"name\":\"ftwwaezkojvdc\",\"type\":\"zfoqouicybxar\"}") .toObject(BackupPolicyInner.class); - Assertions.assertEquals("dsg", model.location()); - Assertions.assertEquals("mkycgra", model.tags().get("wjue")); - Assertions.assertEquals(804013471, model.dailyBackupsToKeep()); - Assertions.assertEquals(1280631673, model.weeklyBackupsToKeep()); - Assertions.assertEquals(608343994, model.monthlyBackupsToKeep()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("qntorudsgsahmkyc", model.location()); + Assertions.assertEquals("uwjuetaeburuvdmo", model.tags().get("s")); + Assertions.assertEquals(1765730251, model.dailyBackupsToKeep()); + Assertions.assertEquals(437728645, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1425896475, model.monthlyBackupsToKeep()); + Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyInner model = new BackupPolicyInner().withLocation("dsg") - .withTags(mapOf("wjue", "mkycgra")) - .withDailyBackupsToKeep(804013471) - .withWeeklyBackupsToKeep(1280631673) - .withMonthlyBackupsToKeep(608343994) - .withEnabled(false); + BackupPolicyInner model = new BackupPolicyInner().withLocation("qntorudsgsahmkyc") + .withTags(mapOf("s", "uwjuetaeburuvdmo", "tpuqujmq", "zlxwabmqoefkifr", "jcntuj", "gkfbtndoaong")) + .withDailyBackupsToKeep(1765730251) + .withWeeklyBackupsToKeep(437728645) + .withMonthlyBackupsToKeep(1425896475) + .withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyInner.class); - Assertions.assertEquals("dsg", model.location()); - Assertions.assertEquals("mkycgra", model.tags().get("wjue")); - Assertions.assertEquals(804013471, model.dailyBackupsToKeep()); - Assertions.assertEquals(1280631673, model.weeklyBackupsToKeep()); - Assertions.assertEquals(608343994, model.monthlyBackupsToKeep()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("qntorudsgsahmkyc", model.location()); + Assertions.assertEquals("uwjuetaeburuvdmo", model.tags().get("s")); + Assertions.assertEquals(1765730251, model.dailyBackupsToKeep()); + Assertions.assertEquals(437728645, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1425896475, model.monthlyBackupsToKeep()); + Assertions.assertTrue(model.enabled()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java index 05d2d253cd2ff..0632cc381937b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java @@ -14,30 +14,31 @@ public final class BackupPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyPatch model = BinaryData.fromString( - "{\"location\":\"nfd\",\"id\":\"oakgtdlmkkzev\",\"name\":\"hewpusdsttwv\",\"type\":\"vbbejdcng\",\"tags\":{\"zr\":\"oakufgm\"},\"properties\":{\"backupPolicyId\":\"grtwae\",\"provisioningState\":\"uzkopbminrfd\",\"dailyBackupsToKeep\":1845390329,\"weeklyBackupsToKeep\":2066310989,\"monthlyBackupsToKeep\":1063741579,\"volumesAssigned\":134697,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"bhdmsmlmzqhof\",\"volumeResourceId\":\"maequiahxicslfa\",\"backupsCount\":243894800,\"policyEnabled\":true},{\"volumeName\":\"ylhalnswhcc\",\"volumeResourceId\":\"hka\",\"backupsCount\":2029124466,\"policyEnabled\":false},{\"volumeName\":\"scywuggwoluhc\",\"volumeResourceId\":\"wem\",\"backupsCount\":19957652,\"policyEnabled\":false}]}}") + "{\"location\":\"ufgmjzrwrdg\",\"id\":\"wae\",\"name\":\"uzkopbminrfd\",\"type\":\"yuhhziu\",\"tags\":{\"oftrmaequia\":\"ozbhdmsmlmzq\",\"z\":\"xicslfao\",\"kaivwit\":\"iyylhalnswhccsp\",\"bwemhairs\":\"scywuggwoluhc\"},\"properties\":{\"backupPolicyId\":\"z\",\"provisioningState\":\"msweypqwdxggicc\",\"dailyBackupsToKeep\":1758343782,\"weeklyBackupsToKeep\":1393765548,\"monthlyBackupsToKeep\":942987228,\"volumesAssigned\":1510973538,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"tvlz\",\"volumeResourceId\":\"emhzrncsdtc\",\"backupsCount\":1367209105,\"policyEnabled\":true},{\"volumeName\":\"bsfgytguslfea\",\"volumeResourceId\":\"ygqukyhejh\",\"backupsCount\":435176888,\"policyEnabled\":true},{\"volumeName\":\"pelol\",\"volumeResourceId\":\"vk\",\"backupsCount\":1892459462,\"policyEnabled\":false}]}}") .toObject(BackupPolicyPatch.class); - Assertions.assertEquals("nfd", model.location()); - Assertions.assertEquals("oakufgm", model.tags().get("zr")); - Assertions.assertEquals(1845390329, model.dailyBackupsToKeep()); - Assertions.assertEquals(2066310989, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1063741579, model.monthlyBackupsToKeep()); + Assertions.assertEquals("ufgmjzrwrdg", model.location()); + Assertions.assertEquals("ozbhdmsmlmzq", model.tags().get("oftrmaequia")); + Assertions.assertEquals(1758343782, model.dailyBackupsToKeep()); + Assertions.assertEquals(1393765548, model.weeklyBackupsToKeep()); + Assertions.assertEquals(942987228, model.monthlyBackupsToKeep()); Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyPatch model = new BackupPolicyPatch().withLocation("nfd") - .withTags(mapOf("zr", "oakufgm")) - .withDailyBackupsToKeep(1845390329) - .withWeeklyBackupsToKeep(2066310989) - .withMonthlyBackupsToKeep(1063741579) + BackupPolicyPatch model = new BackupPolicyPatch().withLocation("ufgmjzrwrdg") + .withTags(mapOf("oftrmaequia", "ozbhdmsmlmzq", "z", "xicslfao", "kaivwit", "iyylhalnswhccsp", "bwemhairs", + "scywuggwoluhc")) + .withDailyBackupsToKeep(1758343782) + .withWeeklyBackupsToKeep(1393765548) + .withMonthlyBackupsToKeep(942987228) .withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyPatch.class); - Assertions.assertEquals("nfd", model.location()); - Assertions.assertEquals("oakufgm", model.tags().get("zr")); - Assertions.assertEquals(1845390329, model.dailyBackupsToKeep()); - Assertions.assertEquals(2066310989, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1063741579, model.monthlyBackupsToKeep()); + Assertions.assertEquals("ufgmjzrwrdg", model.location()); + Assertions.assertEquals("ozbhdmsmlmzq", model.tags().get("oftrmaequia")); + Assertions.assertEquals(1758343782, model.dailyBackupsToKeep()); + Assertions.assertEquals(1393765548, model.weeklyBackupsToKeep()); + Assertions.assertEquals(942987228, model.monthlyBackupsToKeep()); Assertions.assertTrue(model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java index 8056fa3243bb8..e8d430ac80555 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java @@ -12,24 +12,24 @@ public final class BackupPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyProperties model = BinaryData.fromString( - "{\"backupPolicyId\":\"puqujmqlgkfbtn\",\"provisioningState\":\"aongbj\",\"dailyBackupsToKeep\":626230231,\"weeklyBackupsToKeep\":1376846032,\"monthlyBackupsToKeep\":1062686421,\"volumesAssigned\":635729957,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"waezkojvd\",\"volumeResourceId\":\"zfoqouicybxar\",\"backupsCount\":1685402148,\"policyEnabled\":false},{\"volumeName\":\"oxciqopidoamcio\",\"volumeResourceId\":\"khazxkhnzbonlwn\",\"backupsCount\":2021684240,\"policyEnabled\":false},{\"volumeName\":\"dwbwhkszzcmrvexz\",\"volumeResourceId\":\"bt\",\"backupsCount\":125773376,\"policyEnabled\":false},{\"volumeName\":\"oyzko\",\"volumeResourceId\":\"tlmngu\",\"backupsCount\":1953532777,\"policyEnabled\":false}]}") + "{\"backupPolicyId\":\"szufoxciqopidoa\",\"provisioningState\":\"iodhkhazxkhnz\",\"dailyBackupsToKeep\":1731617397,\"weeklyBackupsToKeep\":1189025238,\"monthlyBackupsToKeep\":1184830478,\"volumesAssigned\":2021684240,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"bwh\",\"volumeResourceId\":\"z\",\"backupsCount\":793958832,\"policyEnabled\":true},{\"volumeName\":\"xztvbtqgsfraoyzk\",\"volumeResourceId\":\"wtl\",\"backupsCount\":1663606623,\"policyEnabled\":true},{\"volumeName\":\"wqaldsyu\",\"volumeResourceId\":\"imerqfobwyznk\",\"backupsCount\":1383706321,\"policyEnabled\":false},{\"volumeName\":\"pfhpagmhrskdsnfd\",\"volumeResourceId\":\"oakgtdlmkkzev\",\"backupsCount\":973934778,\"policyEnabled\":true}]}") .toObject(BackupPolicyProperties.class); - Assertions.assertEquals(626230231, model.dailyBackupsToKeep()); - Assertions.assertEquals(1376846032, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1062686421, model.monthlyBackupsToKeep()); + Assertions.assertEquals(1731617397, model.dailyBackupsToKeep()); + Assertions.assertEquals(1189025238, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1184830478, model.monthlyBackupsToKeep()); Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(626230231) - .withWeeklyBackupsToKeep(1376846032) - .withMonthlyBackupsToKeep(1062686421) + BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1731617397) + .withWeeklyBackupsToKeep(1189025238) + .withMonthlyBackupsToKeep(1184830478) .withEnabled(false); model = BinaryData.fromObject(model).toObject(BackupPolicyProperties.class); - Assertions.assertEquals(626230231, model.dailyBackupsToKeep()); - Assertions.assertEquals(1376846032, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1062686421, model.monthlyBackupsToKeep()); + Assertions.assertEquals(1731617397, model.dailyBackupsToKeep()); + Assertions.assertEquals(1189025238, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1184830478, model.monthlyBackupsToKeep()); Assertions.assertFalse(model.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 7ff7950164e32..dc6c14b1a59a0 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 @@ -13,21 +13,22 @@ public final class BackupRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupRestoreFiles model = BinaryData.fromString( - "{\"fileList\":[\"dlpagzrcxfail\",\"f\"],\"restoreFilePath\":\"m\",\"destinationVolumeId\":\"boxdfgsftufq\"}") + "{\"fileList\":[\"nwivkcqhrxh\",\"knlccrmmkyup\",\"jubyqjfkakfq\",\"rke\"],\"restoreFilePath\":\"il\",\"destinationVolumeId\":\"udxjascowv\"}") .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("dlpagzrcxfail", model.fileList().get(0)); - Assertions.assertEquals("m", model.restoreFilePath()); - Assertions.assertEquals("boxdfgsftufq", model.destinationVolumeId()); + Assertions.assertEquals("nwivkcqhrxh", model.fileList().get(0)); + Assertions.assertEquals("il", model.restoreFilePath()); + Assertions.assertEquals("udxjascowv", model.destinationVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("dlpagzrcxfail", "f")) - .withRestoreFilePath("m") - .withDestinationVolumeId("boxdfgsftufq"); + BackupRestoreFiles model + = new BackupRestoreFiles().withFileList(Arrays.asList("nwivkcqhrxh", "knlccrmmkyup", "jubyqjfkakfq", "rke")) + .withRestoreFilePath("il") + .withDestinationVolumeId("udxjascowv"); model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("dlpagzrcxfail", model.fileList().get(0)); - Assertions.assertEquals("m", model.restoreFilePath()); - Assertions.assertEquals("boxdfgsftufq", model.destinationVolumeId()); + Assertions.assertEquals("nwivkcqhrxh", model.fileList().get(0)); + Assertions.assertEquals("il", model.restoreFilePath()); + Assertions.assertEquals("udxjascowv", model.destinationVolumeId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java index 83080c35e54b0..28178bceeee0f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java @@ -14,19 +14,19 @@ public final class BackupVaultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupVaultInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"qmt\"},\"location\":\"ltmm\",\"tags\":{\"upkvipmdsc\":\"yeozphvwauyqncy\",\"totxhojujb\":\"xqupevzhf\",\"n\":\"pelmcuvhixbjxyf\"},\"id\":\"lrcoolsttpki\",\"name\":\"kkbnu\",\"type\":\"rywvtylbfpn\"}") + "{\"properties\":{\"provisioningState\":\"ujviylwdshfs\"},\"location\":\"rbgyefry\",\"tags\":{\"nc\":\"aojfm\",\"hirctymoxoftpipi\":\"tmr\"},\"id\":\"yczuhxacpq\",\"name\":\"lihhyuspskasdvlm\",\"type\":\"wdgzxulucv\"}") .toObject(BackupVaultInner.class); - Assertions.assertEquals("ltmm", model.location()); - Assertions.assertEquals("yeozphvwauyqncy", model.tags().get("upkvipmdsc")); + Assertions.assertEquals("rbgyefry", model.location()); + Assertions.assertEquals("aojfm", model.tags().get("nc")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupVaultInner model = new BackupVaultInner().withLocation("ltmm") - .withTags(mapOf("upkvipmdsc", "yeozphvwauyqncy", "totxhojujb", "xqupevzhf", "n", "pelmcuvhixbjxyf")); + BackupVaultInner model + = new BackupVaultInner().withLocation("rbgyefry").withTags(mapOf("nc", "aojfm", "hirctymoxoftpipi", "tmr")); model = BinaryData.fromObject(model).toObject(BackupVaultInner.class); - Assertions.assertEquals("ltmm", model.location()); - Assertions.assertEquals("yeozphvwauyqncy", model.tags().get("upkvipmdsc")); + Assertions.assertEquals("rbgyefry", model.location()); + Assertions.assertEquals("aojfm", model.tags().get("nc")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java index 87f30fccbb0c9..cd38e87a9055e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java @@ -13,18 +13,16 @@ public final class BackupVaultPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupVaultPatch model = BinaryData - .fromString("{\"tags\":{\"xcbihw\":\"iithtywu\",\"twjchrdg\":\"knfd\",\"uu\":\"ihxumwctondzj\"}}") + BackupVaultPatch model = BinaryData.fromString("{\"tags\":{\"hu\":\"xifqjzgxm\",\"cesutrgjupauut\":\"lw\"}}") .toObject(BackupVaultPatch.class); - Assertions.assertEquals("iithtywu", model.tags().get("xcbihw")); + Assertions.assertEquals("xifqjzgxm", model.tags().get("hu")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupVaultPatch model - = new BackupVaultPatch().withTags(mapOf("xcbihw", "iithtywu", "twjchrdg", "knfd", "uu", "ihxumwctondzj")); + BackupVaultPatch model = new BackupVaultPatch().withTags(mapOf("hu", "xifqjzgxm", "cesutrgjupauut", "lw")); model = BinaryData.fromObject(model).toObject(BackupVaultPatch.class); - Assertions.assertEquals("iithtywu", model.tags().get("xcbihw")); + Assertions.assertEquals("xifqjzgxm", model.tags().get("hu")); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java index eca63b25a3e79..a19a9d8673150 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java @@ -10,8 +10,8 @@ public final class BackupVaultPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupVaultProperties model - = BinaryData.fromString("{\"provisioningState\":\"rd\"}").toObject(BackupVaultProperties.class); + BackupVaultProperties model = BinaryData.fromString("{\"provisioningState\":\"mrsreuzvxurisjnh\"}") + .toObject(BackupVaultProperties.class); } @org.junit.jupiter.api.Test 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 69355b004680a..1ad53f4514f2a 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\":\"v\",\"tags\":{\"wzfgbrttuiaclkie\":\"knbnxwcdommpvfq\",\"hiqfyuttdiy\":\"hajlfn\",\"vnwsw\":\"b\",\"cvogygzyvne\":\"txkyctwwgzwxjlm\"},\"id\":\"zaifghtmoqqtlff\",\"name\":\"zbkr\",\"type\":\"jjjavfqnvhnq\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"qauxzan\",\"tags\":{\"udqyemeb\":\"vfruwkudrbcpft\",\"mjauwcgx\":\"naucmcirtnee\",\"zerwgudas\":\"fnohaitran\"},\"id\":\"xubvf\",\"name\":\"ngfcocefhpriyl\",\"type\":\"mpztraudsvhlc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .define("lexwhcbjp") - .withRegion("uuuercta") - .withExistingNetAppAccount("gaqi", "irpiwrqofulopmj") - .withTags(mapOf("uczkgofxyfsruc", "intqpbrlcyr", "qnrmvvfko", "crrpcjttbstvje", "wwexymzvlazipbh", - "mlghktuidvrmazlp")) + .define("nquktrfnslnlrxs") + .withRegion("xwnaz") + .withExistingNetAppAccount("suenyg", "xcgjtf") + .withTags( + mapOf("jwzzqseuzu", "rdreyzjwhsetw", "c", "kykcyqhyqqzz", "ewfopazdazg", "keys", "mdpv", "sqgpewqcfu")) .create(); - Assertions.assertEquals("v", response.location()); - Assertions.assertEquals("knbnxwcdommpvfq", response.tags().get("wzfgbrttuiaclkie")); + Assertions.assertEquals("qauxzan", response.location()); + Assertions.assertEquals("vfruwkudrbcpft", response.tags().get("udqyemeb")); } // 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 fd5a4ec5f1374..5b226df0fdb8a 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\":\"qwoyxqvapco\"},\"location\":\"oucqpqojx\",\"tags\":{\"tzqdd\":\"rzdcgdzbenribcaw\",\"mzwcjjncqt\":\"jwfljhznamtua\"},\"id\":\"z\",\"name\":\"izvg\",\"type\":\"gat\"}"; + = "{\"properties\":{\"provisioningState\":\"zzdzzqjmuezayov\"},\"location\":\"bqlotokhtvwtazn\",\"tags\":{\"nkbtlwljss\":\"wwxwjyofgw\"},\"id\":\"ctsnldkpwol\",\"name\":\"isubxbteog\",\"type\":\"gfii\"}"; 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("jklinh", "dptysprqs", "nzxojpslsvjgpli", com.azure.core.util.Context.NONE) + .getWithResponse("gdxwbsfpyxx", "jlf", "ecominxojjluxxd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("oucqpqojx", response.location()); - Assertions.assertEquals("rzdcgdzbenribcaw", response.tags().get("tzqdd")); + Assertions.assertEquals("bqlotokhtvwtazn", response.location()); + Assertions.assertEquals("wwxwjyofgw", response.tags().get("nkbtlwljss")); } } 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 7778a557167f5..ae7b9def34b74 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\":\"qfutlxjo\"},\"location\":\"asunwqrjzfrgq\",\"tags\":{\"ryxameblydyvkfkm\":\"hcmbuocnjrohmbp\",\"pyapucygvoav\":\"ocxnehvsmtodl\"},\"id\":\"unssxlghieegjl\",\"name\":\"vvpa\",\"type\":\"eksgbuxantuygd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"zvluyqqaiosss\"},\"location\":\"vaifppuacvfy\",\"tags\":{\"jdhsoy\":\"psfx\"},\"id\":\"hpvtyqftteh\",\"name\":\"pboujs\",\"type\":\"kfvvdshxcde\"}]}"; 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("uuvbx", "grebwggahttzlsw", com.azure.core.util.Context.NONE); + = manager.backupVaults().listByNetAppAccount("rykwlefk", "xqceazfpxgn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("asunwqrjzfrgq", response.iterator().next().location()); - Assertions.assertEquals("hcmbuocnjrohmbp", response.iterator().next().tags().get("ryxameblydyvkfkm")); + Assertions.assertEquals("vaifppuacvfy", response.iterator().next().location()); + Assertions.assertEquals("psfx", response.iterator().next().tags().get("jdhsoy")); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java index c32f8213549d1..987154cd90081 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java @@ -12,10 +12,10 @@ public final class BackupVaultsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupVaultsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"wggytsbwtovvt\"},\"location\":\"einqf\",\"tags\":{\"knpirgnepttwq\":\"x\",\"mqnrojlpijnkr\":\"sniffc\",\"zronasxift\":\"frddhcrati\",\"zh\":\"zq\"},\"id\":\"tw\",\"name\":\"sgogczhonnxk\",\"type\":\"lgnyhmo\"},{\"properties\":{\"provisioningState\":\"kkgthr\"},\"location\":\"hxjbdhqxvc\",\"tags\":{\"shrnsvbuswdvz\":\"rpdsof\",\"rtkfawnopq\":\"ybycnunvj\",\"x\":\"ikyzirtxdy\",\"sewgioilqukr\":\"ejnt\"},\"id\":\"dxtqmieoxo\",\"name\":\"ggufhyaomtb\",\"type\":\"hhavgrvkffovjz\"}],\"nextLink\":\"jbibg\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"hihejqgwzpnfqn\"},\"location\":\"ypsxjvfoim\",\"tags\":{\"zjxvydfcea\":\"lirc\",\"gdyftumrtwna\":\"vlhv\"},\"id\":\"jslb\",\"name\":\"wkojgcyztsfmzn\",\"type\":\"aeqphchqnr\"},{\"properties\":{\"provisioningState\":\"x\"},\"location\":\"uwrykqgaifmvikl\",\"tags\":{\"vdsrhnjiv\":\"vkhbejdznx\"},\"id\":\"lvtno\",\"name\":\"qfzgemjdftul\",\"type\":\"ltducea\"}],\"nextLink\":\"mczuo\"}") .toObject(BackupVaultsList.class); - Assertions.assertEquals("einqf", model.value().get(0).location()); - Assertions.assertEquals("x", model.value().get(0).tags().get("knpirgnepttwq")); - Assertions.assertEquals("jbibg", model.nextLink()); + Assertions.assertEquals("ypsxjvfoim", model.value().get(0).location()); + Assertions.assertEquals("lirc", model.value().get(0).tags().get("zjxvydfcea")); + Assertions.assertEquals("mczuo", model.nextLink()); } } 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 4a727a1d2af6b..83dadd119b282 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\":\"osrxuzvoa\",\"creationDate\":\"2021-10-04T14:47:32Z\",\"snapshotCreationDate\":\"2021-02-04T13:38:44Z\",\"completionDate\":\"2021-07-28T08:13:36Z\",\"provisioningState\":\"Succeeded\",\"size\":1815580557383790776,\"label\":\"ltzkatbhjmznnb\",\"backupType\":\"Manual\",\"failureReason\":\"qalarvlagunbtg\",\"volumeResourceId\":\"ebwlnbmhyreeudzq\",\"useExistingSnapshot\":true,\"snapshotName\":\"dqmjxly\",\"backupPolicyResourceId\":\"glgou\",\"isLargeVolume\":false},\"id\":\"jjyuojqtobax\",\"name\":\"j\",\"type\":\"ytunlbfjkwr\"}"; + = "{\"properties\":{\"backupId\":\"xhqf\",\"creationDate\":\"2021-01-18T17:43:16Z\",\"snapshotCreationDate\":\"2021-03-27T10:38:40Z\",\"completionDate\":\"2021-11-01T21:18:59Z\",\"provisioningState\":\"Succeeded\",\"size\":42801737599370544,\"label\":\"jjceatlijjjr\",\"backupType\":\"Manual\",\"failureReason\":\"caszk\",\"volumeResourceId\":\"xk\",\"useExistingSnapshot\":true,\"snapshotName\":\"etyvkunmignohi\",\"backupPolicyResourceId\":\"gqogjwpindedva\",\"isLargeVolume\":false},\"id\":\"hmedeilbjywfcfxz\",\"name\":\"rzzihvwypus\",\"type\":\"vjslczwcii\"}"; 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("pelnjetag") - .withExistingBackupVault("mxqhndvnoamldse", "aohdjh", "flzokxco") - .withVolumeResourceId("cjxgrytf") - .withLabel("occsr") - .withUseExistingSnapshot(false) - .withSnapshotName("cil") + .define("zdgvpyigdaqqilz") + .withExistingBackupVault("gaxwmzwdfkbnrzo", "pdltbq", "tqjfgxxsaet") + .withVolumeResourceId("uicdsiwdfmmpzhzz") + .withLabel("dmkxwxdcvjwcy") + .withUseExistingSnapshot(true) + .withSnapshotName("rgyngydgrpxnca") .create(); - Assertions.assertEquals("ltzkatbhjmznnb", response.label()); - Assertions.assertEquals("ebwlnbmhyreeudzq", response.volumeResourceId()); + Assertions.assertEquals("jjceatlijjjr", response.label()); + Assertions.assertEquals("xk", response.volumeResourceId()); Assertions.assertTrue(response.useExistingSnapshot()); - Assertions.assertEquals("dqmjxly", response.snapshotName()); + Assertions.assertEquals("etyvkunmignohi", 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 389f4d001c1f0..c69de910d374e 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\":\"fclduccbirdsv\",\"errorMessage\":\"cobiegstmninwjiz\",\"lastTransferSize\":8132569337795273227,\"lastTransferType\":\"hgshe\",\"totalTransferBytes\":3640297226126313490,\"transferProgressBytes\":1841698857513805001}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"pubdpkx\",\"errorMessage\":\"vgxiaodetvo\",\"lastTransferSize\":3017641447338193427,\"lastTransferType\":\"uwsaifmcwn\",\"totalTransferBytes\":7341547698236642455,\"transferProgressBytes\":3925687631690687216}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetLatestStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupStatus response = manager.backups() - .getLatestStatusWithResponse("gehkfkimrtixokff", "yinljqe", "qwhix", "onsts", + .getLatestStatusWithResponse("cpwzv", "doksqdtiwlwxlbon", "qba", "qicqchygt", 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 0d8d8f444e906..218b3e5dab88d 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\":\"Unknown\",\"mirrorState\":\"Uninitialized\",\"unhealthyReason\":\"vhczznvfby\",\"errorMessage\":\"sxjwwixz\",\"totalTransferBytes\":7126665347296916840}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"aafrqulhmzyqbhd\",\"errorMessage\":\"fjrqpjiyr\",\"totalTransferBytes\":2972214875792212364}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RestoreStatus response = manager.backups() - .getVolumeLatestRestoreStatusWithResponse("uluxl", "qzvnersbycucr", "namikzebrqbsms", "ziqgfuh", + .getVolumeLatestRestoreStatusWithResponse("gcv", "bcknjolgj", "yxpvelszerqze", "xoqeintxwalj", 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 73968ff4e44ac..190707ad641e7 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\":\"bwvqvxkdi\",\"creationDate\":\"2020-12-27T09:18:38Z\",\"snapshotCreationDate\":\"2021-09-02T01:31:57Z\",\"completionDate\":\"2021-09-07T08:36:27Z\",\"provisioningState\":\"swbzuwfmdurage\",\"size\":8212495412619748670,\"label\":\"jfelisdjubggbqig\",\"backupType\":\"Manual\",\"failureReason\":\"sazgakgacyrcmj\",\"volumeResourceId\":\"mspofapvuhryl\",\"useExistingSnapshot\":false,\"snapshotName\":\"rz\",\"backupPolicyResourceId\":\"zjedmstkvnlv\",\"isLargeVolume\":false},\"id\":\"iiznktwfan\",\"name\":\"nv\",\"type\":\"dibmikostbzbkiwb\"}"; + = "{\"properties\":{\"backupId\":\"yuuatvlmbjwcolbm\",\"creationDate\":\"2021-02-27T16:02:15Z\",\"snapshotCreationDate\":\"2021-01-27T11:36:33Z\",\"completionDate\":\"2021-08-17T00:04:31Z\",\"provisioningState\":\"pa\",\"size\":3905032330696428790,\"label\":\"vxhmtfhocnxzcmj\",\"backupType\":\"Scheduled\",\"failureReason\":\"noq\",\"volumeResourceId\":\"xtdisnjevhd\",\"useExistingSnapshot\":true,\"snapshotName\":\"idwhepfw\",\"backupPolicyResourceId\":\"jfdoesxxhm\",\"isLargeVolume\":false},\"id\":\"ck\",\"name\":\"oikxkxhnegk\",\"type\":\"jzrbhtmeplv\"}"; 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("tmwwi", "h", "hfqpofv", "bcblemb", com.azure.core.util.Context.NONE) + .getWithResponse("vcb", "hez", "quwusq", "utrpbr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jfelisdjubggbqig", response.label()); - Assertions.assertEquals("mspofapvuhryl", response.volumeResourceId()); - Assertions.assertFalse(response.useExistingSnapshot()); - Assertions.assertEquals("rz", response.snapshotName()); + Assertions.assertEquals("vxhmtfhocnxzcmj", response.label()); + Assertions.assertEquals("xtdisnjevhd", response.volumeResourceId()); + Assertions.assertTrue(response.useExistingSnapshot()); + Assertions.assertEquals("idwhepfw", 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 7fa0c682d0826..45dff486adcab 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\":\"ihclafzv\",\"creationDate\":\"2021-01-20T16:23:38Z\",\"snapshotCreationDate\":\"2021-10-22T09:32:37Z\",\"completionDate\":\"2021-01-02T03:46:41Z\",\"provisioningState\":\"qwztcmwqkc\",\"size\":2655209326818772123,\"label\":\"xfe\",\"backupType\":\"Manual\",\"failureReason\":\"jexfdeqvhp\",\"volumeResourceId\":\"ylkkshkbffmbm\",\"useExistingSnapshot\":true,\"snapshotName\":\"gywwpgjxs\",\"backupPolicyResourceId\":\"tf\",\"isLargeVolume\":true},\"id\":\"cg\",\"name\":\"aoepttaqutdew\",\"type\":\"mxswvruunzz\"}]}"; + = "{\"value\":[{\"properties\":{\"backupId\":\"jymxcgqt\",\"creationDate\":\"2021-04-13T17:52:46Z\",\"snapshotCreationDate\":\"2021-08-03T01:14:01Z\",\"completionDate\":\"2021-04-25T13:50:35Z\",\"provisioningState\":\"ol\",\"size\":6532924671679787429,\"label\":\"tfy\",\"backupType\":\"Manual\",\"failureReason\":\"vgjcodkkg\",\"volumeResourceId\":\"iiy\",\"useExistingSnapshot\":false,\"snapshotName\":\"k\",\"backupPolicyResourceId\":\"bcufqbvntn\",\"isLargeVolume\":false},\"id\":\"sorhcekx\",\"name\":\"nl\",\"type\":\"km\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testListByVault() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backups() - .listByVault("qnyophzfyls", "crpfbcunez", "cez", "lfwyfwlwxjwetn", com.azure.core.util.Context.NONE); + .listByVault("kaobrl", "pgsn", "agnchjhgemuowaky", "a", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xfe", response.iterator().next().label()); - Assertions.assertEquals("ylkkshkbffmbm", response.iterator().next().volumeResourceId()); - Assertions.assertTrue(response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("gywwpgjxs", response.iterator().next().snapshotName()); + Assertions.assertEquals("tfy", response.iterator().next().label()); + Assertions.assertEquals("iiy", response.iterator().next().volumeResourceId()); + Assertions.assertFalse(response.iterator().next().useExistingSnapshot()); + Assertions.assertEquals("k", 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 431562bbff512..51fc9ceef2c3c 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\":\"clrcivtsox\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("clrcivtsox", model.backupVaultId()); + = BinaryData.fromString("{\"backupVaultId\":\"pq\"}").toObject(BackupsMigrationRequest.class); + Assertions.assertEquals("pq", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("clrcivtsox"); + BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("pq"); model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("clrcivtsox", model.backupVaultId()); + Assertions.assertEquals("pq", model.backupVaultId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java index 83099e33f1301..85095dd70dcdd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java @@ -12,18 +12,18 @@ public final class BreakFileLocksRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BreakFileLocksRequest model - = BinaryData.fromString("{\"clientIp\":\"dnbbglzps\",\"confirmRunningDisruptiveOperation\":true}") + = BinaryData.fromString("{\"clientIp\":\"duiertgcc\",\"confirmRunningDisruptiveOperation\":true}") .toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("dnbbglzps", model.clientIp()); + Assertions.assertEquals("duiertgcc", model.clientIp()); Assertions.assertTrue(model.confirmRunningDisruptiveOperation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BreakFileLocksRequest model - = new BreakFileLocksRequest().withClientIp("dnbbglzps").withConfirmRunningDisruptiveOperation(true); + = new BreakFileLocksRequest().withClientIp("duiertgcc").withConfirmRunningDisruptiveOperation(true); model = BinaryData.fromObject(model).toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("dnbbglzps", model.clientIp()); + Assertions.assertEquals("duiertgcc", model.clientIp()); Assertions.assertTrue(model.confirmRunningDisruptiveOperation()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java index ed69d49d979fd..5dcf0a26cbbe4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java @@ -12,14 +12,14 @@ public final class BreakReplicationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BreakReplicationRequest model - = BinaryData.fromString("{\"forceBreakReplication\":false}").toObject(BreakReplicationRequest.class); - Assertions.assertFalse(model.forceBreakReplication()); + = BinaryData.fromString("{\"forceBreakReplication\":true}").toObject(BreakReplicationRequest.class); + Assertions.assertTrue(model.forceBreakReplication()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(false); + BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(true); model = BinaryData.fromObject(model).toObject(BreakReplicationRequest.class); - Assertions.assertFalse(model.forceBreakReplication()); + Assertions.assertTrue(model.forceBreakReplication()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java index 53bb846cac437..6da47c17eb56f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.java @@ -12,22 +12,23 @@ public final class BucketServerPatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BucketServerPatchProperties model = BinaryData.fromString( - "{\"fqdn\":\"p\",\"certificateObject\":\"prvkwcfzqljyxgtc\",\"onCertificateConflictAction\":\"Update\"}") + BucketServerPatchProperties model = BinaryData + .fromString( + "{\"fqdn\":\"zauorsuk\",\"certificateObject\":\"wbqpl\",\"onCertificateConflictAction\":\"Update\"}") .toObject(BucketServerPatchProperties.class); - Assertions.assertEquals("p", model.fqdn()); - Assertions.assertEquals("prvkwcfzqljyxgtc", model.certificateObject()); + Assertions.assertEquals("zauorsuk", model.fqdn()); + Assertions.assertEquals("wbqpl", model.certificateObject()); Assertions.assertEquals(OnCertificateConflictAction.UPDATE, model.onCertificateConflictAction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BucketServerPatchProperties model = new BucketServerPatchProperties().withFqdn("p") - .withCertificateObject("prvkwcfzqljyxgtc") + BucketServerPatchProperties model = new BucketServerPatchProperties().withFqdn("zauorsuk") + .withCertificateObject("wbqpl") .withOnCertificateConflictAction(OnCertificateConflictAction.UPDATE); model = BinaryData.fromObject(model).toObject(BucketServerPatchProperties.class); - Assertions.assertEquals("p", model.fqdn()); - Assertions.assertEquals("prvkwcfzqljyxgtc", model.certificateObject()); + Assertions.assertEquals("zauorsuk", model.fqdn()); + Assertions.assertEquals("wbqpl", model.certificateObject()); Assertions.assertEquals(OnCertificateConflictAction.UPDATE, model.onCertificateConflictAction()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java index 63b3dd33a04cb..a8d744bbc3fe1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.java @@ -13,21 +13,21 @@ public final class BucketServerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BucketServerProperties model = BinaryData.fromString( - "{\"fqdn\":\"qntcypsxjvfoimwk\",\"certificateCommonName\":\"ircizjxvy\",\"certificateExpiryDate\":\"2021-07-27T07:50:33Z\",\"ipAddress\":\"acvlhv\",\"certificateObject\":\"dyftumrtwna\",\"onCertificateConflictAction\":\"Update\"}") + "{\"fqdn\":\"rfmluiqtq\",\"certificateCommonName\":\"avyvnqqyba\",\"certificateExpiryDate\":\"2021-03-17T00:26:12Z\",\"ipAddress\":\"ayjkqa\",\"certificateObject\":\"gzslesjcbhernnti\",\"onCertificateConflictAction\":\"Update\"}") .toObject(BucketServerProperties.class); - Assertions.assertEquals("qntcypsxjvfoimwk", model.fqdn()); - Assertions.assertEquals("dyftumrtwna", model.certificateObject()); + Assertions.assertEquals("rfmluiqtq", model.fqdn()); + Assertions.assertEquals("gzslesjcbhernnti", model.certificateObject()); Assertions.assertEquals(OnCertificateConflictAction.UPDATE, model.onCertificateConflictAction()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BucketServerProperties model = new BucketServerProperties().withFqdn("qntcypsxjvfoimwk") - .withCertificateObject("dyftumrtwna") + BucketServerProperties model = new BucketServerProperties().withFqdn("rfmluiqtq") + .withCertificateObject("gzslesjcbhernnti") .withOnCertificateConflictAction(OnCertificateConflictAction.UPDATE); model = BinaryData.fromObject(model).toObject(BucketServerProperties.class); - Assertions.assertEquals("qntcypsxjvfoimwk", model.fqdn()); - Assertions.assertEquals("dyftumrtwna", model.certificateObject()); + Assertions.assertEquals("rfmluiqtq", model.fqdn()); + Assertions.assertEquals("gzslesjcbhernnti", model.certificateObject()); Assertions.assertEquals(OnCertificateConflictAction.UPDATE, model.onCertificateConflictAction()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java index 0e969581c560f..54cc88606cacc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.java @@ -10,8 +10,8 @@ public final class CacheMountTargetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CacheMountTargetProperties model = BinaryData.fromString( - "{\"mountTargetId\":\"azivjlfrqttbajl\",\"ipAddress\":\"tnwxy\",\"smbServerFqdn\":\"pidkqqfkuvscxkdm\"}") - .toObject(CacheMountTargetProperties.class); + CacheMountTargetProperties model + = BinaryData.fromString("{\"mountTargetId\":\"gtqxep\",\"ipAddress\":\"lbfu\",\"smbServerFqdn\":\"lyjt\"}") + .toObject(CacheMountTargetProperties.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java index d4bb17aac7466..987726d334b22 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachePropertiesExportPolicyTests.java @@ -15,103 +15,73 @@ public final class CachePropertiesExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CachePropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1854784529,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"oqytibyowbblgy\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1322513595,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"xxlxsffgcvizq\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":946666624,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"owzfttsttkt\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":520028629,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"rxcpjuisavo\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"}]}") + "{\"rules\":[{\"ruleIndex\":1830284483,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"dao\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":986861935,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"xonbzoggculapz\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]}") .toObject(CachePropertiesExportPolicy.class); - Assertions.assertEquals(1854784529, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(1830284483, model.rules().get(0).ruleIndex()); Assertions.assertFalse(model.rules().get(0).unixReadOnly()); - Assertions.assertTrue(model.rules().get(0).unixReadWrite()); + Assertions.assertFalse(model.rules().get(0).unixReadWrite()); Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadWrite()); Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertFalse(model.rules().get(0).cifs()); - Assertions.assertFalse(model.rules().get(0).nfsv3()); + Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertTrue(model.rules().get(0).cifs()); + Assertions.assertTrue(model.rules().get(0).nfsv3()); Assertions.assertFalse(model.rules().get(0).nfsv41()); - Assertions.assertEquals("oqytibyowbblgy", model.rules().get(0).allowedClients()); - Assertions.assertFalse(model.rules().get(0).hasRootAccess()); + Assertions.assertEquals("dao", model.rules().get(0).allowedClients()); + Assertions.assertTrue(model.rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CachePropertiesExportPolicy model = new CachePropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1854784529) + new ExportPolicyRule().withRuleIndex(1830284483) .withUnixReadOnly(false) - .withUnixReadWrite(true) + .withUnixReadWrite(false) .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false) + .withKerberos5ReadWrite(true) .withKerberos5IReadOnly(true) .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(true) - .withCifs(false) - .withNfsv3(false) - .withNfsv41(false) - .withAllowedClients("oqytibyowbblgy") - .withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1322513595) - .withUnixReadOnly(true) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) + .withKerberos5PReadOnly(true) .withKerberos5PReadWrite(false) .withCifs(true) .withNfsv3(true) .withNfsv41(false) - .withAllowedClients("xxlxsffgcvizq") + .withAllowedClients("dao") .withHasRootAccess(true) .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(946666624) + new ExportPolicyRule().withRuleIndex(986861935) .withUnixReadOnly(false) - .withUnixReadWrite(true) + .withUnixReadWrite(false) .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(false) - .withAllowedClients("owzfttsttkt") - .withHasRootAccess(false) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(520028629) - .withUnixReadOnly(true) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(true) + .withKerberos5ReadWrite(false) .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(true) .withKerberos5PReadWrite(true) .withCifs(false) .withNfsv3(false) .withNfsv41(false) - .withAllowedClients("rxcpjuisavo") - .withHasRootAccess(false) + .withAllowedClients("xonbzoggculapz") + .withHasRootAccess(true) .withChownMode(ChownMode.UNRESTRICTED))); model = BinaryData.fromObject(model).toObject(CachePropertiesExportPolicy.class); - Assertions.assertEquals(1854784529, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(1830284483, model.rules().get(0).ruleIndex()); Assertions.assertFalse(model.rules().get(0).unixReadOnly()); - Assertions.assertTrue(model.rules().get(0).unixReadWrite()); + Assertions.assertFalse(model.rules().get(0).unixReadWrite()); Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadWrite()); Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertFalse(model.rules().get(0).cifs()); - Assertions.assertFalse(model.rules().get(0).nfsv3()); + Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertTrue(model.rules().get(0).cifs()); + Assertions.assertTrue(model.rules().get(0).nfsv3()); Assertions.assertFalse(model.rules().get(0).nfsv41()); - Assertions.assertEquals("oqytibyowbblgy", model.rules().get(0).allowedClients()); - Assertions.assertFalse(model.rules().get(0).hasRootAccess()); + Assertions.assertEquals("dao", model.rules().get(0).allowedClients()); + Assertions.assertTrue(model.rules().get(0).hasRootAccess()); Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.java index 6bb7cd4f63d88..4ed49b39f952d 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\":\"txptlghw\",\"clusterPeeringPassphrase\":\"homewjjstliu\",\"vserverPeeringCommand\":\"qawmoaianc\",\"criticalWarning\":\"vodrrslblxydkxr\"}"; + = "{\"clusterPeeringCommand\":\"pk\",\"clusterPeeringPassphrase\":\"dm\",\"vserverPeeringCommand\":\"xxij\",\"criticalWarning\":\"kwsdgkj\"}"; 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("ukyrdnqodxahh", "hqfaqnvz", "qgyi", "emchgavsczuej", + .listPeeringPassphrasesWithResponse("krie", "bgnixxoww", "kyfwnwpiwxeiicr", "p", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("txptlghw", response.clusterPeeringCommand()); - Assertions.assertEquals("homewjjstliu", response.clusterPeeringPassphrase()); - Assertions.assertEquals("qawmoaianc", response.vserverPeeringCommand()); + Assertions.assertEquals("pk", response.clusterPeeringCommand()); + Assertions.assertEquals("dm", response.clusterPeeringPassphrase()); + Assertions.assertEquals("xxij", 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 fed12742b06a2..bbf2892243be4 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\":\"kenx\",\"size\":116533809200901624,\"serviceLevel\":\"Premium\",\"provisioningState\":\"frpmpdnqqskaw\",\"totalThroughputMibps\":36.359818,\"utilizedThroughputMibps\":68.465164,\"customThroughputMibps\":1075343777,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"lkzmegnitgvkxl\",\"location\":\"qdrfegcealzxwhc\",\"tags\":{\"qhlwigdivbkbxgo\":\"ymo\",\"vdaeyyguxakjsq\":\"fajuwas\"},\"id\":\"hzbezkgi\",\"name\":\"sidxasicdd\",\"type\":\"vvjskgfmocwahp\"}") + "{\"properties\":{\"poolId\":\"mjtgrqg\",\"size\":6571164785381949981,\"serviceLevel\":\"Standard\",\"provisioningState\":\"leplkcsmk\",\"totalThroughputMibps\":82.99046,\"utilizedThroughputMibps\":58.86058,\"customThroughputMibps\":499846079,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"qfloygbdgwum\",\"location\":\"dgdhpabgdexj\",\"tags\":{\"sxap\":\"jsaqwotmmwllcols\",\"xcgjokjljnhvlq\":\"efh\",\"yklxe\":\"bekpeeksnbksdqhj\"},\"id\":\"lkhhu\",\"name\":\"tcpoqma\",\"type\":\"nwqjwgokn\"}") .toObject(CapacityPoolInner.class); - Assertions.assertEquals("qdrfegcealzxwhc", model.location()); - Assertions.assertEquals("ymo", model.tags().get("qhlwigdivbkbxgo")); - Assertions.assertEquals(116533809200901624L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1075343777, model.customThroughputMibps()); + Assertions.assertEquals("dgdhpabgdexj", model.location()); + Assertions.assertEquals("jsaqwotmmwllcols", model.tags().get("sxap")); + Assertions.assertEquals(6571164785381949981L, model.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); + Assertions.assertEquals(499846079, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("qdrfegcealzxwhc") - .withTags(mapOf("qhlwigdivbkbxgo", "ymo", "vdaeyyguxakjsq", "fajuwas")) - .withSize(116533809200901624L) - .withServiceLevel(ServiceLevel.PREMIUM) - .withCustomThroughputMibps(1075343777) + CapacityPoolInner model = new CapacityPoolInner().withLocation("dgdhpabgdexj") + .withTags(mapOf("sxap", "jsaqwotmmwllcols", "xcgjokjljnhvlq", "efh", "yklxe", "bekpeeksnbksdqhj")) + .withSize(6571164785381949981L) + .withServiceLevel(ServiceLevel.STANDARD) + .withCustomThroughputMibps(499846079) .withQosType(QosType.MANUAL) - .withCoolAccess(false) + .withCoolAccess(true) .withEncryptionType(EncryptionType.SINGLE); model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("qdrfegcealzxwhc", model.location()); - Assertions.assertEquals("ymo", model.tags().get("qhlwigdivbkbxgo")); - Assertions.assertEquals(116533809200901624L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1075343777, model.customThroughputMibps()); + Assertions.assertEquals("dgdhpabgdexj", model.location()); + Assertions.assertEquals("jsaqwotmmwllcols", model.tags().get("sxap")); + Assertions.assertEquals(6571164785381949981L, model.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); + Assertions.assertEquals(499846079, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java index 3e037befbb310..efe27244b8d81 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\":\"esvecuijpx\",\"size\":1397812267932318523,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"prtujwsawdd\",\"totalThroughputMibps\":53.828697,\"utilizedThroughputMibps\":16.49437,\"customThroughputMibps\":695573054,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"eexavo\",\"location\":\"fglecdmdqbwp\",\"tags\":{\"b\":\"tgsfja\"},\"id\":\"lhhxudbxvodhtnsi\",\"name\":\"ud\",\"type\":\"z\"}],\"nextLink\":\"es\"}") + "{\"value\":[{\"properties\":{\"poolId\":\"nhqs\",\"size\":5052405898386452024,\"serviceLevel\":\"Standard\",\"provisioningState\":\"elpkpbafvafhlbyl\",\"totalThroughputMibps\":50.072384,\"utilizedThroughputMibps\":23.639166,\"customThroughputMibps\":1495868863,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"sofpltd\",\"location\":\"airrhvhfnracw\",\"tags\":{\"wouhdawsi\":\"igtuu\",\"bxsjybvitvqkj\":\"rb\",\"umtggmuwdchozfn\":\"az\",\"xn\":\"fexl\"},\"id\":\"akizvoaikna\",\"name\":\"lnuwiguy\",\"type\":\"lykwphvxz\"}],\"nextLink\":\"xhmpejtlkex\"}") .toObject(CapacityPoolList.class); - Assertions.assertEquals("fglecdmdqbwp", model.value().get(0).location()); - Assertions.assertEquals("tgsfja", model.value().get(0).tags().get("b")); - Assertions.assertEquals(1397812267932318523L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.value().get(0).serviceLevel()); - Assertions.assertEquals(695573054, model.value().get(0).customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.value().get(0).qosType()); - Assertions.assertTrue(model.value().get(0).coolAccess()); + Assertions.assertEquals("airrhvhfnracw", model.value().get(0).location()); + Assertions.assertEquals("igtuu", model.value().get(0).tags().get("wouhdawsi")); + Assertions.assertEquals(5052405898386452024L, model.value().get(0).size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.value().get(0).serviceLevel()); + Assertions.assertEquals(1495868863, model.value().get(0).customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); + Assertions.assertFalse(model.value().get(0).coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("es", model.nextLink()); + Assertions.assertEquals("xhmpejtlkex", 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 9cf003352eb78..95530c106065d 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,32 @@ public final class CapacityPoolPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolPatch model = BinaryData.fromString( - "{\"location\":\"xvxevblbjednljla\",\"id\":\"uaulxunsm\",\"name\":\"nkppxynen\",\"type\":\"vxei\",\"tags\":{\"ckt\":\"wklnsrmffeyc\",\"kk\":\"iymerteeammxqi\"},\"properties\":{\"size\":8717628857251043275,\"qosType\":\"Auto\",\"coolAccess\":false,\"customThroughputMibps\":221974172}}") + "{\"location\":\"hcdpkupnqrmgj\",\"id\":\"pkuwxeoioj\",\"name\":\"zfav\",\"type\":\"zwfbcyaykmmfzs\",\"tags\":{\"bjazejwwviy\":\"xrzxmdewsrsxkrp\",\"suhbrnn\":\"y\",\"zycyqiqyhg\":\"jxsqwjhqkbiwetp\",\"zlex\":\"se\"},\"properties\":{\"size\":890255881961539470,\"qosType\":\"Manual\",\"coolAccess\":true,\"customThroughputMibps\":1535510231}}") .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("xvxevblbjednljla", model.location()); - Assertions.assertEquals("wklnsrmffeyc", model.tags().get("ckt")); - Assertions.assertEquals(8717628857251043275L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(221974172, model.customThroughputMibps()); + Assertions.assertEquals("hcdpkupnqrmgj", model.location()); + Assertions.assertEquals("xrzxmdewsrsxkrp", model.tags().get("bjazejwwviy")); + Assertions.assertEquals(890255881961539470L, model.size()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(1535510231, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("xvxevblbjednljla") - .withTags(mapOf("ckt", "wklnsrmffeyc", "kk", "iymerteeammxqi")) - .withSize(8717628857251043275L) - .withQosType(QosType.AUTO) - .withCoolAccess(false) - .withCustomThroughputMibps(221974172); + CapacityPoolPatch model = new CapacityPoolPatch().withLocation("hcdpkupnqrmgj") + .withTags( + mapOf("bjazejwwviy", "xrzxmdewsrsxkrp", "suhbrnn", "y", "zycyqiqyhg", "jxsqwjhqkbiwetp", "zlex", "se")) + .withSize(890255881961539470L) + .withQosType(QosType.MANUAL) + .withCoolAccess(true) + .withCustomThroughputMibps(1535510231); model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("xvxevblbjednljla", model.location()); - Assertions.assertEquals("wklnsrmffeyc", model.tags().get("ckt")); - Assertions.assertEquals(8717628857251043275L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(221974172, model.customThroughputMibps()); + Assertions.assertEquals("hcdpkupnqrmgj", model.location()); + Assertions.assertEquals("xrzxmdewsrsxkrp", model.tags().get("bjazejwwviy")); + Assertions.assertEquals(890255881961539470L, model.size()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(1535510231, 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 0000000000000..5eaea1c82d051 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.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.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\":\"yivqikfxcvhrfsp\"}").toObject(ChangeZoneRequest.class); + Assertions.assertEquals("yivqikfxcvhrfsp", model.newZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeZoneRequest model = new ChangeZoneRequest().withNewZone("yivqikfxcvhrfsp"); + model = BinaryData.fromObject(model).toObject(ChangeZoneRequest.class); + Assertions.assertEquals("yivqikfxcvhrfsp", 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 3d43a82ee75cf..0fc09fa3f18a8 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\":false,\"reason\":\"Invalid\",\"message\":\"ujrtrhqvwr\"}") + = BinaryData.fromString("{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"vmwfauxxep\"}") .toObject(CheckAvailabilityResponseInner.class); - Assertions.assertFalse(model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, model.reason()); - Assertions.assertEquals("ujrtrhqvwr", model.message()); + Assertions.assertTrue(model.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("vmwfauxxep", 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 0000000000000..cd200cdd37571 --- /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\":\"Invalid\",\"message\":\"xubyjaffmmfblcqc\"}") + .toObject(CheckElasticResourceAvailabilityResponseInner.class); + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, model.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.INVALID, model.reason()); + Assertions.assertEquals("xubyjaffmmfblcqc", 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 0000000000000..45eb773f17ae3 --- /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\":\"uagrttikteusqc\"}") + .toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("uagrttikteusqc", model.filePath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckElasticVolumeFilePathAvailabilityRequest model + = new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("uagrttikteusqc"); + model = BinaryData.fromObject(model).toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("uagrttikteusqc", model.filePath()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java index 91998b296b06f..719aad46128fc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java @@ -11,14 +11,14 @@ public final class CifsUserTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CifsUser model = BinaryData.fromString("{\"username\":\"jqgwzp\"}").toObject(CifsUser.class); - Assertions.assertEquals("jqgwzp", model.username()); + CifsUser model = BinaryData.fromString("{\"username\":\"kqfqjbvl\"}").toObject(CifsUser.class); + Assertions.assertEquals("kqfqjbvl", model.username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CifsUser model = new CifsUser().withUsername("jqgwzp"); + CifsUser model = new CifsUser().withUsername("kqfqjbvl"); model = BinaryData.fromObject(model).toObject(CifsUser.class); - Assertions.assertEquals("jqgwzp", model.username()); + Assertions.assertEquals("kqfqjbvl", model.username()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java index d4e95ca82ea70..bfe3e8763d4e5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponseInnerTests.java @@ -11,10 +11,10 @@ public final class ClusterPeerCommandResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterPeerCommandResponseInner model - = BinaryData.fromString("{\"properties\":{\"clusterPeeringCommand\":\"agxti\",\"passphrase\":\"dxbx\"}}") - .toObject(ClusterPeerCommandResponseInner.class); - Assertions.assertEquals("agxti", model.properties().clusterPeeringCommand()); - Assertions.assertEquals("dxbx", model.properties().passphrase()); + ClusterPeerCommandResponseInner model = BinaryData + .fromString("{\"properties\":{\"clusterPeeringCommand\":\"orppxebmnzbtb\",\"passphrase\":\"pglkf\"}}") + .toObject(ClusterPeerCommandResponseInner.class); + Assertions.assertEquals("orppxebmnzbtb", model.properties().clusterPeeringCommand()); + Assertions.assertEquals("pglkf", model.properties().passphrase()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponsePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponsePropertiesTests.java index a759edaaa0607..7a5f17681b36e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponsePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerCommandResponsePropertiesTests.java @@ -12,9 +12,9 @@ public final class ClusterPeerCommandResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterPeerCommandResponseProperties model - = BinaryData.fromString("{\"clusterPeeringCommand\":\"kbogqxndlkzgx\",\"passphrase\":\"ripl\"}") + = BinaryData.fromString("{\"clusterPeeringCommand\":\"hdneuelfph\",\"passphrase\":\"yhtozfikdowwqu\"}") .toObject(ClusterPeerCommandResponseProperties.class); - Assertions.assertEquals("kbogqxndlkzgx", model.clusterPeeringCommand()); - Assertions.assertEquals("ripl", model.passphrase()); + Assertions.assertEquals("hdneuelfph", model.clusterPeeringCommand()); + Assertions.assertEquals("yhtozfikdowwqu", model.passphrase()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerInnerTests.java new file mode 100644 index 0000000000000..c550f84d2aca7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerInnerTests.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.fluent.models.ClusterPeerInner; + +public final class ClusterPeerInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterPeerInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\",\"anfClusterName\":\"dtvqe\",\"ontapClusterName\":\"qct\",\"ontapVersion\":\"xdtddmflhuytxzv\",\"status\":\"Pending\",\"hybridReplicationResourceIds\":[\"xbannovvoxc\",\"ytprwnwvroev\",\"tlyo\"],\"externalCacheConnectionResourceIds\":[\"rouuxvnsasbcry\",\"o\",\"izrxklob\",\"xnazpmkml\"],\"command\":\"evfxzopjhbzxlioh\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"dtfgxqbawpcbb\",\"peerIpAddress\":\"zqcyknap\"}],\"clusterPeerSubnetResourceId\":\"fyuicdh\"},\"id\":\"dyb\",\"name\":\"wgbdvibidmhmwffp\",\"type\":\"fmuvapckccr\"}") + .toObject(ClusterPeerInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerListResultTests.java new file mode 100644 index 0000000000000..3d19c258963e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerListResultTests.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.ClusterPeerListResult; +import org.junit.jupiter.api.Assertions; + +public final class ClusterPeerListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterPeerListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"anfClusterName\":\"kjxnqpvwgfstmhq\",\"ontapClusterName\":\"izmdksa\",\"ontapVersion\":\"fcluqvo\",\"status\":\"Active\",\"hybridReplicationResourceIds\":[\"im\",\"yvwgcwwpbmzgwe\",\"ydsx\",\"efoh\"],\"externalCacheConnectionResourceIds\":[\"vopwndyqleallk\",\"mtkhlowkxxpvbr\",\"fjmzsyzfho\"],\"command\":\"h\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"yych\",\"peerIpAddress\":\"nsjlpjrtws\"},{\"networkInterfaceResourceId\":\"hv\",\"peerIpAddress\":\"uic\"},{\"networkInterfaceResourceId\":\"hvtrrmhwrbfdpyf\",\"peerIpAddress\":\"ubhvj\"}],\"clusterPeerSubnetResourceId\":\"r\"},\"id\":\"uyzlw\",\"name\":\"hmem\",\"type\":\"ooclutnp\"},{\"properties\":{\"provisioningState\":\"Failed\",\"anfClusterName\":\"zjkmmykyujxs\",\"ontapClusterName\":\"hsrrryejylmbkz\",\"ontapVersion\":\"nigrfihotjewl\",\"status\":\"Pending\",\"hybridReplicationResourceIds\":[\"jgnrefqyhqoto\"],\"externalCacheConnectionResourceIds\":[\"qakydiw\",\"brkwpzdqt\",\"hcspo\"],\"command\":\"qaxsipietgbebjf\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"moichdlpnfpubntn\",\"peerIpAddress\":\"atzviqsowsaael\"},{\"networkInterfaceResourceId\":\"attcju\",\"peerIpAddress\":\"plrvkmjcwmjvlg\"}],\"clusterPeerSubnetResourceId\":\"gcvkyyli\"},\"id\":\"zbj\",\"name\":\"sfxsf\",\"type\":\"ztlvtmvagbwidqlv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"anfClusterName\":\"eofiz\",\"ontapClusterName\":\"jfnmjmvlwyz\",\"ontapVersion\":\"blkujrllfojuidjp\",\"status\":\"Error\",\"hybridReplicationResourceIds\":[\"c\",\"jikzoeovvtzej\",\"tjklntikyjuzk\",\"bqzolxr\"],\"externalCacheConnectionResourceIds\":[\"qjwt\",\"htgv\",\"zpcrrkolawj\"],\"command\":\"smwr\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"dxfzzzwyjaf\",\"peerIpAddress\":\"tlhguynuchl\"},{\"networkInterfaceResourceId\":\"mltx\",\"peerIpAddress\":\"whmozusgzvlnsnnj\"},{\"networkInterfaceResourceId\":\"fpafolpymwamxq\",\"peerIpAddress\":\"rag\"},{\"networkInterfaceResourceId\":\"gdphtvdula\",\"peerIpAddress\":\"vl\"}],\"clusterPeerSubnetResourceId\":\"c\"},\"id\":\"srlzknmzlan\",\"name\":\"updwv\",\"type\":\"phcnzqtpj\"}],\"nextLink\":\"qrhvthlaiwdcxsml\"}") + .toObject(ClusterPeerListResult.class); + Assertions.assertEquals("qrhvthlaiwdcxsml", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerPropertiesTests.java new file mode 100644 index 0000000000000..7fc227304f79f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeerPropertiesTests.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.ClusterPeerProperties; + +public final class ClusterPeerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ClusterPeerProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Accepted\",\"anfClusterName\":\"yoxoy\",\"ontapClusterName\":\"k\",\"ontapVersion\":\"aimmoiroqb\",\"status\":\"Error\",\"hybridReplicationResourceIds\":[\"a\",\"apyyrmfsvbpavbo\",\"fppdbwnu\",\"gahxkumasjcaa\"],\"externalCacheConnectionResourceIds\":[\"mmcpug\",\"ehqepvufhbzehe\",\"hoqhnl\",\"qnbldxe\"],\"command\":\"lgsc\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"imkrsrrmouc\",\"peerIpAddress\":\"ofldpuviyfcaa\"}],\"clusterPeerSubnetResourceId\":\"olhbhlvb\"}") + .toObject(ClusterPeerProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeersGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeersGetWithResponseMockTests.java new file mode 100644 index 0000000000000..24d4ba4e54f95 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeersGetWithResponseMockTests.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.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.ClusterPeer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ClusterPeersGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Updating\",\"anfClusterName\":\"yil\",\"ontapClusterName\":\"ibkgxyxyau\",\"ontapVersion\":\"eddobmcnltm\",\"status\":\"Pending\",\"hybridReplicationResourceIds\":[\"jsqy\",\"mmoxfablqgpwbmwh\"],\"externalCacheConnectionResourceIds\":[\"li\"],\"command\":\"ycgnwplrrbphc\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"bibticuhqvum\",\"peerIpAddress\":\"pbfs\"}],\"clusterPeerSubnetResourceId\":\"qbbewfcuqfpyyxm\"},\"id\":\"mtmvwituwey\",\"name\":\"jshcybwf\",\"type\":\"ppoxprcmv\"}"; + + 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)); + + ClusterPeer response = manager.clusterPeers() + .getWithResponse("ktwieope", "e", "xq", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeersListByParentMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeersListByParentMockTests.java new file mode 100644 index 0000000000000..577920efc064f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ClusterPeersListByParentMockTests.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.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.ClusterPeer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ClusterPeersListByParentMockTests { + @Test + public void testListByParent() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"anfClusterName\":\"wlunpipcwybs\",\"ontapClusterName\":\"ncnpat\",\"ontapVersion\":\"tsaebwfwhxorpwa\",\"status\":\"Error\",\"hybridReplicationResourceIds\":[\"gexojfccylhtrht\",\"vazjpwexcd\",\"zp\",\"o\"],\"externalCacheConnectionResourceIds\":[\"xezm\",\"rkjg\"],\"command\":\"euxsphlokfpmijp\",\"networkInterfaces\":[{\"networkInterfaceResourceId\":\"vfbhwb\",\"peerIpAddress\":\"qufv\"},{\"networkInterfaceResourceId\":\"gnrglaqrwyamb\",\"peerIpAddress\":\"bafeb\"},{\"networkInterfaceResourceId\":\"xfkjqutibh\",\"peerIpAddress\":\"enntrvrkpsabdux\"}],\"clusterPeerSubnetResourceId\":\"m\"},\"id\":\"hnysvlpyeu\",\"name\":\"kppdi\",\"type\":\"qb\"}]}"; + + 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.clusterPeers().listByParent("uujxdii", "moxrezsvavlrxi", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java index 5011d63e4cf8a..f17443d1bd2dd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java @@ -12,24 +12,24 @@ public final class DailyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DailySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1905366329,\"hour\":2104888829,\"minute\":457558251,\"usedBytes\":7823520654951769433}") + "{\"snapshotsToKeep\":1821555350,\"hour\":456914071,\"minute\":1516044260,\"usedBytes\":4782165638110518920}") .toObject(DailySchedule.class); - Assertions.assertEquals(1905366329, model.snapshotsToKeep()); - Assertions.assertEquals(2104888829, model.hour()); - Assertions.assertEquals(457558251, model.minute()); - Assertions.assertEquals(7823520654951769433L, model.usedBytes()); + Assertions.assertEquals(1821555350, model.snapshotsToKeep()); + Assertions.assertEquals(456914071, model.hour()); + Assertions.assertEquals(1516044260, model.minute()); + Assertions.assertEquals(4782165638110518920L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withSnapshotsToKeep(1905366329) - .withHour(2104888829) - .withMinute(457558251) - .withUsedBytes(7823520654951769433L); + DailySchedule model = new DailySchedule().withSnapshotsToKeep(1821555350) + .withHour(456914071) + .withMinute(1516044260) + .withUsedBytes(4782165638110518920L); model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(1905366329, model.snapshotsToKeep()); - Assertions.assertEquals(2104888829, model.hour()); - Assertions.assertEquals(457558251, model.minute()); - Assertions.assertEquals(7823520654951769433L, model.usedBytes()); + Assertions.assertEquals(1821555350, model.snapshotsToKeep()); + Assertions.assertEquals(456914071, model.hour()); + Assertions.assertEquals(1516044260, model.minute()); + Assertions.assertEquals(4782165638110518920L, model.usedBytes()); } } 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 0000000000000..deafb5b44d704 --- /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-09-08T22:56:02Z\",\"snapshotCreationDate\":\"2021-03-31T04:09:34Z\",\"completionDate\":\"2021-08-02T11:55:53Z\",\"provisioningState\":\"Moving\",\"size\":1447562918838442967,\"label\":\"iirhgfgrwsd\",\"backupType\":\"Manual\",\"failureReason\":\"t\",\"elasticVolumeResourceId\":\"vzbglbyvi\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"brxkjzwr\",\"elasticBackupPolicyResourceId\":\"ffm\",\"volumeSize\":\"Large\"},\"id\":\"fbkgozxwopdby\",\"name\":\"p\",\"type\":\"zqaclna\"}") + .toObject(ElasticBackupInner.class); + Assertions.assertEquals("iirhgfgrwsd", model.properties().label()); + Assertions.assertEquals("vzbglbyvi", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("brxkjzwr", model.properties().elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupInner model + = new ElasticBackupInner().withProperties(new ElasticBackupProperties().withLabel("iirhgfgrwsd") + .withElasticVolumeResourceId("vzbglbyvi") + .withSnapshotUsage(SnapshotUsage.CREATE_NEW_SNAPSHOT) + .withElasticSnapshotResourceId("brxkjzwr")); + model = BinaryData.fromObject(model).toObject(ElasticBackupInner.class); + Assertions.assertEquals("iirhgfgrwsd", model.properties().label()); + Assertions.assertEquals("vzbglbyvi", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("brxkjzwr", 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 0000000000000..c5ba5364e03c4 --- /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-09-24T17:37:19Z\",\"snapshotCreationDate\":\"2021-06-26T15:30:29Z\",\"completionDate\":\"2021-10-04T21:24:51Z\",\"provisioningState\":\"Canceled\",\"size\":1101772026487644313,\"label\":\"pddouifamowaziyn\",\"backupType\":\"Scheduled\",\"failureReason\":\"wzdvpiwh\",\"elasticVolumeResourceId\":\"qszdtmaajquhuxyl\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"ty\",\"elasticBackupPolicyResourceId\":\"bmzyospsps\",\"volumeSize\":\"Large\"},\"id\":\"kyjpmspbps\",\"name\":\"df\",\"type\":\"pyogtieyuj\"},{\"properties\":{\"creationDate\":\"2020-12-25T12:48:46Z\",\"snapshotCreationDate\":\"2021-06-10T09:27Z\",\"completionDate\":\"2021-03-17T21:21:35Z\",\"provisioningState\":\"Failed\",\"size\":5566612740154232869,\"label\":\"jdxvglnkvxlxpa\",\"backupType\":\"Scheduled\",\"failureReason\":\"vbgkcvkhpzv\",\"elasticVolumeResourceId\":\"qdf\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"iypfp\",\"elasticBackupPolicyResourceId\":\"cpzgpxtiv\",\"volumeSize\":\"Large\"},\"id\":\"idibgqjxgpn\",\"name\":\"hgovfgp\",\"type\":\"kqmhhaowjr\"},{\"properties\":{\"creationDate\":\"2021-07-30T18:35:21Z\",\"snapshotCreationDate\":\"2021-09-19T06:58:07Z\",\"completionDate\":\"2021-06-17T04:09:43Z\",\"provisioningState\":\"Moving\",\"size\":5827386726491260788,\"label\":\"zvkfv\",\"backupType\":\"Manual\",\"failureReason\":\"mx\",\"elasticVolumeResourceId\":\"psw\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"khlg\",\"elasticBackupPolicyResourceId\":\"hbemzq\",\"volumeSize\":\"Large\"},\"id\":\"uwiwtglxxhljfpg\",\"name\":\"icrmnzh\",\"type\":\"gmqgjs\"}],\"nextLink\":\"pqcbfrmbodthsq\"}") + .toObject(ElasticBackupListResult.class); + Assertions.assertEquals("pddouifamowaziyn", model.value().get(0).properties().label()); + Assertions.assertEquals("qszdtmaajquhuxyl", model.value().get(0).properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.value().get(0).properties().snapshotUsage()); + Assertions.assertEquals("ty", model.value().get(0).properties().elasticSnapshotResourceId()); + Assertions.assertEquals("pqcbfrmbodthsq", 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 0000000000000..d847302ee5883 --- /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\":741201134,\"weeklyBackupsToKeep\":475625396,\"monthlyBackupsToKeep\":1102100934,\"assignedVolumesCount\":1824623484,\"policyState\":\"Enabled\"},\"eTag\":\"sgbjmlree\",\"location\":\"fwsszvlcwlis\",\"tags\":{\"crqmipfjwfoygi\":\"tfx\",\"zabulnvgsk\":\"mshxxba\",\"jznvhxqqmq\":\"toxjdzj\",\"ocxm\":\"paydhfn\"},\"id\":\"fshksnyzmspamwb\",\"name\":\"m\",\"type\":\"nlslcef\"}"; + + 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("gcnbhcbmjk") + .withRegion("hskb") + .withExistingElasticAccount("huosgwqpsqaz", "hqodv") + .withTags( + mapOf("pfdzxcouzfwofw", "jgrulcfogxhcxnwj", "kzkdtzxsoednlwg", "k", "isnionetbzdrdpue", "ihezomucmq")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(827235162) + .withWeeklyBackupsToKeep(1081448081) + .withMonthlyBackupsToKeep(1621808098) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + + Assertions.assertEquals("fwsszvlcwlis", response.location()); + Assertions.assertEquals("tfx", response.tags().get("crqmipfjwfoygi")); + Assertions.assertEquals(741201134, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(475625396, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1102100934, 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 0000000000000..87a1ad1e15a4f --- /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\":\"Succeeded\",\"dailyBackupsToKeep\":237675407,\"weeklyBackupsToKeep\":602201525,\"monthlyBackupsToKeep\":2142343469,\"assignedVolumesCount\":2124180198,\"policyState\":\"Disabled\"},\"eTag\":\"gkegxcypxbbfetw\",\"location\":\"y\",\"tags\":{\"kiu\":\"xpdxqlfrolqow\",\"ahwkxjjm\":\"jew\"},\"id\":\"tnlmsoodtmvecdhd\",\"name\":\"swcrptveaj\",\"type\":\"zxvlgsrgkrfizrp\"}"; + + 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("sx", "pytn", "qbalahovuuwxhme", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("y", response.location()); + Assertions.assertEquals("xpdxqlfrolqow", response.tags().get("kiu")); + Assertions.assertEquals(237675407, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(602201525, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(2142343469, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, 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 0000000000000..3f9be60f73499 --- /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\":229601357,\"weeklyBackupsToKeep\":1880896208,\"monthlyBackupsToKeep\":1804613779,\"assignedVolumesCount\":880916752,\"policyState\":\"Enabled\"},\"eTag\":\"c\",\"location\":\"cf\",\"tags\":{\"jp\":\"pyycpawm\",\"fpcfjf\":\"dpwrp\"},\"id\":\"zlgzawkgyepey\",\"name\":\"mnnidmdia\",\"type\":\"pzxkzrntmkct\"}]}"; + + 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("wlp", "yuqh", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("cf", response.iterator().next().location()); + Assertions.assertEquals("pyycpawm", response.iterator().next().tags().get("jp")); + Assertions.assertEquals(229601357, response.iterator().next().properties().dailyBackupsToKeep()); + Assertions.assertEquals(1880896208, response.iterator().next().properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1804613779, 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 0000000000000..12211317b9c83 --- /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\":798117524,\"weeklyBackupsToKeep\":2102626781,\"monthlyBackupsToKeep\":461847321,\"assignedVolumesCount\":1374457315,\"policyState\":\"Disabled\"},\"eTag\":\"fujg\",\"location\":\"gaao\",\"tags\":{\"swvr\":\"taqutdewem\",\"kimrt\":\"unzzjgehk\",\"jqepqwhi\":\"xokffqyin\"},\"id\":\"monstshiyxgve\",\"name\":\"fclduccbirdsv\",\"type\":\"wcobie\"}") + .toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("gaao", model.location()); + Assertions.assertEquals("taqutdewem", model.tags().get("swvr")); + Assertions.assertEquals(798117524, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(2102626781, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(461847321, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.properties().policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyInner model = new ElasticBackupPolicyInner().withLocation("gaao") + .withTags(mapOf("swvr", "taqutdewem", "kimrt", "unzzjgehk", "jqepqwhi", "xokffqyin")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(798117524) + .withWeeklyBackupsToKeep(2102626781) + .withMonthlyBackupsToKeep(461847321) + .withPolicyState(ElasticBackupPolicyState.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("gaao", model.location()); + Assertions.assertEquals("taqutdewem", model.tags().get("swvr")); + Assertions.assertEquals(798117524, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(2102626781, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(461847321, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, 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 0000000000000..1ec0ab4718e8b --- /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\":\"Updating\",\"dailyBackupsToKeep\":1606147807,\"weeklyBackupsToKeep\":1235050131,\"monthlyBackupsToKeep\":1910463572,\"assignedVolumesCount\":828785345,\"policyState\":\"Disabled\"},\"eTag\":\"i\",\"location\":\"vumwmxqh\",\"tags\":{\"hflzokxco\":\"noamldsehaohdj\",\"tsxoatftgz\":\"pelnjetag\",\"vefloccsrmozihmi\":\"npbs\"},\"id\":\"g\",\"name\":\"wtxxpkyjcx\",\"type\":\"jxgrytfmp\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":2082373615,\"weeklyBackupsToKeep\":735394972,\"monthlyBackupsToKeep\":1436961736,\"assignedVolumesCount\":740438524,\"policyState\":\"Disabled\"},\"eTag\":\"xu\",\"location\":\"rksxwpndfc\",\"tags\":{\"twk\":\"znth\",\"oamktcq\":\"aosrxuz\"},\"id\":\"os\",\"name\":\"gbzahgxqdlyr\",\"type\":\"ltlaprltzkatbhj\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"dailyBackupsToKeep\":203193746,\"weeklyBackupsToKeep\":1452545825,\"monthlyBackupsToKeep\":1574788888,\"assignedVolumesCount\":1025410232,\"policyState\":\"Disabled\"},\"eTag\":\"lagun\",\"location\":\"gfebwlnb\",\"tags\":{\"dqmjxly\":\"reeudzqavb\",\"gouwtlmj\":\"zg\"},\"id\":\"yuojqtobaxk\",\"name\":\"eytu\",\"type\":\"lbfjkwr\"},{\"properties\":{\"provisioningState\":\"Updating\",\"dailyBackupsToKeep\":913517833,\"weeklyBackupsToKeep\":1038031294,\"monthlyBackupsToKeep\":1412807913,\"assignedVolumesCount\":1284658212,\"policyState\":\"Enabled\"},\"eTag\":\"hdenxaulk\",\"location\":\"kdk\",\"tags\":{\"pxuckpggq\":\"jnnawtqa\",\"rdhlis\":\"wey\"},\"id\":\"gwflq\",\"name\":\"mpizru\",\"type\":\"n\"}],\"nextLink\":\"xpxiwfcngjs\"}") + .toObject(ElasticBackupPolicyListResult.class); + Assertions.assertEquals("vumwmxqh", model.value().get(0).location()); + Assertions.assertEquals("noamldsehaohdj", model.value().get(0).tags().get("hflzokxco")); + Assertions.assertEquals(1606147807, model.value().get(0).properties().dailyBackupsToKeep()); + Assertions.assertEquals(1235050131, model.value().get(0).properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1910463572, model.value().get(0).properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.value().get(0).properties().policyState()); + Assertions.assertEquals("xpxiwfcngjs", 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 0000000000000..ea9b88ca0c362 --- /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\":\"Deleting\",\"dailyBackupsToKeep\":1923237132,\"weeklyBackupsToKeep\":2099523600,\"monthlyBackupsToKeep\":648351672,\"assignedVolumesCount\":2100756233,\"policyState\":\"Enabled\"}") + .toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(1923237132, model.dailyBackupsToKeep()); + Assertions.assertEquals(2099523600, model.weeklyBackupsToKeep()); + Assertions.assertEquals(648351672, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyProperties model = new ElasticBackupPolicyProperties().withDailyBackupsToKeep(1923237132) + .withWeeklyBackupsToKeep(2099523600) + .withMonthlyBackupsToKeep(648351672) + .withPolicyState(ElasticBackupPolicyState.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(1923237132, model.dailyBackupsToKeep()); + Assertions.assertEquals(2099523600, model.weeklyBackupsToKeep()); + Assertions.assertEquals(648351672, 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 0000000000000..98cb53a5153bf --- /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\":1349607530,\"weeklyBackupsToKeep\":1663366916,\"monthlyBackupsToKeep\":1292614017,\"policyState\":\"Enabled\"}") + .toObject(ElasticBackupPolicyUpdateProperties.class); + Assertions.assertEquals(1349607530, model.dailyBackupsToKeep()); + Assertions.assertEquals(1663366916, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1292614017, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyUpdateProperties model + = new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(1349607530) + .withWeeklyBackupsToKeep(1663366916) + .withMonthlyBackupsToKeep(1292614017) + .withPolicyState(ElasticBackupPolicyState.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdateProperties.class); + Assertions.assertEquals(1349607530, model.dailyBackupsToKeep()); + Assertions.assertEquals(1663366916, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1292614017, 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 0000000000000..3471e6ef07eca --- /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\":{\"uxlxqzvners\":\"ghgshejjtbxqmu\",\"qbsms\":\"ycucrwnamikzeb\"},\"properties\":{\"dailyBackupsToKeep\":273840468,\"weeklyBackupsToKeep\":1274607788,\"monthlyBackupsToKeep\":1915069665,\"policyState\":\"Enabled\"}}") + .toObject(ElasticBackupPolicyUpdate.class); + Assertions.assertEquals("ghgshejjtbxqmu", model.tags().get("uxlxqzvners")); + Assertions.assertEquals(273840468, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1274607788, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1915069665, 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("uxlxqzvners", "ghgshejjtbxqmu", "qbsms", "ycucrwnamikzeb")) + .withProperties(new ElasticBackupPolicyUpdateProperties().withDailyBackupsToKeep(273840468) + .withWeeklyBackupsToKeep(1274607788) + .withMonthlyBackupsToKeep(1915069665) + .withPolicyState(ElasticBackupPolicyState.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyUpdate.class); + Assertions.assertEquals("ghgshejjtbxqmu", model.tags().get("uxlxqzvners")); + Assertions.assertEquals(273840468, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1274607788, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1915069665, 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 0000000000000..7741f3d2c4be4 --- /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-04-21T09:47:39Z\",\"snapshotCreationDate\":\"2021-10-06T23:20:34Z\",\"completionDate\":\"2020-12-25T22:51:58Z\",\"provisioningState\":\"Creating\",\"size\":9100338194220366953,\"label\":\"smfcttuxuuyilfl\",\"backupType\":\"Manual\",\"failureReason\":\"uvr\",\"elasticVolumeResourceId\":\"hmrnjhvsuj\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"ytqj\",\"elasticBackupPolicyResourceId\":\"h\",\"volumeSize\":\"Regular\"}") + .toObject(ElasticBackupProperties.class); + Assertions.assertEquals("smfcttuxuuyilfl", model.label()); + Assertions.assertEquals("hmrnjhvsuj", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("ytqj", model.elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupProperties model = new ElasticBackupProperties().withLabel("smfcttuxuuyilfl") + .withElasticVolumeResourceId("hmrnjhvsuj") + .withSnapshotUsage(SnapshotUsage.CREATE_NEW_SNAPSHOT) + .withElasticSnapshotResourceId("ytqj"); + model = BinaryData.fromObject(model).toObject(ElasticBackupProperties.class); + Assertions.assertEquals("smfcttuxuuyilfl", model.label()); + Assertions.assertEquals("hmrnjhvsuj", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("ytqj", 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 0000000000000..813f1853cbeef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.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.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\":\"Canceled\"},\"eTag\":\"azuawx\",\"location\":\"x\",\"tags\":{\"s\":\"mwabzxrvxc\",\"gzwywak\":\"sphaivmxyasflvg\",\"ljhlnymzotq\":\"ihknsmjbl\",\"mv\":\"ryuzcbmqqv\"},\"id\":\"fgtayxonsup\",\"name\":\"ujlzqnhcvsqltn\",\"type\":\"oibgsxg\"}") + .toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("x", model.location()); + Assertions.assertEquals("mwabzxrvxc", model.tags().get("s")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultInner model = new ElasticBackupVaultInner().withLocation("x") + .withTags( + mapOf("s", "mwabzxrvxc", "gzwywak", "sphaivmxyasflvg", "ljhlnymzotq", "ihknsmjbl", "mv", "ryuzcbmqqv")) + .withProperties(new ElasticBackupVaultProperties()); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("x", model.location()); + Assertions.assertEquals("mwabzxrvxc", model.tags().get("s")); + } + + // 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 0000000000000..59f80bfe8c575 --- /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\":\"egizv\",\"location\":\"felisdjub\",\"tags\":{\"bsazgakg\":\"qigkx\",\"apvu\":\"cyrcmjdmspo\"},\"id\":\"rylniofrzg\",\"name\":\"zjedmstkvnlv\",\"type\":\"bcuiiz\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"eTag\":\"ansnvp\",\"location\":\"bmikost\",\"tags\":{\"fy\":\"kiwbuqnyoph\"},\"id\":\"sgcrpfbcunezzce\",\"name\":\"elfwy\",\"type\":\"wl\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"tnpsihclaf\",\"location\":\"aylp\",\"tags\":{\"mwqkchcxwaxf\":\"qqwzt\"},\"id\":\"w\",\"name\":\"jkjexf\",\"type\":\"eqvhpsylkk\"}],\"nextLink\":\"kbffmbmx\"}") + .toObject(ElasticBackupVaultListResult.class); + Assertions.assertEquals("felisdjub", model.value().get(0).location()); + Assertions.assertEquals("qigkx", model.value().get(0).tags().get("bsazgakg")); + Assertions.assertEquals("kbffmbmx", 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 0000000000000..422cfb7e6fbae --- /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\":\"Deleting\"}") + .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 0000000000000..077902932631f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultUpdateTests.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.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\":{\"bxiqxeiiqbimht\":\"onmpqoxwdof\",\"pofvwb\":\"wwinhehf\",\"vqihebwtswbzuwf\":\"blembnkbwvqvxkd\"}}") + .toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("onmpqoxwdof", model.tags().get("bxiqxeiiqbimht")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultUpdate model = new ElasticBackupVaultUpdate().withTags( + mapOf("bxiqxeiiqbimht", "onmpqoxwdof", "pofvwb", "wwinhehf", "vqihebwtswbzuwf", "blembnkbwvqvxkd")); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultUpdate.class); + Assertions.assertEquals("onmpqoxwdof", model.tags().get("bxiqxeiiqbimht")); + } + + // 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 0000000000000..89249553c78e0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java @@ -0,0 +1,60 @@ +// Copyright (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\":\"d\",\"location\":\"brdvce\",\"tags\":{\"gnmguz\":\"hitxnm\",\"kbd\":\"uwvorbalkjn\",\"gxiynecovagzk\":\"lltqstqkqs\",\"qiawzl\":\"eubanlxunpqcc\"},\"id\":\"klaslga\",\"name\":\"izuxlrarwpewsaud\",\"type\":\"ejtig\"}"; + + 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("yjtkakvlb") + .withRegion("izjixwfgcd") + .withExistingElasticAccount("wgofmhx", "rjlvzklkvbgi") + .withTags(mapOf("mdmuqoh", "kcxwnujvqynvavi", "wjc", "ihraxqudd", "nnin", "jbrhlhpvzadbw", + "vztiucwviqllukh", "fhxrzfr")) + .withProperties(new ElasticBackupVaultProperties()) + .create(); + + Assertions.assertEquals("brdvce", response.location()); + Assertions.assertEquals("hitxnm", response.tags().get("gnmguz")); + } + + // 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 0000000000000..5efc35ca86211 --- /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\":\"Succeeded\"},\"eTag\":\"musuaawja\",\"location\":\"wj\",\"tags\":{\"nniixyxvqba\":\"z\",\"tgirnb\":\"os\",\"dorgmynltw\":\"mgm\"},\"id\":\"p\",\"name\":\"tmfoeajogsyxwet\",\"type\":\"mfd\"}"; + + 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("zqulptkbv", "pxtzhigqqbtimpk", "blornsih", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("wj", response.location()); + Assertions.assertEquals("z", response.tags().get("nniixyxvqba")); + } +} 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 0000000000000..550c9079d0932 --- /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\":\"Patching\"},\"eTag\":\"hhwmjpjbweunxcq\",\"location\":\"ihufoihp\",\"tags\":{\"nzuz\":\"bxv\",\"cscpiuzvkunh\":\"bgk\"},\"id\":\"i\",\"name\":\"juktirzkaugpucd\",\"type\":\"cfqp\"}]}"; + + 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("rvlkpzwbhnrec", "hdidrmuhkahmjedb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ihufoihp", response.iterator().next().location()); + Assertions.assertEquals("bxv", response.iterator().next().tags().get("nzuz")); + } +} 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 0000000000000..015d6a6e12c0c --- /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-04-25T00:02:10Z\",\"snapshotCreationDate\":\"2021-09-12T08:11:29Z\",\"completionDate\":\"2021-07-05T22:58:54Z\",\"provisioningState\":\"Succeeded\",\"size\":1077974122526047683,\"label\":\"ayscseydzje\",\"backupType\":\"Manual\",\"failureReason\":\"nvkvmuwrxlniwmcp\",\"elasticVolumeResourceId\":\"rr\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"dvmip\",\"elasticBackupPolicyResourceId\":\"eaeqjzmhkdclacr\",\"volumeSize\":\"Regular\"},\"id\":\"munerkeluxz\",\"name\":\"hxze\",\"type\":\"bzuzu\"}"; + + 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("dqqigdydkghpc") + .withExistingElasticBackupVault("xiqqzjkoxdupna", "gl", "ouigdmfivjqte") + .withProperties(new ElasticBackupProperties().withLabel("vfxlapjajodmkrr") + .withElasticVolumeResourceId("jqgir") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("yvxchpqvctsfae")) + .create(); + + Assertions.assertEquals("ayscseydzje", response.properties().label()); + Assertions.assertEquals("rr", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("dvmip", 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 0000000000000..66b2ffa176e38 --- /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-10-23T08:44:10Z\",\"snapshotCreationDate\":\"2021-03-27T06:06:44Z\",\"completionDate\":\"2021-12-08T16:23:27Z\",\"provisioningState\":\"Accepted\",\"size\":5125499998460195517,\"label\":\"c\",\"backupType\":\"Manual\",\"failureReason\":\"eiihfymko\",\"elasticVolumeResourceId\":\"ihyeseu\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"gzhogsmgbvmtd\",\"elasticBackupPolicyResourceId\":\"qbe\",\"volumeSize\":\"Large\"},\"id\":\"veglabtvkbiwzn\",\"name\":\"tfgfic\",\"type\":\"dyhi\"}"; + + 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("qdktwtkvihlp", "liwoyngu", "zhwv", "adpcmhjhausy", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("c", response.properties().label()); + Assertions.assertEquals("ihyeseu", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("gzhogsmgbvmtd", 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 0000000000000..b4ceb94067719 --- /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-11-07T03:00:21Z\",\"snapshotCreationDate\":\"2021-06-19T03:03:45Z\",\"completionDate\":\"2021-07-19T00:19:56Z\",\"provisioningState\":\"Patching\",\"size\":6595403235648304746,\"label\":\"bawkikcdg\",\"backupType\":\"Scheduled\",\"failureReason\":\"sd\",\"elasticVolumeResourceId\":\"jey\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"ede\",\"elasticBackupPolicyResourceId\":\"iwhagxsur\",\"volumeSize\":\"Regular\"},\"id\":\"shzz\",\"name\":\"g\",\"type\":\"ll\"}]}"; + + 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("paczmuh", "cakznhokhoitwhrj", "dmmazdnc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("bawkikcdg", response.iterator().next().properties().label()); + Assertions.assertEquals("jey", response.iterator().next().properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, + response.iterator().next().properties().snapshotUsage()); + Assertions.assertEquals("ede", 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 0000000000000..8f6d684ff2af0 --- /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\":\"AlreadyExists\",\"message\":\"dt\"}"; + + 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("lpgidn", "cehaqi", "oyzlt", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("iomqoqpepiaea"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, response.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("dt", 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 0000000000000..b40fbe43d1521 --- /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\":\"hcxgkmoyx\",\"userAssignedIdentity\":\"yuibhm\",\"federatedClientId\":\"nbzydvfvfcj\"}") + .toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("yuibhm", model.userAssignedIdentity()); + Assertions.assertEquals("nbzydvfvfcj", model.federatedClientId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticEncryptionIdentity model + = new ElasticEncryptionIdentity().withUserAssignedIdentity("yuibhm").withFederatedClientId("nbzydvfvfcj"); + model = BinaryData.fromObject(model).toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("yuibhm", model.userAssignedIdentity()); + Assertions.assertEquals("nbzydvfvfcj", 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 0000000000000..56c5fb5078713 --- /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\":1845604298,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"y\"],\"rootAccess\":\"Disabled\"}") + .toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(1845604298, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.nfsv4()); + Assertions.assertEquals("y", 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(1845604298) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("y")) + .withRootAccess(ElasticRootAccess.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(1845604298, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.nfsv4()); + Assertions.assertEquals("y", 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 0000000000000..f904ca63dc491 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java @@ -0,0 +1,54 @@ +// Copyright (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\":894122283,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"rfe\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":301630864,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ymo\",\"qhlwigdivbkbxgo\"],\"rootAccess\":\"Enabled\"}]}") + .toObject(ElasticExportPolicy.class); + Assertions.assertEquals(894122283, 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("rfe", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, 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(894122283) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("rfe")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(301630864) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("ymo", "qhlwigdivbkbxgo")) + .withRootAccess(ElasticRootAccess.ENABLED))); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicy.class); + Assertions.assertEquals(894122283, 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("rfe", model.rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, 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 0000000000000..5802cf40ef39a --- /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\":\"akjsqz\",\"smbServerFqdn\":\"bezkgimsidxasic\"}") + .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 0000000000000..830a6943d91f5 --- /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 0000000000000..621cd6ca00006 --- /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\":\"Enabled\"}").toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbProperties model = new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, 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 0000000000000..6b5e0e8c7cd56 --- /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\":\"Deleting\"},\"id\":\"nmdxotngfd\",\"name\":\"ugeyzihgrkyuiza\",\"type\":\"snmfpphojeevy\"}") + .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 0000000000000..fc2f084a4fdd9 --- /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\":\"Patching\"},\"id\":\"zbgomfgbeg\",\"name\":\"qgleohibetnluank\",\"type\":\"rfxeeebtij\"},{\"properties\":{\"provisioningState\":\"Accepted\"},\"id\":\"mq\",\"name\":\"bqqxlaj\",\"type\":\"nw\"}],\"nextLink\":\"cevehjkuyxoafg\"}") + .toObject(ElasticSnapshotListResult.class); + Assertions.assertEquals("cevehjkuyxoafg", 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 0000000000000..143e316bc97ee --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.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.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\":1637284087,\"minute\":1755033454},\"dailySchedule\":{\"snapshotsToKeep\":1728544880,\"hour\":456670113,\"minute\":906387970},\"weeklySchedule\":{\"snapshotsToKeep\":1058884441,\"days\":[\"Tuesday\",\"Sunday\"],\"hour\":107211563,\"minute\":564917335},\"monthlySchedule\":{\"snapshotsToKeep\":1170273292,\"daysOfMonth\":[1725030101,85960810],\"hour\":432645103,\"minute\":156382694},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"fb\",\"location\":\"xi\",\"tags\":{\"avfrb\":\"nfy\",\"dj\":\"picdbk\"},\"id\":\"aq\",\"name\":\"smqaz\",\"type\":\"dgonjhxshthmgp\"}"; + + 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("iflikyypzkgxfx") + .withRegion("yybzoxlvoc") + .withExistingElasticAccount("tlqh", "pxouvmr") + .withTags(mapOf("hjhjvm", "dxxheigmlilwz")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1036747903).withMinute(389849757)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(893439382) + .withHour(668857745) + .withMinute(988037414)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(54083560) + .withDays(Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.FRIDAY)) + .withHour(624604693) + .withMinute(1261925947)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1612148349) + .withDaysOfMonth(Arrays.asList(832944822, 778791021, 64806781, 552788517)) + .withHour(1517650446) + .withMinute(155798824)) + .withPolicyStatus(PolicyStatus.DISABLED)) + .create(); + + Assertions.assertEquals("xi", response.location()); + Assertions.assertEquals("nfy", response.tags().get("avfrb")); + Assertions.assertEquals(1637284087, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1755033454, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(1728544880, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(456670113, response.properties().dailySchedule().hour()); + Assertions.assertEquals(906387970, response.properties().dailySchedule().minute()); + Assertions.assertEquals(1058884441, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(107211563, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(564917335, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1170273292, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1725030101, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(432645103, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(156382694, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, 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 0000000000000..aeba8ad23ee2f --- /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\":1859453538,\"minute\":106852871},\"dailySchedule\":{\"snapshotsToKeep\":1085439755,\"hour\":365033034,\"minute\":2069927926},\"weeklySchedule\":{\"snapshotsToKeep\":468581104,\"days\":[\"Monday\",\"Wednesday\",\"Thursday\",\"Thursday\"],\"hour\":798291972,\"minute\":284543486},\"monthlySchedule\":{\"snapshotsToKeep\":1768452430,\"daysOfMonth\":[2001977859,2070276635,268774115],\"hour\":827598134,\"minute\":1066458996},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Creating\"},\"eTag\":\"ud\",\"location\":\"ckaprhknqiijge\",\"tags\":{\"oqueqihkkyowltj\":\"g\"},\"id\":\"uwhldxwhieproqks\",\"name\":\"fxmcvprstvk\",\"type\":\"tbfjtdyotnplf\"}"; + + 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("voogxkfna", "aqymhcctopuowyr", "skbyhquhczygx", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("ckaprhknqiijge", response.location()); + Assertions.assertEquals("g", response.tags().get("oqueqihkkyowltj")); + Assertions.assertEquals(1859453538, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(106852871, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(1085439755, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(365033034, response.properties().dailySchedule().hour()); + Assertions.assertEquals(2069927926, response.properties().dailySchedule().minute()); + Assertions.assertEquals(468581104, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.MONDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(798291972, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(284543486, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1768452430, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2001977859, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(827598134, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(1066458996, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, 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 0000000000000..8fcfdc9d53afa --- /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\":822604862,\"minute\":2138196355},\"dailySchedule\":{\"snapshotsToKeep\":1073421759,\"hour\":528824343,\"minute\":536559795},\"weeklySchedule\":{\"snapshotsToKeep\":1651304762,\"days\":[\"Saturday\",\"Thursday\",\"Friday\"],\"hour\":964220710,\"minute\":1384162220},\"monthlySchedule\":{\"snapshotsToKeep\":1745411663,\"daysOfMonth\":[1475482098,1067818020,1872404562],\"hour\":1411064974,\"minute\":1748976906},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Accepted\"},\"eTag\":\"ncclabvoyngsuxxc\",\"location\":\"myqjog\",\"tags\":{\"djanormo\":\"a\",\"ujmoi\":\"dxxurn\"},\"id\":\"unwemhd\",\"name\":\"e\",\"type\":\"jslkyozdsfzjue\"}]}"; + + 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("cqoccq", "qxwetjtd", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("myqjog", response.iterator().next().location()); + Assertions.assertEquals("a", response.iterator().next().tags().get("djanormo")); + Assertions.assertEquals(822604862, response.iterator().next().properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2138196355, response.iterator().next().properties().hourlySchedule().minute()); + Assertions.assertEquals(1073421759, response.iterator().next().properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(528824343, response.iterator().next().properties().dailySchedule().hour()); + Assertions.assertEquals(536559795, response.iterator().next().properties().dailySchedule().minute()); + Assertions.assertEquals(1651304762, response.iterator().next().properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SATURDAY, + response.iterator().next().properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(964220710, response.iterator().next().properties().weeklySchedule().hour()); + Assertions.assertEquals(1384162220, response.iterator().next().properties().weeklySchedule().minute()); + Assertions.assertEquals(1745411663, + response.iterator().next().properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1475482098, + response.iterator().next().properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1411064974, response.iterator().next().properties().monthlySchedule().hour()); + Assertions.assertEquals(1748976906, 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 0000000000000..21a87a25a45a7 --- /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\":\"vgjbfio\",\"size\":1914850553315162863,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":653396887,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"smoxsazuxejgwe\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":2008261270,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"inqbdnddbbozs\",\"vrmkjmyitrchwu\",\"lxeeiht\",\"mnoejhqlfmsib\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":960948102,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"pgfqvmtyw\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"w\",\"mountTargets\":[{\"ipAddress\":\"fxampqcrzgeuqx\",\"smbServerFqdn\":\"iatwfaujegqdtadr\"},{\"ipAddress\":\"gddhjkrukizyhgs\",\"smbServerFqdn\":\"nqskt\"},{\"ipAddress\":\"fpjbqggwe\",\"smbServerFqdn\":\"w\"},{\"ipAddress\":\"dmncgbf\",\"smbServerFqdn\":\"scstunmlhxd\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ciichgj\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"mvxodgwxfkzsif\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"dujgcwxve\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"dxrizagb\",\"restorationState\":\"Failed\"},\"eTag\":\"rksykp\",\"zones\":[\"xwabzrwiqrxhacl\",\"dosqkptjqg\",\"ifmmainwh\",\"d\"],\"location\":\"pbqwuntobu\",\"tags\":{\"lw\":\"zz\"},\"id\":\"vydjufbnk\",\"name\":\"blaxpegj\",\"type\":\"dabalfdxaglzfytl\"}]}"; + + 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("rhrhtsl", "jtv", "j", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("pbqwuntobu", response.iterator().next().location()); + Assertions.assertEquals("zz", response.iterator().next().tags().get("lw")); + Assertions.assertEquals("vgjbfio", response.iterator().next().properties().filePath()); + Assertions.assertEquals(1914850553315162863L, response.iterator().next().properties().size()); + Assertions.assertEquals(653396887, + 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.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("smoxsazuxejgwe", + 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.SMB, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("w", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("ciichgj", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("mvxodgwxfkzsif", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("dujgcwxve", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("dxrizagb", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("xwabzrwiqrxhacl", 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 0000000000000..e9a911a241e1d --- /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\":2048724944,\"hour\":1770973346,\"minute\":421757360}") + .toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(2048724944, model.snapshotsToKeep()); + Assertions.assertEquals(1770973346, model.hour()); + Assertions.assertEquals(421757360, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyDailySchedule model + = new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(2048724944) + .withHour(1770973346) + .withMinute(421757360); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(2048724944, model.snapshotsToKeep()); + Assertions.assertEquals(1770973346, model.hour()); + Assertions.assertEquals(421757360, 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 0000000000000..ae0132a77b3eb --- /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\":1410759489,\"minute\":952311189}") + .toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1410759489, model.snapshotsToKeep()); + Assertions.assertEquals(952311189, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyHourlySchedule model + = new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1410759489).withMinute(952311189); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1410759489, model.snapshotsToKeep()); + Assertions.assertEquals(952311189, 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 0000000000000..89535a879622a --- /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\":1476651510,\"minute\":1667694351},\"dailySchedule\":{\"snapshotsToKeep\":1809533021,\"hour\":277162772,\"minute\":2085651049},\"weeklySchedule\":{\"snapshotsToKeep\":139520127,\"days\":[\"Tuesday\"],\"hour\":1446560637,\"minute\":2125141991},\"monthlySchedule\":{\"snapshotsToKeep\":1251385570,\"daysOfMonth\":[1656883941,671142861,677707515],\"hour\":98815164,\"minute\":370083816},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Creating\"},\"eTag\":\"znuciqdsm\",\"location\":\"iitdfuxt\",\"tags\":{\"bnn\":\"iibmi\",\"hnmgixhcm\":\"stgnl\",\"rhc\":\"vmqfoud\",\"ndm\":\"yyprotwyp\"},\"id\":\"xhugcm\",\"name\":\"k\",\"type\":\"vlgo\"}") + .toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("iitdfuxt", model.location()); + Assertions.assertEquals("iibmi", model.tags().get("bnn")); + Assertions.assertEquals(1476651510, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1667694351, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1809533021, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(277162772, model.properties().dailySchedule().hour()); + Assertions.assertEquals(2085651049, model.properties().dailySchedule().minute()); + Assertions.assertEquals(139520127, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1446560637, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(2125141991, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1251385570, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1656883941, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(98815164, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(370083816, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyInner model = new ElasticSnapshotPolicyInner().withLocation("iitdfuxt") + .withTags(mapOf("bnn", "iibmi", "hnmgixhcm", "stgnl", "rhc", "vmqfoud", "ndm", "yyprotwyp")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1476651510).withMinute(1667694351)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1809533021) + .withHour(277162772) + .withMinute(2085651049)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(139520127) + .withDays(Arrays.asList(DayOfWeek.TUESDAY)) + .withHour(1446560637) + .withMinute(2125141991)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1251385570) + .withDaysOfMonth(Arrays.asList(1656883941, 671142861, 677707515)) + .withHour(98815164) + .withMinute(370083816)) + .withPolicyStatus(PolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("iitdfuxt", model.location()); + Assertions.assertEquals("iibmi", model.tags().get("bnn")); + Assertions.assertEquals(1476651510, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1667694351, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1809533021, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(277162772, model.properties().dailySchedule().hour()); + Assertions.assertEquals(2085651049, model.properties().dailySchedule().minute()); + Assertions.assertEquals(139520127, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1446560637, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(2125141991, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1251385570, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1656883941, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(98815164, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(370083816, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, 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 0000000000000..39818d930d2ef --- /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\":1032805283,\"minute\":651205055},\"dailySchedule\":{\"snapshotsToKeep\":1814010794,\"hour\":647288572,\"minute\":1928163279},\"weeklySchedule\":{\"snapshotsToKeep\":1599245989,\"days\":[\"Wednesday\"],\"hour\":1937171303,\"minute\":762506077},\"monthlySchedule\":{\"snapshotsToKeep\":1244000330,\"daysOfMonth\":[2086359092,1766565045],\"hour\":935856484,\"minute\":1659449391},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"atutmzlbiojlvfhr\",\"location\":\"pn\",\"tags\":{\"ochpprpr\":\"cwwyyur\",\"bzpcpiljhahzvec\":\"nmokayzejnhlbk\",\"lewjwiuubwef\":\"ndbnwieh\",\"ex\":\"sfapaqtferrq\"},\"id\":\"kmfx\",\"name\":\"pjwogqqno\",\"type\":\"pud\"}],\"nextLink\":\"abtqwpwyawbzasqb\"}") + .toObject(ElasticSnapshotPolicyListResult.class); + Assertions.assertEquals("pn", model.value().get(0).location()); + Assertions.assertEquals("cwwyyur", model.value().get(0).tags().get("ochpprpr")); + Assertions.assertEquals(1032805283, model.value().get(0).properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(651205055, model.value().get(0).properties().hourlySchedule().minute()); + Assertions.assertEquals(1814010794, model.value().get(0).properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(647288572, model.value().get(0).properties().dailySchedule().hour()); + Assertions.assertEquals(1928163279, model.value().get(0).properties().dailySchedule().minute()); + Assertions.assertEquals(1599245989, model.value().get(0).properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.value().get(0).properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1937171303, model.value().get(0).properties().weeklySchedule().hour()); + Assertions.assertEquals(762506077, model.value().get(0).properties().weeklySchedule().minute()); + Assertions.assertEquals(1244000330, model.value().get(0).properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2086359092, model.value().get(0).properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(935856484, model.value().get(0).properties().monthlySchedule().hour()); + Assertions.assertEquals(1659449391, model.value().get(0).properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.value().get(0).properties().policyStatus()); + Assertions.assertEquals("abtqwpwyawbzasqb", 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 0000000000000..d6549770c627e --- /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\":524198668,\"daysOfMonth\":[1276799323,1889253771,1463060952,1916069806],\"hour\":1060245922,\"minute\":1273234897}") + .toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(524198668, model.snapshotsToKeep()); + Assertions.assertEquals(1276799323, model.daysOfMonth().get(0)); + Assertions.assertEquals(1060245922, model.hour()); + Assertions.assertEquals(1273234897, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyMonthlySchedule model + = new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(524198668) + .withDaysOfMonth(Arrays.asList(1276799323, 1889253771, 1463060952, 1916069806)) + .withHour(1060245922) + .withMinute(1273234897); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(524198668, model.snapshotsToKeep()); + Assertions.assertEquals(1276799323, model.daysOfMonth().get(0)); + Assertions.assertEquals(1060245922, model.hour()); + Assertions.assertEquals(1273234897, 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 0000000000000..9f068c83e95a6 --- /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\":1220118900,\"minute\":1135735210},\"dailySchedule\":{\"snapshotsToKeep\":1682577006,\"hour\":1730011842,\"minute\":1527890487},\"weeklySchedule\":{\"snapshotsToKeep\":2008888087,\"days\":[\"Tuesday\",\"Sunday\"],\"hour\":195751887,\"minute\":351038276},\"monthlySchedule\":{\"snapshotsToKeep\":634005206,\"daysOfMonth\":[340160098,733177618,580165383],\"hour\":369514238,\"minute\":917455457},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Failed\"}") + .toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(1220118900, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1135735210, model.hourlySchedule().minute()); + Assertions.assertEquals(1682577006, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1730011842, model.dailySchedule().hour()); + Assertions.assertEquals(1527890487, model.dailySchedule().minute()); + Assertions.assertEquals(2008888087, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(195751887, model.weeklySchedule().hour()); + Assertions.assertEquals(351038276, model.weeklySchedule().minute()); + Assertions.assertEquals(634005206, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(340160098, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(369514238, model.monthlySchedule().hour()); + Assertions.assertEquals(917455457, 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(1220118900).withMinute(1135735210)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1682577006) + .withHour(1730011842) + .withMinute(1527890487)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(2008888087) + .withDays(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.SUNDAY)) + .withHour(195751887) + .withMinute(351038276)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(634005206) + .withDaysOfMonth(Arrays.asList(340160098, 733177618, 580165383)) + .withHour(369514238) + .withMinute(917455457)) + .withPolicyStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(1220118900, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1135735210, model.hourlySchedule().minute()); + Assertions.assertEquals(1682577006, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1730011842, model.dailySchedule().hour()); + Assertions.assertEquals(1527890487, model.dailySchedule().minute()); + Assertions.assertEquals(2008888087, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(195751887, model.weeklySchedule().hour()); + Assertions.assertEquals(351038276, model.weeklySchedule().minute()); + Assertions.assertEquals(634005206, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(340160098, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(369514238, model.monthlySchedule().hour()); + Assertions.assertEquals(917455457, 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 0000000000000..5661fb85a9103 --- /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\":600854114,\"minute\":35742278},\"dailySchedule\":{\"snapshotsToKeep\":1858033886,\"hour\":1438809016,\"minute\":1698129025},\"weeklySchedule\":{\"snapshotsToKeep\":1236103657,\"days\":[\"Thursday\",\"Monday\",\"Saturday\"],\"hour\":1829804009,\"minute\":1049990644},\"monthlySchedule\":{\"snapshotsToKeep\":22024155,\"daysOfMonth\":[2056787,1316938253,1402000127,796775151],\"hour\":405825776,\"minute\":1257657050},\"policyStatus\":\"Enabled\"}") + .toObject(ElasticSnapshotPolicyUpdateProperties.class); + Assertions.assertEquals(600854114, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(35742278, model.hourlySchedule().minute()); + Assertions.assertEquals(1858033886, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1438809016, model.dailySchedule().hour()); + Assertions.assertEquals(1698129025, model.dailySchedule().minute()); + Assertions.assertEquals(1236103657, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(1829804009, model.weeklySchedule().hour()); + Assertions.assertEquals(1049990644, model.weeklySchedule().minute()); + Assertions.assertEquals(22024155, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2056787, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(405825776, model.monthlySchedule().hour()); + Assertions.assertEquals(1257657050, model.monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.ENABLED, model.policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyUpdateProperties model = new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(600854114).withMinute(35742278)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1858033886) + .withHour(1438809016) + .withMinute(1698129025)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1236103657) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.MONDAY, DayOfWeek.SATURDAY)) + .withHour(1829804009) + .withMinute(1049990644)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(22024155) + .withDaysOfMonth(Arrays.asList(2056787, 1316938253, 1402000127, 796775151)) + .withHour(405825776) + .withMinute(1257657050)) + .withPolicyStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdateProperties.class); + Assertions.assertEquals(600854114, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(35742278, model.hourlySchedule().minute()); + Assertions.assertEquals(1858033886, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1438809016, model.dailySchedule().hour()); + Assertions.assertEquals(1698129025, model.dailySchedule().minute()); + Assertions.assertEquals(1236103657, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(1829804009, model.weeklySchedule().hour()); + Assertions.assertEquals(1049990644, model.weeklySchedule().minute()); + Assertions.assertEquals(22024155, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2056787, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(405825776, model.monthlySchedule().hour()); + Assertions.assertEquals(1257657050, 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/ElasticSnapshotPolicyUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyUpdateTests.java new file mode 100644 index 0000000000000..c17ba6948586b --- /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\":{\"dxbzlmcmuap\":\"sufco\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":311384823,\"minute\":60129740},\"dailySchedule\":{\"snapshotsToKeep\":1622856853,\"hour\":336059926,\"minute\":407134129},\"weeklySchedule\":{\"snapshotsToKeep\":968603613,\"days\":[\"Thursday\",\"Thursday\",\"Sunday\",\"Monday\"],\"hour\":1582753325,\"minute\":184634517},\"monthlySchedule\":{\"snapshotsToKeep\":579813186,\"daysOfMonth\":[645560470,815140204],\"hour\":652361140,\"minute\":1546438423},\"policyStatus\":\"Disabled\"}}") + .toObject(ElasticSnapshotPolicyUpdate.class); + Assertions.assertEquals("sufco", model.tags().get("dxbzlmcmuap")); + Assertions.assertEquals(311384823, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(60129740, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1622856853, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(336059926, model.properties().dailySchedule().hour()); + Assertions.assertEquals(407134129, model.properties().dailySchedule().minute()); + Assertions.assertEquals(968603613, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1582753325, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(184634517, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(579813186, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(645560470, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(652361140, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1546438423, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.properties().policyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyUpdate model = new ElasticSnapshotPolicyUpdate().withTags(mapOf("dxbzlmcmuap", "sufco")) + .withProperties(new ElasticSnapshotPolicyUpdateProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(311384823).withMinute(60129740)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1622856853) + .withHour(336059926) + .withMinute(407134129)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(968603613) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.THURSDAY, DayOfWeek.SUNDAY, DayOfWeek.MONDAY)) + .withHour(1582753325) + .withMinute(184634517)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(579813186) + .withDaysOfMonth(Arrays.asList(645560470, 815140204)) + .withHour(652361140) + .withMinute(1546438423)) + .withPolicyStatus(PolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyUpdate.class); + Assertions.assertEquals("sufco", model.tags().get("dxbzlmcmuap")); + Assertions.assertEquals(311384823, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(60129740, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(1622856853, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(336059926, model.properties().dailySchedule().hour()); + Assertions.assertEquals(407134129, model.properties().dailySchedule().minute()); + Assertions.assertEquals(968603613, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1582753325, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(184634517, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(579813186, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(645560470, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(652361140, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1546438423, model.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, 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 0000000000000..ea22893fda3df --- /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\":\"jg\",\"size\":8249732502251994852,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Creating\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"sdaultxij\",\"mountTargets\":[{\"ipAddress\":\"qwazlnqnmcjngzq\",\"smbServerFqdn\":\"xtbjwgnyfusfzsv\"},{\"ipAddress\":\"ikzhajqglcfhmlrq\",\"smbServerFqdn\":\"xynqnz\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ovw\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ptgoeiybbabp\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"slkvntjl\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"yrio\",\"restorationState\":\"Failed\"},\"eTag\":\"dsxwaab\",\"zones\":[\"frygznmmax\",\"izkzobgo\"],\"location\":\"lhslnelxieixyn\",\"tags\":{\"tifdwfmvi\":\"ecwcrojphslhcawj\",\"bttzhraglkafhonq\":\"orq\"},\"id\":\"ujeickp\",\"name\":\"vcpopmxe\",\"type\":\"nwcl\"}],\"nextLink\":\"jedexxmlf\"}") + .toObject(ElasticSnapshotPolicyVolumeList.class); + Assertions.assertEquals("lhslnelxieixyn", model.value().get(0).location()); + Assertions.assertEquals("ecwcrojphslhcawj", model.value().get(0).tags().get("tifdwfmvi")); + Assertions.assertEquals("jg", model.value().get(0).properties().filePath()); + Assertions.assertEquals(8249732502251994852L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("sdaultxij", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("ovw", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ptgoeiybbabp", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("slkvntjl", + 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("yrio", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("frygznmmax", model.value().get(0).zones().get(0)); + Assertions.assertEquals("jedexxmlf", 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 0000000000000..6e47ea3592e75 --- /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\":649222469,\"days\":[\"Friday\",\"Sunday\"],\"hour\":1164052621,\"minute\":1291609137}") + .toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(649222469, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, model.days().get(0)); + Assertions.assertEquals(1164052621, model.hour()); + Assertions.assertEquals(1291609137, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyWeeklySchedule model + = new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(649222469) + .withDays(Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.SUNDAY)) + .withHour(1164052621) + .withMinute(1291609137); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(649222469, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, model.days().get(0)); + Assertions.assertEquals(1164052621, model.hour()); + Assertions.assertEquals(1291609137, 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 0000000000000..dd615071c686d --- /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\":\"Accepted\"}").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 0000000000000..a940945528ccb --- /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\":\"maanea\",\"name\":\"htmhobcyanrf\",\"type\":\"qtvkh\"}"; + + 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("tvsnvl") + .withExistingElasticVolume("dlgyqixokwtjawh", "ag", "qfqqdlcvmyolc", "ymjc") + .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 0000000000000..87c1153cdf6e5 --- /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\":\"Creating\"},\"id\":\"rqolnthbb\",\"name\":\"kgzukwdrnzkjth\",\"type\":\"ceyjnc\"}"; + + 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("jusuzgfjzc", "aaxoialahfxwcc", "kdxkuk", "kczynuhhoqeqsh", "vl", + 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 0000000000000..e80d2ece58b00 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.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.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\":\"Deleting\"},\"id\":\"xu\",\"name\":\"dqmdtffis\",\"type\":\"mrkkhmwd\"}]}"; + + 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("mlfuyfjbp", "iddhlrufzc", "yjmqrf", "iocuselqkr", 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 0000000000000..4df04d0bed1dd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.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.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\":\"uaulxunsm\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"ppxynenls\"}") + .toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("uaulxunsm", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("ppxynenls", model.elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeBackupProperties model + = new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("uaulxunsm") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("ppxynenls"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("uaulxunsm", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("ppxynenls", 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 0000000000000..c8786fcec49b6 --- /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\":\"hryvy\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"dclxgc\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"nwm\"}}") + .toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("hryvy", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("dclxgc", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("nwm", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionPatchProperties model = new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("hryvy")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("dclxgc") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("nwm")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("hryvy", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("dclxgc", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("nwm", 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 0000000000000..351849aeced6f --- /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\":\"vvjskgfmocwahp\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"tjeaahhvjhh\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"ybbjjidjksyx\"}}") + .toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("vvjskgfmocwahp", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("tjeaahhvjhh", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("ybbjjidjksyx", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionProperties model = new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("vvjskgfmocwahp")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("tjeaahhvjhh") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("ybbjjidjksyx")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("vvjskgfmocwahp", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("tjeaahhvjhh", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("ybbjjidjksyx", 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 0000000000000..9de26866aabc6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java @@ -0,0 +1,144 @@ +// Copyright (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\":\"bgq\",\"size\":3553884159705155371,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1749229509,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"qxihhrmooi\",\"qseypxiutcxa\",\"zhyrpeto\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1200534055,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"abrqnkkzj\",\"jb\",\"rgaehvvibrxjj\",\"toqbeitpkxztmoob\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1257381047,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"imaq\",\"zhe\",\"jyhohujswtwkoz\",\"wculkbaw\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":984461759,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"j\",\"uktalhsnvkcdmxz\",\"poaimlnwiaaomyl\",\"eazulcs\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\",\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"zswpchwa\",\"mountTargets\":[{\"ipAddress\":\"usnfepgfewet\",\"smbServerFqdn\":\"yxgncxykxhdjhli\"},{\"ipAddress\":\"bcxf\",\"smbServerFqdn\":\"cporxvxcjz\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xfpxtgqscja\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"juhdqazkmtgguwpi\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"civmmg\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"xgkn\",\"restorationState\":\"Failed\"},\"eTag\":\"inzqodfvpgs\",\"zones\":[\"gsgbpfgzdjt\"],\"location\":\"zflbqvg\",\"tags\":{\"nwsdtutnwlduyc\":\"lgafcqusrdve\"},\"id\":\"uzhyrmewipmvekdx\",\"name\":\"kuqgsjjxundxgket\",\"type\":\"zhhzjhfjmhvvmu\"}") + .toObject(ElasticVolumeInner.class); + Assertions.assertEquals("zflbqvg", model.location()); + Assertions.assertEquals("lgafcqusrdve", model.tags().get("nwsdtutnwlduyc")); + Assertions.assertEquals("bgq", model.properties().filePath()); + Assertions.assertEquals(3553884159705155371L, model.properties().size()); + Assertions.assertEquals(1749229509, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + 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("qxihhrmooi", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("zswpchwa", model.properties().snapshotResourceId()); + Assertions.assertEquals("xfpxtgqscja", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("juhdqazkmtgguwpi", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("civmmg", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("xgkn", model.properties().backupResourceId()); + Assertions.assertEquals("gsgbpfgzdjt", model.zones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeInner model = new ElasticVolumeInner().withLocation("zflbqvg") + .withTags(mapOf("nwsdtutnwlduyc", "lgafcqusrdve")) + .withProperties(new ElasticVolumeProperties().withFilePath("bgq") + .withSize(3553884159705155371L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1749229509) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("qxihhrmooi", "qseypxiutcxa", "zhyrpeto")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1200534055) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("abrqnkkzj", "jb", "rgaehvvibrxjj", "toqbeitpkxztmoob")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1257381047) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("imaq", "zhe", "jyhohujswtwkoz", "wculkbaw")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(984461759) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("j", "uktalhsnvkcdmxz", "poaimlnwiaaomyl", "eazulcs")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.SMB, ElasticProtocolType.SMB)) + .withSnapshotResourceId("zswpchwa") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("xfpxtgqscja")) + .withBackup( + new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("juhdqazkmtgguwpi") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("civmmg"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("xgkn")) + .withZones(Arrays.asList("gsgbpfgzdjt")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeInner.class); + Assertions.assertEquals("zflbqvg", model.location()); + Assertions.assertEquals("lgafcqusrdve", model.tags().get("nwsdtutnwlduyc")); + Assertions.assertEquals("bgq", model.properties().filePath()); + Assertions.assertEquals(3553884159705155371L, model.properties().size()); + Assertions.assertEquals(1749229509, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + 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("qxihhrmooi", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("zswpchwa", model.properties().snapshotResourceId()); + Assertions.assertEquals("xfpxtgqscja", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("juhdqazkmtgguwpi", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("civmmg", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("xgkn", model.properties().backupResourceId()); + Assertions.assertEquals("gsgbpfgzdjt", 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 0000000000000..b82bc765d49a6 --- /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\":\"dvjdhttza\",\"size\":4959841942570870498,\"exportPolicy\":{\"rules\":[{},{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"NFSv4\",\"NFSv3\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"jdqnsdfzpbgt\",\"mountTargets\":[{\"ipAddress\":\"kdghrjeuutlwx\",\"smbServerFqdn\":\"w\"},{\"ipAddress\":\"okvbwnhhtqlgehg\",\"smbServerFqdn\":\"ipifhpfeoajvg\"},{\"ipAddress\":\"txjcsheafidlt\",\"smbServerFqdn\":\"sr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"ssjhoiftxfkf\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"prhptillu\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"tgdqohmcwsldriz\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lllibph\",\"restorationState\":\"Restored\"},\"eTag\":\"izakak\",\"zones\":[\"jpdn\",\"zhajoylhjlmuo\",\"xprimrsop\"],\"location\":\"ecj\",\"tags\":{\"wxdzaumweoohgu\":\"slstvasy\",\"emwmdxmebwjs\":\"fuzboyjathwtzolb\"},\"id\":\"jpahlxvea\",\"name\":\"f\",\"type\":\"xnmwmqtibxyijddt\"},{\"properties\":{\"filePath\":\"cttadi\",\"size\":4810009338488600409,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv3\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"dzaapmudqme\",\"mountTargets\":[{\"ipAddress\":\"pibudqwyxebeybpm\",\"smbServerFqdn\":\"nrtffyaqi\"},{\"ipAddress\":\"hheioqaqhvseuf\",\"smbServerFqdn\":\"yrxpdlcgqls\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"qfrddgam\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"iosrsjuivfcdis\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"xzhczexrxz\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"qvwre\",\"restorationState\":\"Failed\"},\"eTag\":\"nlnzonzlrpi\",\"zones\":[\"ncvjts\",\"cof\",\"zehtdhgb\",\"k\"],\"location\":\"eljeamurvzmlovua\",\"tags\":{\"erbdk\":\"hcxlpm\",\"bccxjmonfdgn\":\"lvidizozs\",\"ypuuwwltvuqjctze\":\"n\",\"lyhb\":\"keifzzhmkdasv\"},\"id\":\"cu\",\"name\":\"chxgs\",\"type\":\"boldforobwj\"},{\"properties\":{\"filePath\":\"izbfhfovvacq\",\"size\":5798870877718562622,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Canceled\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"elawumu\",\"mountTargets\":[{\"ipAddress\":\"kwrrwo\",\"smbServerFqdn\":\"qucwyhahnom\"},{\"ipAddress\":\"kywuhpsvfuu\",\"smbServerFqdn\":\"tlwexxwlalniexz\"},{\"ipAddress\":\"zpgepqty\",\"smbServerFqdn\":\"wwpgdakchzyvlixq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xkjibnxmy\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"swqrntvlwijp\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"xoqqpwcyyufmhrun\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"kcdqzhlct\",\"restorationState\":\"Failed\"},\"eTag\":\"qn\",\"zones\":[\"pchrqbn\"],\"location\":\"rcgegydcwboxjum\",\"tags\":{\"ouau\":\"olihrra\"},\"id\":\"rjtloq\",\"name\":\"fuojrngif\",\"type\":\"rzpasccbiuimzdly\"}],\"nextLink\":\"fqwmkyoquf\"}") + .toObject(ElasticVolumeListResult.class); + Assertions.assertEquals("ecj", model.value().get(0).location()); + Assertions.assertEquals("slstvasy", model.value().get(0).tags().get("wxdzaumweoohgu")); + Assertions.assertEquals("dvjdhttza", model.value().get(0).properties().filePath()); + Assertions.assertEquals(4959841942570870498L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.NFSV3, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("jdqnsdfzpbgt", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("ssjhoiftxfkf", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("prhptillu", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("tgdqohmcwsldriz", + 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("lllibph", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("jpdn", model.value().get(0).zones().get(0)); + Assertions.assertEquals("fqwmkyoquf", 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 0000000000000..3e86b2aa067f2 --- /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\":\"gpmuneqsxvmhfbuz\",\"size\":8210218488980385816,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":554244740,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"uemsly\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\",\"NFSv4\",\"SMB\",\"NFSv3\"],\"provisioningState\":\"Creating\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"tyms\",\"mountTargets\":[{\"ipAddress\":\"qdnfwqzdz\",\"smbServerFqdn\":\"ilaxhn\"},{\"ipAddress\":\"qlyvijo\",\"smbServerFqdn\":\"iv\"},{\"ipAddress\":\"oyzunbixxr\",\"smbServerFqdn\":\"kvcpwpgclr\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"soxfrken\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"yyefrpmpdnqqs\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"oqvm\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"tqlkz\",\"restorationState\":\"Restoring\"}") + .toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("gpmuneqsxvmhfbuz", model.filePath()); + Assertions.assertEquals(8210218488980385816L, model.size()); + Assertions.assertEquals(554244740, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, 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("uemsly", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.protocolTypes().get(0)); + Assertions.assertEquals("tyms", model.snapshotResourceId()); + Assertions.assertEquals("soxfrken", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yyefrpmpdnqqs", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("oqvm", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("tqlkz", model.backupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeProperties model = new ElasticVolumeProperties().withFilePath("gpmuneqsxvmhfbuz") + .withSize(8210218488980385816L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(554244740) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("uemsly")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.SMB, ElasticProtocolType.NFSV4, + ElasticProtocolType.SMB, ElasticProtocolType.NFSV3)) + .withSnapshotResourceId("tyms") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("soxfrken")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("yyefrpmpdnqqs") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("oqvm"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("tqlkz"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("gpmuneqsxvmhfbuz", model.filePath()); + Assertions.assertEquals(8210218488980385816L, model.size()); + Assertions.assertEquals(554244740, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, 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("uemsly", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.protocolTypes().get(0)); + Assertions.assertEquals("tyms", model.snapshotResourceId()); + Assertions.assertEquals("soxfrken", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yyefrpmpdnqqs", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("oqvm", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("tqlkz", 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 0000000000000..82eada52c9890 --- /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\":\"ruzslzoj\"}").toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ruzslzoj", model.snapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeRevert model = new ElasticVolumeRevert().withSnapshotResourceId("ruzslzoj"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ruzslzoj", 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 0000000000000..2018699958eee --- /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\":\"xvxevblbjednljla\"}") + .toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("xvxevblbjednljla", model.snapshotPolicyResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeSnapshotProperties model + = new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("xvxevblbjednljla"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("xvxevblbjednljla", 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 0000000000000..31e992ed0ded4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java @@ -0,0 +1,80 @@ +// Copyright (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\":4402705015861648592,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":706473167,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hxkizvytnrzv\"],\"rootAccess\":\"Disabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"eranokqgukkjqnv\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ylaxxulcdi\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"fj\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"}}") + .toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(4402705015861648592L, model.size()); + Assertions.assertEquals(706473167, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, 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("hxkizvytnrzv", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("eranokqgukkjqnv", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ylaxxulcdi", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("fj", 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(4402705015861648592L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(706473167) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hxkizvytnrzv")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("eranokqgukkjqnv")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("ylaxxulcdi") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("fj"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(4402705015861648592L, model.size()); + Assertions.assertEquals(706473167, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, 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("hxkizvytnrzv", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("eranokqgukkjqnv", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ylaxxulcdi", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("fj", 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 0000000000000..98792a558ca79 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java @@ -0,0 +1,123 @@ +// Copyright (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\":{\"klnsrmffey\":\"zg\",\"qiekkkzddrt\":\"xcktpiymerteeamm\",\"ojbmxv\":\"g\"},\"properties\":{\"size\":8464578871437548472,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":2124341165,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"xs\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":107298058,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"jibabxvititvtze\",\"xavo\",\"tfgle\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":590870598,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"sfj\",\"cbslhhx\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"d\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"sirudhzmmesckdlp\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"cxfailcfxwmdboxd\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"}}}") + .toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("zg", model.tags().get("klnsrmffey")); + Assertions.assertEquals(8464578871437548472L, model.properties().size()); + Assertions.assertEquals(2124341165, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xs", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("d", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("sirudhzmmesckdlp", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("cxfailcfxwmdboxd", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, 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("klnsrmffey", "zg", "qiekkkzddrt", "xcktpiymerteeamm", "ojbmxv", "g")) + .withProperties( + new ElasticVolumeUpdateProperties().withSize(8464578871437548472L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(2124341165) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("xs")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(107298058) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("jibabxvititvtze", "xavo", "tfgle")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(590870598) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("sfj", "cbslhhx")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("d")) + .withBackup(new ElasticVolumeBackupProperties() + .withElasticBackupPolicyResourceId("sirudhzmmesckdlp") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("cxfailcfxwmdboxd"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties( + new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED))); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("zg", model.tags().get("klnsrmffey")); + Assertions.assertEquals(8464578871437548472L, model.properties().size()); + Assertions.assertEquals(2124341165, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xs", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("d", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("sirudhzmmesckdlp", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("cxfailcfxwmdboxd", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, 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 0000000000000..4d37edb9d3457 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java @@ -0,0 +1,132 @@ +// Copyright (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\":\"oisfmnaybdjn\",\"size\":8347126550320839164,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":492871165,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"mulw\",\"vqtow\",\"h\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1526566241,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"bfajcywhjqwmchq\",\"htfxcpupuki\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"SMB\",\"SMB\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"smosaonhqnam\",\"mountTargets\":[{\"ipAddress\":\"tassaekewna\",\"smbServerFqdn\":\"ajbk\"},{\"ipAddress\":\"lcyizyddcvxo\",\"smbServerFqdn\":\"rvfsxxbydesq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"cpwgoljtzxnmxsd\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"googxq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"vaz\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"odjnos\",\"restorationState\":\"Restoring\"},\"eTag\":\"bfas\",\"zones\":[\"trnzpducdaaktu\",\"ktz\",\"oimyfpqd\",\"wkppnwyytfvp\"],\"location\":\"fjikffffgkuhznw\",\"tags\":{\"wg\":\"ldbkkejjkjig\",\"ujjs\":\"zmxjqif\"},\"id\":\"cmlzaahz\",\"name\":\"hu\",\"type\":\"oolkolirhhm\"}"; + + 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("rholhujbfwxi") + .withRegion("muadjnfsncski") + .withExistingElasticCapacityPool("uoard", "agttpufpb", "g") + .withTags( + mapOf("xgztlcgctjch", "hjgczetyb", "mywj", "j", "cljkxpyl", "ebecuvlbefv", "eypdvrbk", "woxzgwpsyxji")) + .withProperties(new ElasticVolumeProperties().withFilePath("kysolsyjprxs") + .withSize(3403547037399603480L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1530877079) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("huwzbxpcqzgi")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1147889047) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("rrskapbxwieexuy", "derltfokyksyim")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(101688613) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("uiferse")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.NFSV3)) + .withSnapshotResourceId("jmwvvbtuqkxxi") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("vjaqu")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("ynvskpajbmgeume") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("xcbccwkqmt"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("crpilgftrq")) + .withZones(Arrays.asList("ldahlfxlmu")) + .create(); + + Assertions.assertEquals("fjikffffgkuhznw", response.location()); + Assertions.assertEquals("ldbkkejjkjig", response.tags().get("wg")); + Assertions.assertEquals("oisfmnaybdjn", response.properties().filePath()); + Assertions.assertEquals(8347126550320839164L, response.properties().size()); + Assertions.assertEquals(492871165, 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("mulw", response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.SMB, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("smosaonhqnam", response.properties().snapshotResourceId()); + Assertions.assertEquals("cpwgoljtzxnmxsd", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("googxq", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("vaz", response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("odjnos", response.properties().backupResourceId()); + Assertions.assertEquals("trnzpducdaaktu", 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 0000000000000..965008c0139dd --- /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\":\"yjln\",\"size\":5564724191812287807,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":939477514,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"zjihweebiphr\",\"vcjwqwoqsratj\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":757043950,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"zgdkkagvwu\",\"hsusmmor\",\"mzhwilzzhni\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"SMB\",\"NFSv4\",\"SMB\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"tlrcxivcbkutpu\",\"mountTargets\":[{\"ipAddress\":\"jflu\",\"smbServerFqdn\":\"nbpvzlq\"},{\"ipAddress\":\"auyqnj\",\"smbServerFqdn\":\"hmocgjshg\"},{\"ipAddress\":\"a\",\"smbServerFqdn\":\"wvixq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"jkyb\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"clrvtzqnrbctbh\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"pcvrdny\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"ad\",\"restorationState\":\"Failed\"},\"eTag\":\"ahwriuomzczfk\",\"zones\":[\"evsaa\",\"wspcaxikhfjqebg\"],\"location\":\"xkxgzzrom\",\"tags\":{\"zpatqtd\":\"ysemtmesrfsvpin\"},\"id\":\"swxspvckojaz\",\"name\":\"bgspf\",\"type\":\"esubzpvpv\"}"; + + 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("wmbupyvqyvliq", "ipsejbsvsia", "eswhd", "zydisnuep", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xkxgzzrom", response.location()); + Assertions.assertEquals("ysemtmesrfsvpin", response.tags().get("zpatqtd")); + Assertions.assertEquals("yjln", response.properties().filePath()); + Assertions.assertEquals(5564724191812287807L, response.properties().size()); + Assertions.assertEquals(939477514, 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("zjihweebiphr", + response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("tlrcxivcbkutpu", response.properties().snapshotResourceId()); + Assertions.assertEquals("jkyb", response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("clrvtzqnrbctbh", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("pcvrdny", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("ad", response.properties().backupResourceId()); + Assertions.assertEquals("evsaa", 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 0000000000000..9fdf162b21001 --- /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\":\"fxnxml\",\"size\":3239942709973329316,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1190686584,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"yzlwhbwzjnufzrf\",\"m\",\"qgnnbz\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1417992874,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"gjsxmty\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv3\",\"NFSv4\",\"NFSv3\",\"NFSv3\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"phtitsffofwanmhk\",\"mountTargets\":[{\"ipAddress\":\"w\",\"smbServerFqdn\":\"cgwdfriwgybjp\"},{\"ipAddress\":\"ok\",\"smbServerFqdn\":\"vgllixdgby\"},{\"ipAddress\":\"wewqkj\",\"smbServerFqdn\":\"prwpxsoohu\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"skl\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"uugggzlfbgrd\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"srtmdylperpiltt\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"mf\",\"restorationState\":\"Restoring\"},\"eTag\":\"detres\",\"zones\":[\"tshuvftwaivm\",\"qkevzgj\"],\"location\":\"anhx\",\"tags\":{\"kf\":\"xxzetwwzjwotnx\",\"qwec\":\"glhrfo\",\"vppqi\":\"snhpcselqx\",\"l\":\"ukklvzrlr\"},\"id\":\"cme\",\"name\":\"jsczivfqbqnasdsy\",\"type\":\"nzsieuscplh\"}]}"; + + 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("ylytcovqseusr", "j", "d", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("anhx", response.iterator().next().location()); + Assertions.assertEquals("xxzetwwzjwotnx", response.iterator().next().tags().get("kf")); + Assertions.assertEquals("fxnxml", response.iterator().next().properties().filePath()); + Assertions.assertEquals(3239942709973329316L, response.iterator().next().properties().size()); + Assertions.assertEquals(1190686584, + 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.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("yzlwhbwzjnufzrf", + 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.NFSV3, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("phtitsffofwanmhk", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("skl", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("uugggzlfbgrd", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("srtmdylperpiltt", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("mf", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("tshuvftwaivm", 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 0000000000000..eb8d046ce5d5c --- /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\":\"sdyepfno\",\"size\":2703217900378871776,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":412855773,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"qejg\",\"aokctgkp\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1842142596,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"gdyfcixrhlcqvhoe\",\"goiutgw\",\"mkahpqha\",\"yntacihnco\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":679415262,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"hikea\",\"grvgpomxp\",\"pdtsdfjyiesocwi\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":918198505,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"ofjsbgbwwzvdaj\",\"wnncfmaciqg\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"xvtbougux\",\"mountTargets\":[{\"ipAddress\":\"pg\",\"smbServerFqdn\":\"tbasu\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"dl\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"eaqbkixv\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"npbbfqv\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"gzfeuzj\",\"restorationState\":\"Restoring\"},\"eTag\":\"hfkyez\",\"zones\":[\"jzmicuydocc\"],\"location\":\"shanzbui\",\"tags\":{\"dohzniucbdaombwi\":\"batecaat\",\"xu\":\"njdllwktlepowavv\",\"ulynkgfcfd\":\"jgcq\",\"kxx\":\"uws\"},\"id\":\"clhuulriqbyokv\",\"name\":\"gbzsxebrslt\",\"type\":\"fyhcdjw\"}"; + + 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("vdgxly", "kxitds", "ezsvkolrupjov", "ozsaye", + new ElasticVolumeRevert().withSnapshotResourceId("azwzlpzbtzuykyki"), com.azure.core.util.Context.NONE); + + Assertions.assertEquals("shanzbui", response.location()); + Assertions.assertEquals("batecaat", response.tags().get("dohzniucbdaombwi")); + Assertions.assertEquals("sdyepfno", response.properties().filePath()); + Assertions.assertEquals(2703217900378871776L, response.properties().size()); + Assertions.assertEquals(412855773, 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.ENABLED, + response.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("qejg", 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("xvtbougux", response.properties().snapshotResourceId()); + Assertions.assertEquals("dl", response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("eaqbkixv", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("npbbfqv", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("gzfeuzj", response.properties().backupResourceId()); + Assertions.assertEquals("jzmicuydocc", response.zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityPatchTests.java index 55aed52a4042c..00f98c70315f2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityPatchTests.java @@ -11,19 +11,19 @@ public final class EncryptionIdentityPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EncryptionIdentityPatch model - = BinaryData.fromString("{\"userAssignedIdentity\":\"pgfewetwlyx\",\"federatedClientId\":\"cxy\"}") - .toObject(EncryptionIdentityPatch.class); - Assertions.assertEquals("pgfewetwlyx", model.userAssignedIdentity()); - Assertions.assertEquals("cxy", model.federatedClientId()); + EncryptionIdentityPatch model = BinaryData + .fromString("{\"userAssignedIdentity\":\"zpgvdwnapfd\",\"federatedClientId\":\"owftptnuwjtks\"}") + .toObject(EncryptionIdentityPatch.class); + Assertions.assertEquals("zpgvdwnapfd", model.userAssignedIdentity()); + Assertions.assertEquals("owftptnuwjtks", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EncryptionIdentityPatch model - = new EncryptionIdentityPatch().withUserAssignedIdentity("pgfewetwlyx").withFederatedClientId("cxy"); + EncryptionIdentityPatch model = new EncryptionIdentityPatch().withUserAssignedIdentity("zpgvdwnapfd") + .withFederatedClientId("owftptnuwjtks"); model = BinaryData.fromObject(model).toObject(EncryptionIdentityPatch.class); - Assertions.assertEquals("pgfewetwlyx", model.userAssignedIdentity()); - Assertions.assertEquals("cxy", model.federatedClientId()); + Assertions.assertEquals("zpgvdwnapfd", model.userAssignedIdentity()); + Assertions.assertEquals("owftptnuwjtks", model.federatedClientId()); } } 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 e053514b1b746..2f118d4c18cfb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java @@ -11,19 +11,20 @@ public final class EncryptionIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EncryptionIdentity model = BinaryData.fromString( - "{\"principalId\":\"fgmvecactxmwo\",\"userAssignedIdentity\":\"yowc\",\"federatedClientId\":\"qovekqvgqou\"}") + EncryptionIdentity model = BinaryData + .fromString( + "{\"principalId\":\"utgqztwh\",\"userAssignedIdentity\":\"mupgxy\",\"federatedClientId\":\"cdxa\"}") .toObject(EncryptionIdentity.class); - Assertions.assertEquals("yowc", model.userAssignedIdentity()); - Assertions.assertEquals("qovekqvgqou", model.federatedClientId()); + Assertions.assertEquals("mupgxy", model.userAssignedIdentity()); + Assertions.assertEquals("cdxa", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionIdentity model - = new EncryptionIdentity().withUserAssignedIdentity("yowc").withFederatedClientId("qovekqvgqou"); + = new EncryptionIdentity().withUserAssignedIdentity("mupgxy").withFederatedClientId("cdxa"); model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("yowc", model.userAssignedIdentity()); - Assertions.assertEquals("qovekqvgqou", model.federatedClientId()); + Assertions.assertEquals("mupgxy", model.userAssignedIdentity()); + Assertions.assertEquals("cdxa", 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 ebb12e52ec79c..a8eda4a7e301d 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\":\"rpfoobr\",\"privateEndpointId\":\"ttymsjny\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"ldqqctekv\",\"privateEndpointId\":\"lblhtjq\"}") .toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("rpfoobr", model.virtualNetworkId()); - Assertions.assertEquals("ttymsjny", model.privateEndpointId()); + Assertions.assertEquals("ldqqctekv", model.virtualNetworkId()); + Assertions.assertEquals("lblhtjq", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionTransitionRequest model - = new EncryptionTransitionRequest().withVirtualNetworkId("rpfoobr").withPrivateEndpointId("ttymsjny"); + = new EncryptionTransitionRequest().withVirtualNetworkId("ldqqctekv").withPrivateEndpointId("lblhtjq"); model = BinaryData.fromObject(model).toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("rpfoobr", model.virtualNetworkId()); - Assertions.assertEquals("ttymsjny", model.privateEndpointId()); + Assertions.assertEquals("ldqqctekv", model.virtualNetworkId()); + Assertions.assertEquals("lblhtjq", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionInnerTests.java new file mode 100644 index 0000000000000..2817d7637a33e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionInnerTests.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.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ExternalCacheConnectionInner; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ExternalCacheConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Canceled\",\"originVolumeResourceId\":\"jhzn\",\"externalCacheName\":\"mtuatmzwcjjncqtj\",\"externalSvmResourceId\":\"mizvgbgatzuuvbx\",\"clusterPeerSubnetResourceId\":\"rebwggahtt\",\"clusterPeerResourceId\":\"swvajqfu\",\"svmPeerResourceId\":\"x\",\"setupInformation\":{\"setupStatus\":\"ClusterPeerPending\",\"statusInformation\":\"sunwqrjzfrgqhaoh\",\"command\":\"buocnjr\"}},\"location\":\"mbpyryxamebly\",\"tags\":{\"dlfp\":\"kfkmrocxnehvsmt\",\"vyuns\":\"apucygvo\"},\"id\":\"xlghieegj\",\"name\":\"gvvpasek\",\"type\":\"gbuxantuygdh\"}") + .toObject(ExternalCacheConnectionInner.class); + Assertions.assertEquals("mbpyryxamebly", model.location()); + Assertions.assertEquals("kfkmrocxnehvsmt", model.tags().get("dlfp")); + Assertions.assertEquals("jhzn", model.properties().originVolumeResourceId()); + Assertions.assertEquals("mtuatmzwcjjncqtj", model.properties().externalCacheName()); + Assertions.assertEquals("mizvgbgatzuuvbx", model.properties().externalSvmResourceId()); + Assertions.assertEquals("rebwggahtt", model.properties().clusterPeerSubnetResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalCacheConnectionInner model = new ExternalCacheConnectionInner().withLocation("mbpyryxamebly") + .withTags(mapOf("dlfp", "kfkmrocxnehvsmt", "vyuns", "apucygvo")) + .withProperties(new ExternalCacheConnectionProperties().withOriginVolumeResourceId("jhzn") + .withExternalCacheName("mtuatmzwcjjncqtj") + .withExternalSvmResourceId("mizvgbgatzuuvbx") + .withClusterPeerSubnetResourceId("rebwggahtt")); + model = BinaryData.fromObject(model).toObject(ExternalCacheConnectionInner.class); + Assertions.assertEquals("mbpyryxamebly", model.location()); + Assertions.assertEquals("kfkmrocxnehvsmt", model.tags().get("dlfp")); + Assertions.assertEquals("jhzn", model.properties().originVolumeResourceId()); + Assertions.assertEquals("mtuatmzwcjjncqtj", model.properties().externalCacheName()); + Assertions.assertEquals("mizvgbgatzuuvbx", model.properties().externalSvmResourceId()); + Assertions.assertEquals("rebwggahtt", model.properties().clusterPeerSubnetResourceId()); + } + + // 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/ExternalCacheConnectionListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionListTests.java new file mode 100644 index 0000000000000..fac6d4bdec935 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionListTests.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.implementation.models.ExternalCacheConnectionList; +import org.junit.jupiter.api.Assertions; + +public final class ExternalCacheConnectionListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheConnectionList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"originVolumeResourceId\":\"vqs\",\"externalCacheName\":\"ny\",\"externalSvmResourceId\":\"uuzivensrpmeyyvp\",\"clusterPeerSubnetResourceId\":\"atlb\",\"clusterPeerResourceId\":\"pzgsk\",\"svmPeerResourceId\":\"fhfv\",\"setupInformation\":{\"setupStatus\":\"VServerPeerRequired\",\"statusInformation\":\"bnxwc\",\"command\":\"mmpvf\"}},\"location\":\"wzfgbrttuiaclkie\",\"tags\":{\"yuttdiygbpvnwswm\":\"jlfnthiq\",\"l\":\"xkyctwwgzwx\",\"ygzyvneezaifght\":\"ecvo\"},\"id\":\"oqqtl\",\"name\":\"fhzbkr\",\"type\":\"jjjavfqnvhnq\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"originVolumeResourceId\":\"ogiyetes\",\"externalCacheName\":\"pvidbz\",\"externalSvmResourceId\":\"jhqt\",\"clusterPeerSubnetResourceId\":\"ovnynkbwetnju\",\"clusterPeerResourceId\":\"sprkzyaupiac\",\"svmPeerResourceId\":\"n\",\"setupInformation\":{\"setupStatus\":\"VServerPeerRequired\",\"statusInformation\":\"ro\",\"command\":\"tuovmaonurj\"}},\"location\":\"mghihp\",\"tags\":{\"sjuscvsfxigctmg\":\"mslclblyjxlt\",\"zqccydrtce\":\"uupb\",\"eq\":\"kdqkkyihzt\",\"ecfehuwa\":\"gqzgwldoychill\"},\"id\":\"a\",\"name\":\"uhicqllizstacsjv\",\"type\":\"rweft\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"originVolumeResourceId\":\"jp\",\"externalCacheName\":\"vssehaepw\",\"externalSvmResourceId\":\"mcxtczhu\",\"clusterPeerSubnetResourceId\":\"uknijduyye\",\"clusterPeerResourceId\":\"ydjfb\",\"svmPeerResourceId\":\"yv\",\"setupInformation\":{\"setupStatus\":\"NoActionRequired\",\"statusInformation\":\"tywikd\",\"command\":\"lakuflgbhgauacd\"}},\"location\":\"mxu\",\"tags\":{\"ozo\":\"ryjqgdkf\",\"hntasfaymx\":\"oqbvjhvefgwbmqj\",\"qkyojwyvf\":\"ulpzealb\"},\"id\":\"mbtsuahxsg\",\"name\":\"jcmmzrrscub\",\"type\":\"wsdrnpxqwodif\"}],\"nextLink\":\"xcjr\"}") + .toObject(ExternalCacheConnectionList.class); + Assertions.assertEquals("wzfgbrttuiaclkie", model.value().get(0).location()); + Assertions.assertEquals("jlfnthiq", model.value().get(0).tags().get("yuttdiygbpvnwswm")); + Assertions.assertEquals("vqs", model.value().get(0).properties().originVolumeResourceId()); + Assertions.assertEquals("ny", model.value().get(0).properties().externalCacheName()); + Assertions.assertEquals("uuzivensrpmeyyvp", model.value().get(0).properties().externalSvmResourceId()); + Assertions.assertEquals("atlb", model.value().get(0).properties().clusterPeerSubnetResourceId()); + Assertions.assertEquals("xcjr", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionPropertiesTests.java new file mode 100644 index 0000000000000..661506bc558cf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionPropertiesTests.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.ExternalCacheConnectionProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalCacheConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheConnectionProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Updating\",\"originVolumeResourceId\":\"i\",\"externalCacheName\":\"irpiwrqofulopmj\",\"externalSvmResourceId\":\"lexwhcbjp\",\"clusterPeerSubnetResourceId\":\"k\",\"clusterPeerResourceId\":\"hu\",\"svmPeerResourceId\":\"erctatoyin\",\"setupInformation\":{\"setupStatus\":\"VServerPeerRequired\",\"statusInformation\":\"lc\",\"command\":\"duczkgof\"}}") + .toObject(ExternalCacheConnectionProperties.class); + Assertions.assertEquals("i", model.originVolumeResourceId()); + Assertions.assertEquals("irpiwrqofulopmj", model.externalCacheName()); + Assertions.assertEquals("lexwhcbjp", model.externalSvmResourceId()); + Assertions.assertEquals("k", model.clusterPeerSubnetResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalCacheConnectionProperties model + = new ExternalCacheConnectionProperties().withOriginVolumeResourceId("i") + .withExternalCacheName("irpiwrqofulopmj") + .withExternalSvmResourceId("lexwhcbjp") + .withClusterPeerSubnetResourceId("k"); + model = BinaryData.fromObject(model).toObject(ExternalCacheConnectionProperties.class); + Assertions.assertEquals("i", model.originVolumeResourceId()); + Assertions.assertEquals("irpiwrqofulopmj", model.externalCacheName()); + Assertions.assertEquals("lexwhcbjp", model.externalSvmResourceId()); + Assertions.assertEquals("k", model.clusterPeerSubnetResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionTagsUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionTagsUpdateTests.java new file mode 100644 index 0000000000000..5d974ec1bbe22 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionTagsUpdateTests.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.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ExternalCacheConnectionTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheConnectionTagsUpdate model + = BinaryData.fromString("{\"tags\":{\"oxmlghktuidv\":\"vvf\",\"lpdwwexymzvlazi\":\"ma\"}}") + .toObject(ExternalCacheConnectionTagsUpdate.class); + Assertions.assertEquals("vvf", model.tags().get("oxmlghktuidv")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalCacheConnectionTagsUpdate model + = new ExternalCacheConnectionTagsUpdate().withTags(mapOf("oxmlghktuidv", "vvf", "lpdwwexymzvlazi", "ma")); + model = BinaryData.fromObject(model).toObject(ExternalCacheConnectionTagsUpdate.class); + Assertions.assertEquals("vvf", model.tags().get("oxmlghktuidv")); + } + + // 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/ExternalCacheConnectionsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsCreateOrUpdateMockTests.java new file mode 100644 index 0000000000000..90661e4f9b7f8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsCreateOrUpdateMockTests.java @@ -0,0 +1,67 @@ +// Copyright (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.ExternalCacheConnection; +import com.azure.resourcemanager.netapp.models.ExternalCacheConnectionProperties; +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 ExternalCacheConnectionsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"originVolumeResourceId\":\"uj\",\"externalCacheName\":\"zx\",\"externalSvmResourceId\":\"kn\",\"clusterPeerSubnetResourceId\":\"d\",\"clusterPeerResourceId\":\"duyehiiitt\",\"svmPeerResourceId\":\"yuqwrldaxurfqazc\",\"setupInformation\":{\"setupStatus\":\"VServerPeerRequired\",\"statusInformation\":\"xdzciggbnvtxofwa\",\"command\":\"yxwhoeamo\"}},\"location\":\"bdoeysf\",\"tags\":{\"uegn\":\"mtwuuh\",\"iphrrku\":\"wmnfeubtzjyrkwfu\",\"hz\":\"mnqdu\"},\"id\":\"fopueoqusvwluj\",\"name\":\"pwnibittozt\",\"type\":\"dqumqvfm\"}"; + + 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)); + + ExternalCacheConnection response = manager.externalCacheConnections() + .define("dsqcmhnxl") + .withRegion("ry") + .withExistingResourceGroup("yeyzm") + .withTags(mapOf("kemjpequlrlz", "wmhlymgnukx", "lakkucddwnhcz", "udgjtfb", "rjwayhicqq", "utoucgjt", + "edvbiabvnsrge", "wvgwkslvli")) + .withProperties(new ExternalCacheConnectionProperties().withOriginVolumeResourceId("o") + .withExternalCacheName("machbkv") + .withExternalSvmResourceId("rpbj") + .withClusterPeerSubnetResourceId("vgoqple")) + .create(); + + Assertions.assertEquals("bdoeysf", response.location()); + Assertions.assertEquals("mtwuuh", response.tags().get("uegn")); + Assertions.assertEquals("uj", response.properties().originVolumeResourceId()); + Assertions.assertEquals("zx", response.properties().externalCacheName()); + Assertions.assertEquals("kn", response.properties().externalSvmResourceId()); + Assertions.assertEquals("d", response.properties().clusterPeerSubnetResourceId()); + } + + // 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/ExternalCacheConnectionsGetByResourceGroupWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 0000000000000..0fd62d11f5a42 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsGetByResourceGroupWithResponseMockTests.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.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.ExternalCacheConnection; +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 ExternalCacheConnectionsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Creating\",\"originVolumeResourceId\":\"a\",\"externalCacheName\":\"mczfedyuepsvplt\",\"externalSvmResourceId\":\"dajjvywe\",\"clusterPeerSubnetResourceId\":\"fkumcfjxoky\",\"clusterPeerResourceId\":\"syasvfnkwmygjjek\",\"svmPeerResourceId\":\"nfdrugjqyck\",\"setupInformation\":{\"setupStatus\":\"VServerPeerRequired\",\"statusInformation\":\"dtu\",\"command\":\"r\"}},\"location\":\"dklotcsubmzo\",\"tags\":{\"chkxfpwhdysl\":\"vo\",\"qshwyqxridt\":\"klglmnnkkwa\",\"gxq\":\"bsaqjm\"},\"id\":\"queu\",\"name\":\"ylztp\",\"type\":\"iizevjykofvez\"}"; + + 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)); + + ExternalCacheConnection response = manager.externalCacheConnections() + .getByResourceGroupWithResponse("bbaex", "jfwtgdfkkaui", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("dklotcsubmzo", response.location()); + Assertions.assertEquals("vo", response.tags().get("chkxfpwhdysl")); + Assertions.assertEquals("a", response.properties().originVolumeResourceId()); + Assertions.assertEquals("mczfedyuepsvplt", response.properties().externalCacheName()); + Assertions.assertEquals("dajjvywe", response.properties().externalSvmResourceId()); + Assertions.assertEquals("fkumcfjxoky", response.properties().clusterPeerSubnetResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListByResourceGroupMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListByResourceGroupMockTests.java new file mode 100644 index 0000000000000..0e3687d84a9fa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListByResourceGroupMockTests.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.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.ExternalCacheConnection; +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 ExternalCacheConnectionsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Patching\",\"originVolumeResourceId\":\"c\",\"externalCacheName\":\"sf\",\"externalSvmResourceId\":\"zcntogffjwajnrtw\",\"clusterPeerSubnetResourceId\":\"aqkifmxawostfz\",\"clusterPeerResourceId\":\"hrkmjqncfv\",\"svmPeerResourceId\":\"cnhemvwfnq\",\"setupInformation\":{\"setupStatus\":\"VServerPeerRequired\",\"statusInformation\":\"ndrw\",\"command\":\"od\"}},\"location\":\"grssgw\",\"tags\":{\"jmu\":\"ai\",\"tdscnkzzohnrdd\":\"mvecvztscbgmusai\",\"ozrehlbzqixbnjrq\":\"lze\",\"pam\":\"zyuexozony\"},\"id\":\"udpabcreuwzos\",\"name\":\"yjxvc\",\"type\":\"asormrexzvdube\"}]}"; + + 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.externalCacheConnections().listByResourceGroup("fkhkqtwqlep", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("grssgw", response.iterator().next().location()); + Assertions.assertEquals("ai", response.iterator().next().tags().get("jmu")); + Assertions.assertEquals("c", response.iterator().next().properties().originVolumeResourceId()); + Assertions.assertEquals("sf", response.iterator().next().properties().externalCacheName()); + Assertions.assertEquals("zcntogffjwajnrtw", response.iterator().next().properties().externalSvmResourceId()); + Assertions.assertEquals("aqkifmxawostfz", + response.iterator().next().properties().clusterPeerSubnetResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListMockTests.java new file mode 100644 index 0000000000000..d5d9da5ab04af --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheConnectionsListMockTests.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.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.ExternalCacheConnection; +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 ExternalCacheConnectionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"originVolumeResourceId\":\"gbaduve\",\"externalCacheName\":\"ovsdqhzrtdbakrli\",\"externalSvmResourceId\":\"zfvppkeq\",\"clusterPeerSubnetResourceId\":\"fjmclngygnhrkomb\",\"clusterPeerResourceId\":\"tajdopggorwjoqtr\",\"svmPeerResourceId\":\"pvclpofyrl\",\"setupInformation\":{\"setupStatus\":\"NoActionRequired\",\"statusInformation\":\"skwxj\",\"command\":\"hxccbmkakmko\"}},\"location\":\"bputmgvmuyakml\",\"tags\":{\"urxf\":\"fowzkroyr\",\"jtgzj\":\"zqjim\",\"yzivrm\":\"xlfejlzuqloiwya\",\"hwhrktj\":\"tcdqlh\"},\"id\":\"eifibfiplhx\",\"name\":\"nsmy\",\"type\":\"jow\"}]}"; + + 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.externalCacheConnections().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("bputmgvmuyakml", response.iterator().next().location()); + Assertions.assertEquals("fowzkroyr", response.iterator().next().tags().get("urxf")); + Assertions.assertEquals("gbaduve", response.iterator().next().properties().originVolumeResourceId()); + Assertions.assertEquals("ovsdqhzrtdbakrli", response.iterator().next().properties().externalCacheName()); + Assertions.assertEquals("zfvppkeq", response.iterator().next().properties().externalSvmResourceId()); + Assertions.assertEquals("fjmclngygnhrkomb", + response.iterator().next().properties().clusterPeerSubnetResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheInnerTests.java new file mode 100644 index 0000000000000..50bddd8c5feb1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheInnerTests.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.fluent.models.ExternalCacheInner; + +public final class ExternalCacheInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Moving\",\"externalCacheName\":\"czezkhhlt\",\"originVolumeResourceId\":\"adhqoa\",\"originVolumeName\":\"qoyueayfbpcmsplb\",\"originSvmName\":\"rueqthwm\",\"sizeInBytes\":7498664143426267156,\"state\":\"offline\",\"createCommand\":\"bxigdhxiidlo\",\"connectionStatus\":\"Disconnected\"},\"id\":\"wdpyq\",\"name\":\"ybxubmdna\",\"type\":\"cbq\"}") + .toObject(ExternalCacheInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheListResultTests.java new file mode 100644 index 0000000000000..ade6241e89efe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCacheListResultTests.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.ExternalCacheListResult; +import org.junit.jupiter.api.Assertions; + +public final class ExternalCacheListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"externalCacheName\":\"razisg\",\"originVolumeResourceId\":\"iuemvanbwzohmnr\",\"originVolumeName\":\"bsojk\",\"originSvmName\":\"nhmdptysprqs\",\"sizeInBytes\":881427609491244967,\"state\":\"pending\",\"createCommand\":\"slsvjgpliu\",\"connectionStatus\":\"Unknown\"},\"id\":\"oyxqvapcohhou\",\"name\":\"qpqojxcxzrzd\",\"type\":\"gdzbenr\"}],\"nextLink\":\"cawetzqddt\"}") + .toObject(ExternalCacheListResult.class); + Assertions.assertEquals("cawetzqddt", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachePropertiesTests.java new file mode 100644 index 0000000000000..11d9c32c8d437 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachePropertiesTests.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.ExternalCacheProperties; + +public final class ExternalCachePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalCacheProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Creating\",\"externalCacheName\":\"jelaqacigele\",\"originVolumeResourceId\":\"d\",\"originVolumeName\":\"qvwzkjopwbeonrl\",\"originSvmName\":\"zdqyb\",\"sizeInBytes\":5172125653404704732,\"state\":\"pending\",\"createCommand\":\"ptsoqfyiase\",\"connectionStatus\":\"Unsupported\"}") + .toObject(ExternalCacheProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachesGetWithResponseMockTests.java new file mode 100644 index 0000000000000..823d110cef62b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachesGetWithResponseMockTests.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.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.ExternalCache; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExternalCachesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"externalCacheName\":\"lpnerxrzutylcur\",\"originVolumeResourceId\":\"q\",\"originVolumeName\":\"b\",\"originSvmName\":\"aehtd\",\"sizeInBytes\":9191949324556911277,\"state\":\"unsupported\",\"createCommand\":\"nfaooeactedcgls\",\"connectionStatus\":\"Pending\"},\"id\":\"didahzl\",\"name\":\"rqm\",\"type\":\"lpbyxroiduyq\"}"; + + 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)); + + ExternalCache response = manager.externalCaches() + .getWithResponse("lef", "ioyidoxznvg", "dtmuuvd", "wsxmrszb", com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachesListByParentMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachesListByParentMockTests.java new file mode 100644 index 0000000000000..9d9eea6c27933 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalCachesListByParentMockTests.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.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.ExternalCache; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExternalCachesListByParentMockTests { + @Test + public void testListByParent() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"externalCacheName\":\"usxxhdodpjwybl\",\"originVolumeResourceId\":\"bdmvsby\",\"originVolumeName\":\"aelqpvekmkwjf\",\"originSvmName\":\"tlo\",\"sizeInBytes\":7119699857862836203,\"state\":\"error\",\"createCommand\":\"rsuivux\",\"connectionStatus\":\"Disconnected\"},\"id\":\"oqwczsyi\",\"name\":\"rizfwihvaang\",\"type\":\"tnhjrfdmfd\"}]}"; + + 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.externalCaches() + .listByParent("pffmnoii", "sudyh", "rjjtalxrdsjrho", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalResourceNetworkInterfacesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalResourceNetworkInterfacesTests.java new file mode 100644 index 0000000000000..a43464c6cb7f6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalResourceNetworkInterfacesTests.java @@ -0,0 +1,20 @@ +// Copyright (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.ExternalResourceNetworkInterfaces; +import org.junit.jupiter.api.Assertions; + +public final class ExternalResourceNetworkInterfacesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalResourceNetworkInterfaces model + = BinaryData.fromString("{\"networkInterfaceResourceId\":\"xuqibsxtkcudf\",\"peerIpAddress\":\"sfar\"}") + .toObject(ExternalResourceNetworkInterfaces.class); + Assertions.assertEquals("xuqibsxtkcudf", model.networkInterfaceResourceId()); + Assertions.assertEquals("sfar", model.peerIpAddress()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmInnerTests.java new file mode 100644 index 0000000000000..d03da70ab0013 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmInnerTests.java @@ -0,0 +1,47 @@ +// Copyright (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.ExternalSvmInner; +import com.azure.resourcemanager.netapp.models.ExternalSvmProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ExternalSvmInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalSvmInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Creating\",\"ontapSvmName\":\"dtxetlgydlh\",\"svmPeerResourceIds\":[\"n\",\"pxy\"]},\"location\":\"fiqgeaar\",\"tags\":{\"ulidwc\":\"ekglklb\",\"nfhjirwgdnqzbr\":\"vmzegj\",\"igsxcdgljplk\":\"kspzhzmtksjcit\"},\"id\":\"ua\",\"name\":\"htomflrytswfp\",\"type\":\"mdgycxn\"}") + .toObject(ExternalSvmInner.class); + Assertions.assertEquals("fiqgeaar", model.location()); + Assertions.assertEquals("ekglklb", model.tags().get("ulidwc")); + Assertions.assertEquals("dtxetlgydlh", model.properties().ontapSvmName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalSvmInner model = new ExternalSvmInner().withLocation("fiqgeaar") + .withTags(mapOf("ulidwc", "ekglklb", "nfhjirwgdnqzbr", "vmzegj", "igsxcdgljplk", "kspzhzmtksjcit")) + .withProperties(new ExternalSvmProperties().withOntapSvmName("dtxetlgydlh")); + model = BinaryData.fromObject(model).toObject(ExternalSvmInner.class); + Assertions.assertEquals("fiqgeaar", model.location()); + Assertions.assertEquals("ekglklb", model.tags().get("ulidwc")); + Assertions.assertEquals("dtxetlgydlh", model.properties().ontapSvmName()); + } + + // 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/ExternalSvmListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmListResultTests.java new file mode 100644 index 0000000000000..08109543003c3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmListResultTests.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.implementation.models.ExternalSvmListResult; +import org.junit.jupiter.api.Assertions; + +public final class ExternalSvmListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalSvmListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"ontapSvmName\":\"dyomkxfbv\",\"svmPeerResourceIds\":[\"dy\"]},\"location\":\"hpwpgddeimawzovg\",\"tags\":{\"sqowxwc\":\"muikjcjcaztbws\"},\"id\":\"mlikytw\",\"name\":\"czcswka\",\"type\":\"ve\"},{\"properties\":{\"provisioningState\":\"Patching\",\"ontapSvmName\":\"vlvhbwrnfxtgd\",\"svmPeerResourceIds\":[\"th\"]},\"location\":\"n\",\"tags\":{\"kcoeqswank\":\"oya\",\"tmhdroznnhdr\":\"t\",\"sggux\":\"ktgj\",\"ywaeeczgf\":\"eml\"},\"id\":\"ukklelss\",\"name\":\"blycsxzujksr\",\"type\":\"smdesqplpvmjcd\"},{\"properties\":{\"provisioningState\":\"Failed\",\"ontapSvmName\":\"idyvteow\",\"svmPeerResourceIds\":[\"piudeugfsxzecpa\",\"wkufykhvuhxepm\"]},\"location\":\"tznabao\",\"tags\":{\"uihywart\":\"lujdjltymkmv\",\"j\":\"pphkixkykxds\",\"kkflrmymyincqlhr\":\"emmucfxh\"},\"id\":\"s\",\"name\":\"sl\",\"type\":\"iiiovgqcgxuugq\"},{\"properties\":{\"provisioningState\":\"Updating\",\"ontapSvmName\":\"tiowlx\",\"svmPeerResourceIds\":[\"dptjgwdtgukranb\"]},\"location\":\"phqlkccuz\",\"tags\":{\"lwgniiprglvawu\":\"qwahoi\"},\"id\":\"z\",\"name\":\"ufypiv\",\"type\":\"sbbjpmcu\"}],\"nextLink\":\"mifoxxkub\"}") + .toObject(ExternalSvmListResult.class); + Assertions.assertEquals("hpwpgddeimawzovg", model.value().get(0).location()); + Assertions.assertEquals("muikjcjcaztbws", model.value().get(0).tags().get("sqowxwc")); + Assertions.assertEquals("dyomkxfbv", model.value().get(0).properties().ontapSvmName()); + Assertions.assertEquals("mifoxxkub", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmPropertiesTests.java new file mode 100644 index 0000000000000..da4a3a9064663 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmPropertiesTests.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.ExternalSvmProperties; +import org.junit.jupiter.api.Assertions; + +public final class ExternalSvmPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalSvmProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Moving\",\"ontapSvmName\":\"whqjjyslurlpshhk\",\"svmPeerResourceIds\":[\"dwqslsrhmpqvw\",\"skondcbrwimu\",\"qejo\"]}") + .toObject(ExternalSvmProperties.class); + Assertions.assertEquals("whqjjyslurlpshhk", model.ontapSvmName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalSvmProperties model = new ExternalSvmProperties().withOntapSvmName("whqjjyslurlpshhk"); + model = BinaryData.fromObject(model).toObject(ExternalSvmProperties.class); + Assertions.assertEquals("whqjjyslurlpshhk", model.ontapSvmName()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmTagsUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmTagsUpdateTests.java new file mode 100644 index 0000000000000..a1174fd43337f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmTagsUpdateTests.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.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ExternalSvmTagsUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ExternalSvmTagsUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ExternalSvmTagsUpdate model = BinaryData.fromString( + "{\"tags\":{\"jqo\":\"yrrleaesinuqt\",\"bbmpxdlvykfre\":\"bpihehcecybmrqbr\",\"wjksghudgzhxo\":\"crse\",\"jkxibda\":\"jggsvo\"}}") + .toObject(ExternalSvmTagsUpdate.class); + Assertions.assertEquals("yrrleaesinuqt", model.tags().get("jqo")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ExternalSvmTagsUpdate model = new ExternalSvmTagsUpdate().withTags(mapOf("jqo", "yrrleaesinuqt", + "bbmpxdlvykfre", "bpihehcecybmrqbr", "wjksghudgzhxo", "crse", "jkxibda", "jggsvo")); + model = BinaryData.fromObject(model).toObject(ExternalSvmTagsUpdate.class); + Assertions.assertEquals("yrrleaesinuqt", model.tags().get("jqo")); + } + + // 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/ExternalSvmsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsCreateOrUpdateMockTests.java new file mode 100644 index 0000000000000..5bbd987b70e44 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsCreateOrUpdateMockTests.java @@ -0,0 +1,60 @@ +// Copyright (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.ExternalSvm; +import com.azure.resourcemanager.netapp.models.ExternalSvmProperties; +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 ExternalSvmsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"ontapSvmName\":\"cksgfyyskyek\",\"svmPeerResourceIds\":[\"xczvfcckwrtwle\"]},\"location\":\"veszrtlhpdhw\",\"tags\":{\"njfmbbfnvjxit\":\"tacz\"},\"id\":\"ovnkrtiklsmnihql\",\"name\":\"oqksyiibhyxwbgbu\",\"type\":\"avqdorbccqcd\"}"; + + 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)); + + ExternalSvm response = manager.externalSvms() + .define("nmotpuwnnoh") + .withRegion("cum") + .withExistingExternalCluster("neibpgbrhbjdq", "nh") + .withTags(mapOf("uarigrj", "auqmllfeoth")) + .withProperties(new ExternalSvmProperties().withOntapSvmName("gocfr")) + .create(); + + Assertions.assertEquals("veszrtlhpdhw", response.location()); + Assertions.assertEquals("tacz", response.tags().get("njfmbbfnvjxit")); + Assertions.assertEquals("cksgfyyskyek", response.properties().ontapSvmName()); + } + + // 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/ExternalSvmsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsGetWithResponseMockTests.java new file mode 100644 index 0000000000000..5efacba0d5e0f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsGetWithResponseMockTests.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.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.ExternalSvm; +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 ExternalSvmsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Creating\",\"ontapSvmName\":\"bmgjymncjc\",\"svmPeerResourceIds\":[\"irwcqzoofjnqjsv\",\"pfbhtleber\",\"yljeknfqnwjjqx\"]},\"location\":\"kdnjrxgkrhwie\",\"tags\":{\"fwafbjz\":\"pnowawonoehrguql\",\"fazbkoc\":\"pyrgu\"},\"id\":\"ygvthrmxkbcjw\",\"name\":\"dxomrawppk\",\"type\":\"boozflyacagaed\"}"; + + 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)); + + ExternalSvm response = manager.externalSvms() + .getWithResponse("lxvhhyqqegatxgrz", "mg", "nmtsdixc", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("kdnjrxgkrhwie", response.location()); + Assertions.assertEquals("pnowawonoehrguql", response.tags().get("fwafbjz")); + Assertions.assertEquals("bmgjymncjc", response.properties().ontapSvmName()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsListByParentMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsListByParentMockTests.java new file mode 100644 index 0000000000000..dfc8dbab2aa21 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExternalSvmsListByParentMockTests.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.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.ExternalSvm; +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 ExternalSvmsListByParentMockTests { + @Test + public void testListByParent() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"ontapSvmName\":\"oyvhtuqbpeln\",\"svmPeerResourceIds\":[\"ncgagdvc\",\"qhftzbpyfaofd\",\"phtnc\",\"mhjobzr\"]},\"location\":\"ri\",\"tags\":{\"tcvbzwgwhgk\":\"qhy\",\"pufdmxuqbdqn\":\"soauoorssatfyb\",\"fqayopbtsix\":\"sttuxv\"},\"id\":\"gvbhxmndztgs\",\"name\":\"jay\",\"type\":\"mar\"}]}"; + + 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.externalSvms().listByParent("oiqclmgdtwgab", "xfkuzbw", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ri", response.iterator().next().location()); + Assertions.assertEquals("qhy", response.iterator().next().tags().get("tcvbzwgwhgk")); + Assertions.assertEquals("oyvhtuqbpeln", response.iterator().next().properties().ontapSvmName()); + } +} 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 ed726e39d88a8..e416d5c176f9f 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,21 +11,22 @@ public final class FilePathAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FilePathAvailabilityRequest model - = BinaryData.fromString("{\"name\":\"vk\",\"subnetId\":\"gnl\",\"availabilityZone\":\"onzlr\"}") - .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("vk", model.name()); - Assertions.assertEquals("gnl", model.subnetId()); - Assertions.assertEquals("onzlr", model.availabilityZone()); + FilePathAvailabilityRequest model = BinaryData + .fromString("{\"name\":\"ywbo\",\"subnetId\":\"mcqmiciijqp\",\"availabilityZone\":\"fbojxjmcsmyqwix\"}") + .toObject(FilePathAvailabilityRequest.class); + Assertions.assertEquals("ywbo", model.name()); + Assertions.assertEquals("mcqmiciijqp", model.subnetId()); + Assertions.assertEquals("fbojxjmcsmyqwix", model.availabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FilePathAvailabilityRequest model - = new FilePathAvailabilityRequest().withName("vk").withSubnetId("gnl").withAvailabilityZone("onzlr"); + FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("ywbo") + .withSubnetId("mcqmiciijqp") + .withAvailabilityZone("fbojxjmcsmyqwix"); model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("vk", model.name()); - Assertions.assertEquals("gnl", model.subnetId()); - Assertions.assertEquals("onzlr", model.availabilityZone()); + Assertions.assertEquals("ywbo", model.name()); + Assertions.assertEquals("mcqmiciijqp", model.subnetId()); + Assertions.assertEquals("fbojxjmcsmyqwix", model.availabilityZone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java index b0f1df714e5fd..0f551850e91c2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.java @@ -14,21 +14,21 @@ public final class FileSystemUserTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FileSystemUser model = BinaryData.fromString( - "{\"nfsUser\":{\"userId\":6352328391564368443,\"groupId\":3920970361798969582},\"cifsUser\":{\"username\":\"cesutrgjupauut\"}}") + "{\"nfsUser\":{\"userId\":5744786061005129903,\"groupId\":5373165762406096070},\"cifsUser\":{\"username\":\"kh\"}}") .toObject(FileSystemUser.class); - Assertions.assertEquals(6352328391564368443L, model.nfsUser().userId()); - Assertions.assertEquals(3920970361798969582L, model.nfsUser().groupId()); - Assertions.assertEquals("cesutrgjupauut", model.cifsUser().username()); + Assertions.assertEquals(5744786061005129903L, model.nfsUser().userId()); + Assertions.assertEquals(5373165762406096070L, model.nfsUser().groupId()); + Assertions.assertEquals("kh", model.cifsUser().username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FileSystemUser model = new FileSystemUser() - .withNfsUser(new NfsUser().withUserId(6352328391564368443L).withGroupId(3920970361798969582L)) - .withCifsUser(new CifsUser().withUsername("cesutrgjupauut")); + .withNfsUser(new NfsUser().withUserId(5744786061005129903L).withGroupId(5373165762406096070L)) + .withCifsUser(new CifsUser().withUsername("kh")); model = BinaryData.fromObject(model).toObject(FileSystemUser.class); - Assertions.assertEquals(6352328391564368443L, model.nfsUser().userId()); - Assertions.assertEquals(3920970361798969582L, model.nfsUser().groupId()); - Assertions.assertEquals("cesutrgjupauut", model.cifsUser().username()); + Assertions.assertEquals(5744786061005129903L, model.nfsUser().userId()); + Assertions.assertEquals(5373165762406096070L, model.nfsUser().groupId()); + Assertions.assertEquals("kh", model.cifsUser().username()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java index b040f674c24b7..45000a9e1978e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java @@ -12,14 +12,14 @@ public final class GetGroupIdListForLdapUserRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GetGroupIdListForLdapUserRequest model - = BinaryData.fromString("{\"username\":\"d\"}").toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("d", model.username()); + = BinaryData.fromString("{\"username\":\"aolps\"}").toObject(GetGroupIdListForLdapUserRequest.class); + Assertions.assertEquals("aolps", model.username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("d"); + GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("aolps"); model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("d", model.username()); + Assertions.assertEquals("aolps", model.username()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java index af0a7c990caf8..8676df6b39a7a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java @@ -12,8 +12,8 @@ public final class GetGroupIdListForLdapUserResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GetGroupIdListForLdapUserResponseInner model - = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"yhz\",\"xssadbzmnvdf\"]}") + = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"lfmmdnbbglzpswi\",\"d\",\"cwyhzdxssa\"]}") .toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("yhz", model.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("lfmmdnbbglzpswi", model.groupIdsForLdapUser().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java index daf3ccd5fb195..dff8af3043626 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java @@ -12,21 +12,21 @@ public final class HourlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HourlySchedule model = BinaryData - .fromString("{\"snapshotsToKeep\":1309534736,\"minute\":2001921074,\"usedBytes\":7831439414407354845}") + .fromString("{\"snapshotsToKeep\":216133532,\"minute\":2115532997,\"usedBytes\":1237347078053939435}") .toObject(HourlySchedule.class); - Assertions.assertEquals(1309534736, model.snapshotsToKeep()); - Assertions.assertEquals(2001921074, model.minute()); - Assertions.assertEquals(7831439414407354845L, model.usedBytes()); + Assertions.assertEquals(216133532, model.snapshotsToKeep()); + Assertions.assertEquals(2115532997, model.minute()); + Assertions.assertEquals(1237347078053939435L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(1309534736) - .withMinute(2001921074) - .withUsedBytes(7831439414407354845L); + HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(216133532) + .withMinute(2115532997) + .withUsedBytes(1237347078053939435L); model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(1309534736, model.snapshotsToKeep()); - Assertions.assertEquals(2001921074, model.minute()); - Assertions.assertEquals(7831439414407354845L, model.usedBytes()); + Assertions.assertEquals(216133532, model.snapshotsToKeep()); + Assertions.assertEquals(2115532997, model.minute()); + Assertions.assertEquals(1237347078053939435L, model.usedBytes()); } } 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 86209d8304940..d9c87801aee07 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\":\"iv\",\"privateEndpointId\":\"oyzunbixxr\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"vzrrryveimi\",\"privateEndpointId\":\"kdyzatvfuzk\"}") .toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("iv", model.virtualNetworkId()); - Assertions.assertEquals("oyzunbixxr", model.privateEndpointId()); + Assertions.assertEquals("vzrrryveimi", model.virtualNetworkId()); + Assertions.assertEquals("kdyzatvfuzk", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { KeyVaultPrivateEndpoint model - = new KeyVaultPrivateEndpoint().withVirtualNetworkId("iv").withPrivateEndpointId("oyzunbixxr"); + = new KeyVaultPrivateEndpoint().withVirtualNetworkId("vzrrryveimi").withPrivateEndpointId("kdyzatvfuzk"); model = BinaryData.fromObject(model).toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("iv", model.virtualNetworkId()); - Assertions.assertEquals("oyzunbixxr", model.privateEndpointId()); + Assertions.assertEquals("vzrrryveimi", model.virtualNetworkId()); + Assertions.assertEquals("kdyzatvfuzk", 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 a1255021b2433..91f635dd9ff37 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java @@ -12,21 +12,20 @@ public final class LdapSearchScopeOptTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LdapSearchScopeOpt model = BinaryData - .fromString("{\"userDN\":\"efojyqdhcupl\",\"groupDN\":\"lcwkhihihlhz\",\"groupMembershipFilter\":\"qtz\"}") + .fromString("{\"userDN\":\"qzvs\",\"groupDN\":\"fxjelg\",\"groupMembershipFilter\":\"pzqjhhhq\"}") .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("efojyqdhcupl", model.userDN()); - Assertions.assertEquals("lcwkhihihlhz", model.groupDN()); - Assertions.assertEquals("qtz", model.groupMembershipFilter()); + Assertions.assertEquals("qzvs", model.userDN()); + Assertions.assertEquals("fxjelg", model.groupDN()); + Assertions.assertEquals("pzqjhhhq", 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("qzvs").withGroupDN("fxjelg").withGroupMembershipFilter("pzqjhhhq"); model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("efojyqdhcupl", model.userDN()); - Assertions.assertEquals("lcwkhihihlhz", model.groupDN()); - Assertions.assertEquals("qtz", model.groupMembershipFilter()); + Assertions.assertEquals("qzvs", model.userDN()); + Assertions.assertEquals("fxjelg", model.groupDN()); + Assertions.assertEquals("pzqjhhhq", model.groupMembershipFilter()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseTests.java index b9c64f90e2383..2a93be9ddb86d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseTests.java @@ -13,13 +13,13 @@ public final class ListQuotaReportResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListQuotaReportResponse model = BinaryData.fromString( - "{\"quotaReportRecords\":[{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"fgohdneuelfphs\",\"quotaLimitUsedInKiBs\":1349537857571177270,\"quotaLimitTotalInKiBs\":5565577585562531934,\"percentageUsed\":8.611751,\"isDerivedQuota\":true},{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"uuvxz\",\"quotaLimitUsedInKiBs\":6214959618688242083,\"quotaLimitTotalInKiBs\":5272627491576584483,\"percentageUsed\":85.04829,\"isDerivedQuota\":false}]}") + "{\"quotaReportRecords\":[{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"apnedgfbcvkc\",\"quotaLimitUsedInKiBs\":3312819565675205010,\"quotaLimitTotalInKiBs\":5181138864066743428,\"percentageUsed\":71.283,\"isDerivedQuota\":true}]}") .toObject(ListQuotaReportResponse.class); - Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, model.quotaReportRecords().get(0).quotaType()); - Assertions.assertEquals("fgohdneuelfphs", model.quotaReportRecords().get(0).quotaTarget()); - Assertions.assertEquals(1349537857571177270L, model.quotaReportRecords().get(0).quotaLimitUsedInKiBs()); - Assertions.assertEquals(5565577585562531934L, model.quotaReportRecords().get(0).quotaLimitTotalInKiBs()); - Assertions.assertEquals(8.611751F, model.quotaReportRecords().get(0).percentageUsed()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, model.quotaReportRecords().get(0).quotaType()); + Assertions.assertEquals("apnedgfbcvkc", model.quotaReportRecords().get(0).quotaTarget()); + Assertions.assertEquals(3312819565675205010L, model.quotaReportRecords().get(0).quotaLimitUsedInKiBs()); + Assertions.assertEquals(5181138864066743428L, model.quotaReportRecords().get(0).quotaLimitTotalInKiBs()); + Assertions.assertEquals(71.283F, model.quotaReportRecords().get(0).percentageUsed()); Assertions.assertTrue(model.quotaReportRecords().get(0).isDerivedQuota()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResultInnerTests.java index 564ef4fac1090..909d7b44a74a1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResultInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResultInnerTests.java @@ -13,16 +13,16 @@ public final class ListQuotaReportResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListQuotaReportResultInner model = BinaryData.fromString( - "{\"properties\":{\"quotaReportRecords\":[{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"rp\",\"quotaLimitUsedInKiBs\":6658700841087644517,\"quotaLimitTotalInKiBs\":7314064083806104439,\"percentageUsed\":94.64696,\"isDerivedQuota\":false}]}}") + "{\"properties\":{\"quotaReportRecords\":[{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"cffgdkzzewk\",\"quotaLimitUsedInKiBs\":4567739994281506426,\"quotaLimitTotalInKiBs\":3759321515093630418,\"percentageUsed\":37.34096,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"fuflrwdmhdlx\",\"quotaLimitUsedInKiBs\":7850988880022269702,\"quotaLimitTotalInKiBs\":5460739394049509501,\"percentageUsed\":47.93144,\"isDerivedQuota\":true}]}}") .toObject(ListQuotaReportResultInner.class); - Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, + Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, model.properties().quotaReportRecords().get(0).quotaType()); - Assertions.assertEquals("rp", model.properties().quotaReportRecords().get(0).quotaTarget()); - Assertions.assertEquals(6658700841087644517L, + Assertions.assertEquals("cffgdkzzewk", model.properties().quotaReportRecords().get(0).quotaTarget()); + Assertions.assertEquals(4567739994281506426L, model.properties().quotaReportRecords().get(0).quotaLimitUsedInKiBs()); - Assertions.assertEquals(7314064083806104439L, + Assertions.assertEquals(3759321515093630418L, model.properties().quotaReportRecords().get(0).quotaLimitTotalInKiBs()); - Assertions.assertEquals(94.64696F, model.properties().quotaReportRecords().get(0).percentageUsed()); + Assertions.assertEquals(37.34096F, model.properties().quotaReportRecords().get(0).percentageUsed()); Assertions.assertFalse(model.properties().quotaReportRecords().get(0).isDerivedQuota()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java index fb2ed725e060a..fb7c91da72df8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java @@ -14,12 +14,12 @@ public final class ListReplicationsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListReplications model = BinaryData.fromString( - "{\"value\":[{\"replicationId\":\"rsc\",\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"fiwjmygtdssls\",\"remoteVolumeRegion\":\"mweriofzpy\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-06-06T05:20:48Z\",\"replicationDeletionTime\":\"2021-07-25T08:24:12Z\"}],\"nextLink\":\"ets\"}") + "{\"value\":[{\"replicationId\":\"iwjmygtdssls\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"iofz\",\"remoteVolumeRegion\":\"qsemwabne\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-10-30T21:23:13Z\",\"replicationDeletionTime\":\"2021-03-13T20:20:01Z\"},{\"replicationId\":\"d\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"ubmwmbesld\",\"remoteVolumeRegion\":\"wwtppj\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-04-04T02:55:07Z\",\"replicationDeletionTime\":\"2021-06-10T22:36:54Z\"},{\"replicationId\":\"konzmnsik\",\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"qqkdltfzxmhhvhgu\",\"remoteVolumeRegion\":\"odkwobd\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-02-18T16:18:57Z\",\"replicationDeletionTime\":\"2021-02-24T08:44:41Z\"}],\"nextLink\":\"xbxwa\"}") .toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("fiwjmygtdssls", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("mweriofzpy", model.value().get(0).remoteVolumeRegion()); - Assertions.assertEquals("ets", model.nextLink()); + Assertions.assertEquals(EndpointType.DST, model.value().get(0).endpointType()); + Assertions.assertEquals(ReplicationSchedule.DAILY, model.value().get(0).replicationSchedule()); + Assertions.assertEquals("iofz", model.value().get(0).remoteVolumeResourceId()); + Assertions.assertEquals("qsemwabne", model.value().get(0).remoteVolumeRegion()); + Assertions.assertEquals("xbxwa", model.nextLink()); } } 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 e02a24426ad98..fa5705625f752 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,17 +16,20 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"71f242b3-cf12-477c-9dfd-74438191e5aa\",\"tenantId\":\"fa67d6cf-56f8-4218-bf02-a08d95473259\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"kxzt\":{\"principalId\":\"7f304550-0f42-4faf-a22b-fd6c3ed7290b\",\"clientId\":\"46940037-bf1f-4237-8748-186047a29fe6\"}}}") + "{\"principalId\":\"ba67eb2b-016b-42ad-8a3f-2b8a15dad309\",\"tenantId\":\"0c2b709d-2ad2-4d90-aeed-3fed7ef9161f\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"hmgorffukiscv\":{\"principalId\":\"1072b5f9-ba6e-4e13-b29f-41dc64d6dfaf\",\"clientId\":\"b102c956-42cd-4dd5-aaaa-1c222ae4c6e7\"},\"hwplefaxvx\":{\"principalId\":\"15622637-0b22-43bf-9df4-7ba1a3d054a6\",\"clientId\":\"8cd8d0e7-07a8-4995-9308-531f652c17e3\"},\"btgn\":{\"principalId\":\"c89a73c1-1c23-4659-a552-ffd968b65380\",\"clientId\":\"d4da3c60-917d-4f13-b51d-189e30ef75df\"},\"eyqxtjjfzql\":{\"principalId\":\"73449efc-927b-47d0-9852-4edc40e0d23f\",\"clientId\":\"ba59661e-d02f-4458-9f28-1cc46f424433\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("kxzt", new UserAssignedIdentity())); + ManagedServiceIdentity model + = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("hmgorffukiscv", new UserAssignedIdentity(), "hwplefaxvx", new UserAssignedIdentity(), "btgn", + new UserAssignedIdentity(), "eyqxtjjfzql", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java index a4385ecf97a8a..f3bd599311b6e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java @@ -12,27 +12,27 @@ public final class MonthlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonthlySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":931393503,\"daysOfMonth\":\"fsynljphuop\",\"hour\":1015065537,\"minute\":596393327,\"usedBytes\":2347535510676514797}") + "{\"snapshotsToKeep\":497457134,\"daysOfMonth\":\"uopxodlqiyntor\",\"hour\":1915861757,\"minute\":1980865507,\"usedBytes\":9128276167784679496}") .toObject(MonthlySchedule.class); - Assertions.assertEquals(931393503, model.snapshotsToKeep()); - Assertions.assertEquals("fsynljphuop", model.daysOfMonth()); - Assertions.assertEquals(1015065537, model.hour()); - Assertions.assertEquals(596393327, model.minute()); - Assertions.assertEquals(2347535510676514797L, model.usedBytes()); + Assertions.assertEquals(497457134, model.snapshotsToKeep()); + Assertions.assertEquals("uopxodlqiyntor", model.daysOfMonth()); + Assertions.assertEquals(1915861757, model.hour()); + Assertions.assertEquals(1980865507, model.minute()); + Assertions.assertEquals(9128276167784679496L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(931393503) - .withDaysOfMonth("fsynljphuop") - .withHour(1015065537) - .withMinute(596393327) - .withUsedBytes(2347535510676514797L); + MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(497457134) + .withDaysOfMonth("uopxodlqiyntor") + .withHour(1915861757) + .withMinute(1980865507) + .withUsedBytes(9128276167784679496L); model = BinaryData.fromObject(model).toObject(MonthlySchedule.class); - Assertions.assertEquals(931393503, model.snapshotsToKeep()); - Assertions.assertEquals("fsynljphuop", model.daysOfMonth()); - Assertions.assertEquals(1015065537, model.hour()); - Assertions.assertEquals(596393327, model.minute()); - Assertions.assertEquals(2347535510676514797L, model.usedBytes()); + Assertions.assertEquals(497457134, model.snapshotsToKeep()); + Assertions.assertEquals("uopxodlqiyntor", model.daysOfMonth()); + Assertions.assertEquals(1915861757, model.hour()); + Assertions.assertEquals(1980865507, model.minute()); + Assertions.assertEquals(9128276167784679496L, model.usedBytes()); } } 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 ccc3609fd20bf..6b667f3f5f757 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\":1547881382,\"default\":1316408271,\"usage\":234206278},\"id\":\"qnzrd\",\"name\":\"sovwxznptgoeiyb\",\"type\":\"abpfhvfs\"}"; + = "{\"properties\":{\"current\":171157881,\"default\":1571331551,\"usage\":1687194645},\"id\":\"whlxl\",\"name\":\"wyrmouv\",\"type\":\"lgmokzkl\"}"; 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("bjwgnyfus", "zsvtuikzhajqgl", "fh", com.azure.core.util.Context.NONE) + .getWithResponse("xwhydtluvv", "ds", "zsn", 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 18ef95a985780..f2b0723dcd206 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\":1611438793,\"default\":664139919,\"usage\":300950097},\"id\":\"ygznmmaxrizk\",\"name\":\"obgop\",\"type\":\"lhslnelxieixyn\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":1606925118,\"default\":1858893450,\"usage\":950614024},\"id\":\"bfqz\",\"name\":\"kfnjyixhafrat\",\"type\":\"xmbjroum\"}]}"; 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.netAppResourceQuotaLimitsAccounts() - .list("kvntjlrigjkskyri", "ovzidsx", com.azure.core.util.Context.NONE); + .list("rfowtdvrfmvlih", "vjdrqcrjidhftuk", 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 72615939b70c6..1af13d4f37abf 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\":78336255,\"default\":1039817424,\"usage\":1292998556},\"id\":\"vx\",\"name\":\"cwxhmpej\",\"type\":\"lkexaonwivkcqh\"}"; + = "{\"properties\":{\"current\":892423167,\"default\":791249030,\"usage\":324306347},\"id\":\"izwbx\",\"name\":\"debxlayunomirhpf\",\"type\":\"benqlamwmg\"}"; 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("noakiz", "oaiknaqlnuwig", com.azure.core.util.Context.NONE) + .getWithResponse("caddtgc", "xegtvgwyur", 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 deec0b65ef72f..b35585e0b230d 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\":48936837,\"default\":1452730884,\"usage\":1658282432},\"id\":\"jubyqjfkakfq\",\"name\":\"rke\",\"type\":\"yildudxjascow\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":2051516270,\"default\":1015584287,\"usage\":2078056974},\"id\":\"tbhemhcucs\",\"name\":\"snxfbxu\",\"type\":\"eapdrbzyv\"}]}"; 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("xhxknlc", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimits().list("way", 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 d53553db55017..78b450b58b1c7 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\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"hlkks\",\"isAvailable\":false},{\"availabilityZone\":\"vyfijdkzuqnw\",\"isAvailable\":true},{\"availabilityZone\":\"uqoly\",\"isAvailable\":false}]},\"id\":\"qwqul\",\"name\":\"utrjbhxyk\",\"type\":\"hyqezvqq\"}"; + = "{\"properties\":{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"kaxpfobkzhmh\",\"isAvailable\":false},{\"availabilityZone\":\"tdeluqrojadhfzt\",\"isAvailable\":true},{\"availabilityZone\":\"srkgz\",\"isAvailable\":true},{\"availabilityZone\":\"dbkuwpzqxlcwe\",\"isAvailable\":false}]},\"id\":\"cjvxfaqufqizjv\",\"name\":\"pwooajeyyj\",\"type\":\"jjx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionInfoResource response - = manager.netAppResourceRegionInfos().getWithResponse("f", com.azure.core.util.Context.NONE).getValue(); + = manager.netAppResourceRegionInfos().getWithResponse("su", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - response.storageToNetworkProximity()); - Assertions.assertEquals("hlkks", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T2, response.storageToNetworkProximity()); + Assertions.assertEquals("kaxpfobkzhmh", 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 b43734a92feb9..e544f154ccabe 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\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"exreu\",\"isAvailable\":false},{\"availabilityZone\":\"tljvfwhreagkhyx\",\"isAvailable\":false},{\"availabilityZone\":\"vbczsulmdg\",\"isAvailable\":false}]},\"id\":\"pjpfseykgs\",\"name\":\"ngpszngafpg\",\"type\":\"lkvec\"}]}"; + = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ttgzkjtyq\",\"isAvailable\":false}]},\"id\":\"d\",\"name\":\"ghztldsvc\",\"type\":\"djiah\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.netAppResourceRegionInfos().list("g", com.azure.core.util.Context.NONE); + = manager.netAppResourceRegionInfos().list("zxpxhn", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("exreu", + Assertions.assertEquals("ttgzkjtyq", response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(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 aa82fcea0436b..3f67ff7619e1a 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\":\"z\",\"name\":{\"value\":\"t\",\"localizedValue\":\"plvukaobrlbpg\"},\"properties\":{\"currentValue\":1893797286,\"limit\":2049519824,\"unit\":\"hjhgem\"}}"; + = "{\"id\":\"kayrgwy\",\"name\":{\"value\":\"opdweoft\",\"localizedValue\":\"rwaigsioctqkmv\"},\"properties\":{\"currentValue\":1315558974,\"limit\":527386983,\"unit\":\"ffhtjnw\"}}"; 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("dbckyo", "kxkxhnegk", com.azure.core.util.Context.NONE) + .getWithResponse("izwgsoriobijeiyd", "euynh", 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 b52a2a7bda710..a6dd30c6dbd87 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\":\"gxnoqrxtdis\",\"name\":{\"value\":\"vhdl\",\"localizedValue\":\"did\"},\"properties\":{\"currentValue\":1268524253,\"limit\":1804089287,\"unit\":\"tjfdoesxxhmw\"}}]}"; + = "{\"value\":[{\"id\":\"paslavxjfiuofpi\",\"name\":{\"value\":\"zlvssq\",\"localizedValue\":\"jopackyhydv\"},\"properties\":{\"currentValue\":905923692,\"limit\":489547867,\"unit\":\"millxgjs\"}}]}"; 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("vxhmtfhocnxzcmj", com.azure.core.util.Context.NONE); + = manager.netAppResourceUsages().list("xrkgjn", 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 fe317b529ec2f..58f06c277603f 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\":\"Invalid\",\"message\":\"mehllizhceu\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"bvwglgwzp\"}"; 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("ygzmxieqvdsmak", - new FilePathAvailabilityRequest().withName("ixqcahyhxalybxaw") - .withSubnetId("ijpodtblxpkkwj") - .withAvailabilityZone("odqhyk"), + .checkFilePathAvailabilityWithResponse("jwpdkkt", + new FilePathAvailabilityRequest().withName("mbmxbmbrwgzzxl") + .withSubnetId("bkhxsdplaum") + .withAvailabilityZone("mhweqjfyxyd"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertFalse(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("mehllizhceu", response.message()); + Assertions.assertEquals("bvwglgwzp", 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 095224fa592e9..0cedba2d76d04 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\":\"skieca\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"uuxjxhfx\"}"; 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("ufanray", - new ResourceNameAvailabilityRequest().withName("fueqfrojs") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) - .withResourceGroup("grhydk"), + .checkNameAvailabilityWithResponse("dofuckclb", + new ResourceNameAvailabilityRequest().withName("xlu") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS) + .withResourceGroup("solzwilfngo"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("skieca", response.message()); + Assertions.assertFalse(response.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); + Assertions.assertEquals("uuxjxhfx", 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 6a7522cdb665c..6e1f7ae966bc1 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\":\"Invalid\",\"message\":\"swzsnuyemlowuo\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"yjrcbqpb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - CheckAvailabilityResponse response - = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("oqodkadpp", new QuotaAvailabilityRequest().withName("ibngqladyw") - .withType( - CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("whydt"), com.azure.core.util.Context.NONE) - .getValue(); + CheckAvailabilityResponse response = manager.netAppResources() + .checkQuotaAvailabilityWithResponse("xakglhpsesrfg", + new QuotaAvailabilityRequest().withName("mqiydvxcgdh") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("goqg"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertFalse(response.isAvailable()); + Assertions.assertTrue(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("swzsnuyemlowuo", response.message()); + Assertions.assertEquals("yjrcbqpb", 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 32e5d14f8a2b3..064fedd84de0c 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\":\"fqz\",\"subnetId\":\"fnjyix\",\"networkSiblingSetStateId\":\"fratqxmbjroumzz\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"uzgfxonjtpusl\",\"volumeResourceIds\":[\"pvti\",\"tzbpdbollgry\",\"qiuasigrows\",\"c\"]},{\"ipAddress\":\"quygdjboqgrmtq\",\"volumeResourceIds\":[\"evadrmmwiu\",\"wvcmj\",\"kxiidisczskoswo\"]},{\"ipAddress\":\"qazu\",\"volumeResourceIds\":[\"xzkrrcoi\",\"sbamnppcc\"]},{\"ipAddress\":\"u\",\"volumeResourceIds\":[\"sbezaxyfukzxuizh\",\"hnepkpeti\",\"rx\"]}]}"; + = "{\"networkSiblingSetId\":\"pmjen\",\"subnetId\":\"eat\",\"networkSiblingSetStateId\":\"xxcrxoxdjxld\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"kd\",\"volumeResourceIds\":[\"ndwdbvx\",\"zaledoyqxlunkf\",\"hmcxqqxmyzkl\",\"oanpohrvm\"]},{\"ipAddress\":\"qr\",\"volumeResourceIds\":[\"divznl\"]},{\"ipAddress\":\"slkskhjqjpvbai\",\"volumeResourceIds\":[\"tgzgta\",\"ywbqgroigbsfsgs\",\"enwl\"]},{\"ipAddress\":\"mhljqlxspm\",\"volumeResourceIds\":[\"tryldsxebuhsxr\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,18 @@ public void testQueryNetworkSiblingSetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - NetworkSiblingSet response = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("fmvlihcvjdrqc", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("jidhftu").withSubnetId("vhdxlwyo"), - com.azure.core.util.Context.NONE) - .getValue(); + NetworkSiblingSet response + = manager.netAppResources() + .queryNetworkSiblingSetWithResponse("cfocz", + new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("apejovtkwx") + .withSubnetId("hwhhnoyrzaaoe"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("fqz", response.networkSiblingSetId()); - Assertions.assertEquals("fnjyix", response.subnetId()); - Assertions.assertEquals("fratqxmbjroumzz", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); - Assertions.assertEquals("pvti", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("pmjen", response.networkSiblingSetId()); + Assertions.assertEquals("eat", response.subnetId()); + Assertions.assertEquals("xxcrxoxdjxld", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); + Assertions.assertEquals("ndwdbvx", 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 c172a60641249..d22c0d0fc8a59 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\":\"AcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"kzkltrfowt\",\"isAvailable\":true}]}"; + = "{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"hneao\",\"isAvailable\":false},{\"availabilityZone\":\"jztivfwjlofzek\",\"isAvailable\":false},{\"availabilityZone\":\"aukl\",\"isAvailable\":false}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testQueryRegionInfoWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionInfo response = manager.netAppResources() - .queryRegionInfoWithResponse("hlxlnwyrmou", com.azure.core.util.Context.NONE) + .queryRegionInfoWithResponse("spglq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.ACROSS_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("kzkltrfowt", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, response.storageToNetworkProximity()); + Assertions.assertEquals("hneao", 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 13335cbc4689a..d57c8cdf5724c 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\":\"kiofkbt\",\"subnetId\":\"hklbnldpvcbh\",\"networkSiblingSetStateId\":\"zyqu\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"pbrruyu\",\"volumeResourceIds\":[\"vlm\",\"jwcolbm\",\"lbnwtpcpahp\",\"z\"]}]}"; + = "{\"networkSiblingSetId\":\"aytujraxdtpryjm\",\"subnetId\":\"nsewouxl\",\"networkSiblingSetStateId\":\"s\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"e\",\"volumeResourceIds\":[\"ehqqylm\"]},{\"ipAddress\":\"twjwdsdlzm\",\"volumeResourceIds\":[\"rxxxoteehkhowgom\",\"vhxowpcbapnpxra\",\"awbmpsp\",\"eylqlocvvujexayg\"]}]}"; 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("iubxdukec", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("xdazv") - .withSubnetId("hctmmkosz") - .withNetworkSiblingSetStateId("dblnsntrp") - .withNetworkFeatures(NetworkFeatures.STANDARD), + .updateNetworkSiblingSet("nmgsdaluyckhef", + new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("b") + .withSubnetId("s") + .withNetworkSiblingSetStateId("uerbgpxebjl") + .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD), com.azure.core.util.Context.NONE); - Assertions.assertEquals("kiofkbt", response.networkSiblingSetId()); - Assertions.assertEquals("hklbnldpvcbh", response.subnetId()); - Assertions.assertEquals("zyqu", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); - Assertions.assertEquals("vlm", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("aytujraxdtpryjm", response.networkSiblingSetId()); + Assertions.assertEquals("nsewouxl", response.subnetId()); + Assertions.assertEquals("s", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); + Assertions.assertEquals("ehqqylm", 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 ee6c5660a24be..e90261f30d750 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\":\"mlovuanashcxl\",\"subnetId\":\"jerbdkelvidizozs\",\"networkSiblingSetStateId\":\"ccxjm\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"cypuuwwlt\",\"volumeResourceIds\":[\"jctzenkei\",\"zzhmkd\",\"svflyhbxcudch\"]}]}") + "{\"networkSiblingSetId\":\"sknxrwzawnvsbcf\",\"subnetId\":\"agxnvhycvdimw\",\"networkSiblingSetStateId\":\"regzgyufutrwpwer\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"eotta\",\"volumeResourceIds\":[\"osxw\"]},{\"ipAddress\":\"nhjtf\",\"volumeResourceIds\":[\"dpmiljpn\"]}]}") .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("mlovuanashcxl", model.networkSiblingSetId()); - Assertions.assertEquals("jerbdkelvidizozs", model.subnetId()); - Assertions.assertEquals("ccxjm", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - Assertions.assertEquals("jctzenkei", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("sknxrwzawnvsbcf", model.networkSiblingSetId()); + Assertions.assertEquals("agxnvhycvdimw", model.subnetId()); + Assertions.assertEquals("regzgyufutrwpwer", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); + Assertions.assertEquals("osxw", model.nicInfoList().get(0).volumeResourceIds().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java index 807323aedd6cf..e7cce0dad3279 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.java @@ -11,17 +11,17 @@ public final class NfsUserTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NfsUser model = BinaryData.fromString("{\"userId\":2888604604095787464,\"groupId\":1984567885441821225}") + NfsUser model = BinaryData.fromString("{\"userId\":2846291659760253765,\"groupId\":3689639500291816317}") .toObject(NfsUser.class); - Assertions.assertEquals(2888604604095787464L, model.userId()); - Assertions.assertEquals(1984567885441821225L, model.groupId()); + Assertions.assertEquals(2846291659760253765L, model.userId()); + Assertions.assertEquals(3689639500291816317L, model.groupId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NfsUser model = new NfsUser().withUserId(2888604604095787464L).withGroupId(1984567885441821225L); + NfsUser model = new NfsUser().withUserId(2846291659760253765L).withGroupId(3689639500291816317L); model = BinaryData.fromObject(model).toObject(NfsUser.class); - Assertions.assertEquals(2888604604095787464L, model.userId()); - Assertions.assertEquals(1984567885441821225L, model.groupId()); + Assertions.assertEquals(2846291659760253765L, model.userId()); + Assertions.assertEquals(3689639500291816317L, model.groupId()); } } 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 29979eaf98733..ed5f9e142d46e 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\":\"srboldforobw\",\"volumeResourceIds\":[\"izbfhfovvacq\",\"btuodxeszabbel\"]}") + .fromString("{\"ipAddress\":\"nudqllz\",\"volumeResourceIds\":[\"zp\",\"lxeehuxiq\",\"zlrayme\"]}") .toObject(NicInfo.class); - Assertions.assertEquals("izbfhfovvacq", model.volumeResourceIds().get(0)); + Assertions.assertEquals("zp", 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 ebe8d7681c8a1..ed19850d6ac82 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\":\"bsnmfpph\",\"display\":{\"provider\":\"evy\",\"resource\":\"hsgz\",\"operation\":\"zbgomfgbeg\",\"description\":\"gleohi\"},\"origin\":\"tnluankrr\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"tijv\",\"displayName\":\"vbmqzbqq\",\"displayDescription\":\"aj\",\"unit\":\"wxacevehj\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"gaoql\",\"faey\"],\"internalMetricName\":\"nm\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"irpghriypoqeyh\",\"sourceMdmNamespace\":\"h\",\"dimensions\":[{},{}],\"aggregationType\":\"lpyznuciqdsmexi\",\"fillGapWithZero\":false,\"category\":\"uxtyasiibmi\",\"resourceIdDimensionNameOverride\":\"nnust\",\"isInternal\":true},{\"name\":\"hnmgixhcm\",\"displayName\":\"mqfoudorh\",\"displayDescription\":\"yyprotwyp\",\"unit\":\"d\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"mjkavlgorbmft\",\"mdtzfjltfvnzc\",\"jtotpvopvpbd\",\"zq\"],\"internalMetricName\":\"q\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"svqwthmkyibc\",\"sourceMdmNamespace\":\"ihsgq\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"ohsdtmcd\",\"fillGapWithZero\":true,\"category\":\"cohdx\",\"resourceIdDimensionNameOverride\":\"lm\",\"isInternal\":true},{\"name\":\"pcvhdbevwqqxeys\",\"displayName\":\"nqzi\",\"displayDescription\":\"fkbg\",\"unit\":\"bowxe\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"ygvkzqkjj\",\"okbzef\",\"zrxcczurt\"],\"internalMetricName\":\"ipqxbkwvzgnzv\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"d\",\"sourceMdmNamespace\":\"zmqpnodawopqhewj\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"gsbos\",\"fillGapWithZero\":false,\"category\":\"ndlatutmzlbi\",\"resourceIdDimensionNameOverride\":\"lvfhrbbp\",\"isInternal\":false},{\"name\":\"cwwyyur\",\"displayName\":\"chpp\",\"displayDescription\":\"rsnm\",\"unit\":\"ayzejnhlbkpbz\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"hzvechndbnwieho\"],\"internalMetricName\":\"wjwiuub\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"sfapaqtferrq\",\"sourceMdmNamespace\":\"x\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"xap\",\"fillGapWithZero\":false,\"category\":\"qqnobpudcd\",\"resourceIdDimensionNameOverride\":\"tqwpwya\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"bucljgkyexaogu\",\"displayName\":\"i\"},{\"name\":\"dsdaultxijjumf\",\"displayName\":\"azlnqnmcjngzqdqx\"}]}}}]}"; + = "{\"value\":[{\"name\":\"anniyopetxivcnr\",\"display\":{\"provider\":\"nucaephblkwqpat\",\"resource\":\"qsdtcjbctvivuzq\",\"operation\":\"tuowogtgitsqh\",\"description\":\"b\"},\"origin\":\"cdb\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"scxmxeat\",\"displayName\":\"bmwnrdjyibqb\",\"displayDescription\":\"omhjrmkuhm\",\"unit\":\"ljalfihcjmobc\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"xqcwgax\",\"gvaknokzwjjzrl\",\"ixldzyyfy\"],\"internalMetricName\":\"qsix\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"ujivyqlkjuvsm\",\"sourceMdmNamespace\":\"slzoyov\",\"dimensions\":[{},{},{}],\"aggregationType\":\"pqvyb\",\"fillGapWithZero\":false,\"category\":\"mx\",\"resourceIdDimensionNameOverride\":\"kcvtl\",\"isInternal\":true},{\"name\":\"skvcuartrhunl\",\"displayName\":\"rykycndzfqivjr\",\"displayDescription\":\"ykbbmnwagltbxoe\",\"unit\":\"nqlnfwmyymvqd\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"ezcrcssbzhddubb\",\"qfblhkalehpa\",\"awugiqjti\",\"gqgdminictteajoh\"],\"internalMetricName\":\"gspnbonhpczykm\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"wxqcsehchkhufmpq\",\"sourceMdmNamespace\":\"q\",\"dimensions\":[{}],\"aggregationType\":\"dzulo\",\"fillGapWithZero\":false,\"category\":\"uzanhsfnhsenwphp\",\"resourceIdDimensionNameOverride\":\"ngqjclidf\",\"isInternal\":false},{\"name\":\"jj\",\"displayName\":\"wbeqrkuor\",\"displayDescription\":\"ssruqnmdvhazcvj\",\"unit\":\"iqswbqer\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"dgukvlbpktgds\",\"youambewr\",\"swmowegmmuteyxe\"],\"internalMetricName\":\"uqi\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"itnspxlzde\",\"sourceMdmNamespace\":\"grijwaiufanrayb\",\"dimensions\":[{},{}],\"aggregationType\":\"frojsydgr\",\"fillGapWithZero\":true,\"category\":\"ygywe\",\"resourceIdDimensionNameOverride\":\"kiecafygzm\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"smaklixqcahy\",\"displayName\":\"alybxawoijpo\"},{\"name\":\"blxpkkwjdjodq\",\"displayName\":\"kincnremeh\"},{\"name\":\"izhceumoqodkadp\",\"displayName\":\"ibngqladyw\"}]}}}]}"; 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("bsnmfpph", response.iterator().next().name()); - Assertions.assertEquals("evy", response.iterator().next().display().provider()); - Assertions.assertEquals("hsgz", response.iterator().next().display().resource()); - Assertions.assertEquals("zbgomfgbeg", response.iterator().next().display().operation()); - Assertions.assertEquals("gleohi", response.iterator().next().display().description()); - Assertions.assertEquals("tnluankrr", response.iterator().next().origin()); - Assertions.assertEquals("tijv", + Assertions.assertEquals("anniyopetxivcnr", response.iterator().next().name()); + Assertions.assertEquals("nucaephblkwqpat", response.iterator().next().display().provider()); + Assertions.assertEquals("qsdtcjbctvivuzq", response.iterator().next().display().resource()); + Assertions.assertEquals("tuowogtgitsqh", response.iterator().next().display().operation()); + Assertions.assertEquals("b", response.iterator().next().display().description()); + Assertions.assertEquals("cdb", response.iterator().next().origin()); + Assertions.assertEquals("scxmxeat", response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("vbmqzbqq", + Assertions.assertEquals("bmwnrdjyibqb", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("aj", + Assertions.assertEquals("omhjrmkuhm", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("wxacevehj", + Assertions.assertEquals("ljalfihcjmobc", 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("gaoql", + Assertions.assertEquals("xqcwgax", response.iterator() .next() .serviceSpecification() @@ -64,21 +64,21 @@ public void testList() throws Exception { .get(0) .supportedTimeGrainTypes() .get(0)); - Assertions.assertEquals("nm", + Assertions.assertEquals("qsix", response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertTrue( + Assertions.assertFalse( response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("irpghriypoqeyh", + Assertions.assertEquals("ujivyqlkjuvsm", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("h", + Assertions.assertEquals("slzoyov", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("lpyznuciqdsmexi", + Assertions.assertEquals("pqvyb", response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); Assertions.assertFalse( response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("uxtyasiibmi", + Assertions.assertEquals("mx", response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("nnust", + Assertions.assertEquals("kcvtl", response.iterator() .next() .serviceSpecification() @@ -87,9 +87,9 @@ public void testList() throws Exception { .resourceIdDimensionNameOverride()); Assertions .assertTrue(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("bucljgkyexaogu", + Assertions.assertEquals("smaklixqcahy", response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("i", + Assertions.assertEquals("alybxawoijpo", response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java index 7ea22ef39d341..c659acb11bd7a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.java @@ -13,24 +13,24 @@ public final class OriginClusterInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OriginClusterInformation model = BinaryData.fromString( - "{\"peerClusterName\":\"rxkpmloazuruoc\",\"peerAddresses\":[\"oorb\",\"eoybfhjxakvvjgs\"],\"peerVserverName\":\"ordilmywwtkgkxny\",\"peerVolumeName\":\"dabg\"}") + "{\"peerClusterName\":\"cib\",\"peerAddresses\":[\"mowuxrk\"],\"peerVserverName\":\"pvdwxf\",\"peerVolumeName\":\"wiivwzjbhyzsx\"}") .toObject(OriginClusterInformation.class); - Assertions.assertEquals("rxkpmloazuruoc", model.peerClusterName()); - Assertions.assertEquals("oorb", model.peerAddresses().get(0)); - Assertions.assertEquals("ordilmywwtkgkxny", model.peerVserverName()); - Assertions.assertEquals("dabg", model.peerVolumeName()); + Assertions.assertEquals("cib", model.peerClusterName()); + Assertions.assertEquals("mowuxrk", model.peerAddresses().get(0)); + Assertions.assertEquals("pvdwxf", model.peerVserverName()); + Assertions.assertEquals("wiivwzjbhyzsx", model.peerVolumeName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OriginClusterInformation model = new OriginClusterInformation().withPeerClusterName("rxkpmloazuruoc") - .withPeerAddresses(Arrays.asList("oorb", "eoybfhjxakvvjgs")) - .withPeerVserverName("ordilmywwtkgkxny") - .withPeerVolumeName("dabg"); + OriginClusterInformation model = new OriginClusterInformation().withPeerClusterName("cib") + .withPeerAddresses(Arrays.asList("mowuxrk")) + .withPeerVserverName("pvdwxf") + .withPeerVolumeName("wiivwzjbhyzsx"); model = BinaryData.fromObject(model).toObject(OriginClusterInformation.class); - Assertions.assertEquals("rxkpmloazuruoc", model.peerClusterName()); - Assertions.assertEquals("oorb", model.peerAddresses().get(0)); - Assertions.assertEquals("ordilmywwtkgkxny", model.peerVserverName()); - Assertions.assertEquals("dabg", model.peerVolumeName()); + Assertions.assertEquals("cib", model.peerClusterName()); + Assertions.assertEquals("mowuxrk", model.peerAddresses().get(0)); + Assertions.assertEquals("pvdwxf", model.peerVserverName()); + Assertions.assertEquals("wiivwzjbhyzsx", model.peerVolumeName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java index 2d8e20448f337..4ebdfc2b00fd4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeerClusterForVolumeMigrationRequestTests.java @@ -13,16 +13,16 @@ public final class PeerClusterForVolumeMigrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PeerClusterForVolumeMigrationRequest model - = BinaryData.fromString("{\"peerIpAddresses\":[\"z\",\"nsikvmkqzeqqkdl\",\"fzxmhhvhgureodkw\"]}") + = BinaryData.fromString("{\"peerIpAddresses\":[\"muwlauwzizxbm\",\"gcj\",\"fuzmuvpbtt\"]}") .toObject(PeerClusterForVolumeMigrationRequest.class); - Assertions.assertEquals("z", model.peerIpAddresses().get(0)); + Assertions.assertEquals("muwlauwzizxbm", model.peerIpAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PeerClusterForVolumeMigrationRequest model = new PeerClusterForVolumeMigrationRequest() - .withPeerIpAddresses(Arrays.asList("z", "nsikvmkqzeqqkdl", "fzxmhhvhgureodkw")); + .withPeerIpAddresses(Arrays.asList("muwlauwzizxbm", "gcj", "fuzmuvpbtt")); model = BinaryData.fromObject(model).toObject(PeerClusterForVolumeMigrationRequest.class); - Assertions.assertEquals("z", model.peerIpAddresses().get(0)); + Assertions.assertEquals("muwlauwzizxbm", model.peerIpAddresses().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java index 166a868ce787e..5873964b3c94c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.java @@ -12,10 +12,10 @@ public final class PeeringPassphrasesInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PeeringPassphrasesInner model = BinaryData.fromString( - "{\"clusterPeeringCommand\":\"qedcgzulwm\",\"clusterPeeringPassphrase\":\"rqzz\",\"vserverPeeringCommand\":\"rjvpglydzgkrvqee\",\"criticalWarning\":\"oepry\"}") + "{\"clusterPeeringCommand\":\"brn\",\"clusterPeeringPassphrase\":\"suxmpraf\",\"vserverPeeringCommand\":\"g\",\"criticalWarning\":\"hocxvdfffwafqrou\"}") .toObject(PeeringPassphrasesInner.class); - Assertions.assertEquals("qedcgzulwm", model.clusterPeeringCommand()); - Assertions.assertEquals("rqzz", model.clusterPeeringPassphrase()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.vserverPeeringCommand()); + Assertions.assertEquals("brn", model.clusterPeeringCommand()); + Assertions.assertEquals("suxmpraf", model.clusterPeeringPassphrase()); + Assertions.assertEquals("g", model.vserverPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java index 9352e87a7f9a8..c71158ca24370 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java @@ -12,14 +12,14 @@ public final class PoolChangeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolChangeRequest model - = BinaryData.fromString("{\"newPoolResourceId\":\"tkoievseotgq\"}").toObject(PoolChangeRequest.class); - Assertions.assertEquals("tkoievseotgq", model.newPoolResourceId()); + = BinaryData.fromString("{\"newPoolResourceId\":\"zonosgg\"}").toObject(PoolChangeRequest.class); + Assertions.assertEquals("zonosgg", model.newPoolResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("tkoievseotgq"); + PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("zonosgg"); model = BinaryData.fromObject(model).toObject(PoolChangeRequest.class); - Assertions.assertEquals("tkoievseotgq", model.newPoolResourceId()); + Assertions.assertEquals("zonosgg", model.newPoolResourceId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java index 61b6bde4f3b2a..134976122b4f5 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\":3326683287722087129,\"qosType\":\"Auto\",\"coolAccess\":false,\"customThroughputMibps\":1699732408}") + "{\"size\":7768101030321083728,\"qosType\":\"Auto\",\"coolAccess\":true,\"customThroughputMibps\":577030893}") .toObject(PoolPatchProperties.class); - Assertions.assertEquals(3326683287722087129L, model.size()); + Assertions.assertEquals(7768101030321083728L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1699732408, model.customThroughputMibps()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(577030893, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolPatchProperties model = new PoolPatchProperties().withSize(3326683287722087129L) + PoolPatchProperties model = new PoolPatchProperties().withSize(7768101030321083728L) .withQosType(QosType.AUTO) - .withCoolAccess(false) - .withCustomThroughputMibps(1699732408); + .withCoolAccess(true) + .withCustomThroughputMibps(577030893); model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(3326683287722087129L, model.size()); + Assertions.assertEquals(7768101030321083728L, model.size()); Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1699732408, model.customThroughputMibps()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(577030893, 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 382423a03cab6..8e607d4d35a5b 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\":\"atjeaahh\",\"size\":4114436598788665667,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"akz\",\"totalThroughputMibps\":70.257355,\"utilizedThroughputMibps\":12.795037,\"customThroughputMibps\":371006756,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"}") + "{\"poolId\":\"jjjkxybwfdbk\",\"size\":6105885498860361682,\"serviceLevel\":\"Standard\",\"provisioningState\":\"nsvk\",\"totalThroughputMibps\":44.036495,\"utilizedThroughputMibps\":85.88036,\"customThroughputMibps\":605317874,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"}") .toObject(PoolProperties.class); - Assertions.assertEquals(4114436598788665667L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(371006756, model.customThroughputMibps()); + Assertions.assertEquals(6105885498860361682L, model.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); + Assertions.assertEquals(605317874, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(4114436598788665667L) - .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(371006756) + PoolProperties model = new PoolProperties().withSize(6105885498860361682L) + .withServiceLevel(ServiceLevel.STANDARD) + .withCustomThroughputMibps(605317874) .withQosType(QosType.MANUAL) - .withCoolAccess(false) - .withEncryptionType(EncryptionType.DOUBLE); + .withCoolAccess(true) + .withEncryptionType(EncryptionType.SINGLE); model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(4114436598788665667L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(371006756, model.customThroughputMibps()); + Assertions.assertEquals(6105885498860361682L, model.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); + Assertions.assertEquals(605317874, model.customThroughputMibps()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); + Assertions.assertTrue(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 582e06571fc11..b30f5e5529e36 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\":\"pkevmylt\",\"size\":3505428811532271860,\"serviceLevel\":\"Premium\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":93.264755,\"utilizedThroughputMibps\":36.27896,\"customThroughputMibps\":99692229,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"kqma\",\"location\":\"xvpif\",\"tags\":{\"yzeyuubeid\":\"ify\",\"gygvfltgvdiho\":\"zlfytoit\",\"ucpcunnuzdqumoen\":\"nkrxwetwkdrcy\",\"kaa\":\"dnaienhqhskndnel\"},\"id\":\"lknwfoanniyop\",\"name\":\"txiv\",\"type\":\"nrlyxnuc\"}"; + = "{\"properties\":{\"poolId\":\"ofuworimmovzwde\",\"size\":7624854819493359868,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":72.00156,\"utilizedThroughputMibps\":2.2986472,\"customThroughputMibps\":1587424466,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"wikfyaqandmym\",\"location\":\"oqjum\",\"tags\":{\"woxfaxdtnqifbsa\":\"fbpbvzopaxmfmvsm\",\"pcjycb\":\"roiauesugmo\",\"ini\":\"elrgttwfldsiuo\"},\"id\":\"cedpksriwmmtmqrx\",\"name\":\"zqv\",\"type\":\"yczyayubtgm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,25 +36,25 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapacityPool response = manager.pools() - .define("udqll") - .withRegion("yyshtuwgmevua") - .withExistingNetAppAccount("pmil", "pnwy") - .withSize(4681666947852693156L) + .define("ulpyuflq") + .withRegion("rzwimbzayspz") + .withExistingNetAppAccount("ccgndjgdprig", "qqyeqfcb") + .withSize(6055682167787761332L) .withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withTags(mapOf("qipxgzdyimsf", "zyifrkgwltx", "vk", "yorpr")) - .withCustomThroughputMibps(2108853731) + .withTags(mapOf("phmdzxplgtp", "etv")) + .withCustomThroughputMibps(2005398203) .withQosType(QosType.MANUAL) .withCoolAccess(false) - .withEncryptionType(EncryptionType.DOUBLE) + .withEncryptionType(EncryptionType.SINGLE) .create(); - Assertions.assertEquals("xvpif", response.location()); - Assertions.assertEquals("ify", response.tags().get("yzeyuubeid")); - Assertions.assertEquals(3505428811532271860L, response.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, response.serviceLevel()); - Assertions.assertEquals(99692229, response.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); - Assertions.assertTrue(response.coolAccess()); + Assertions.assertEquals("oqjum", response.location()); + Assertions.assertEquals("fbpbvzopaxmfmvsm", response.tags().get("woxfaxdtnqifbsa")); + Assertions.assertEquals(7624854819493359868L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); + Assertions.assertEquals(1587424466, response.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, response.qosType()); + Assertions.assertFalse(response.coolAccess()); Assertions.assertEquals(EncryptionType.SINGLE, response.encryptionType()); } 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 37be9e73038e7..b06fd04bbda34 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\":\"v\",\"size\":2472472449262308145,\"serviceLevel\":\"Premium\",\"provisioningState\":\"aqylkjztji\",\"totalThroughputMibps\":20.662773,\"utilizedThroughputMibps\":17.443895,\"customThroughputMibps\":864325945,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"zc\",\"location\":\"ltkrl\",\"tags\":{\"zhomp\":\"tbdrvcqgue\",\"ckyeclcdigpta\":\"eqdurelyujlfyoum\",\"utgjcyz\":\"brzmqxucycijoclx\"},\"id\":\"zjd\",\"name\":\"r\",\"type\":\"jb\"}"; + = "{\"properties\":{\"poolId\":\"jphrasp\",\"size\":1984325244929696235,\"serviceLevel\":\"Standard\",\"provisioningState\":\"m\",\"totalThroughputMibps\":41.165905,\"utilizedThroughputMibps\":84.99924,\"customThroughputMibps\":692071358,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"mdrjuqbpxt\",\"location\":\"lj\",\"tags\":{\"xwfqtyyqiprcl\":\"np\",\"miigzb\":\"ungbsoljc\",\"kdskswtiiqqc\":\"uck\",\"lnssw\":\"ikclsm\"},\"id\":\"ykdnonaaxwmg\",\"name\":\"ru\",\"type\":\"lqcwnynll\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,16 +34,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CapacityPool response = manager.pools() - .getWithResponse("d", "bdweade", "zmwntopagt", com.azure.core.util.Context.NONE) + .getWithResponse("xqwqnjxr", "fddtullygtavczcx", "fweapyfmlx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ltkrl", response.location()); - Assertions.assertEquals("tbdrvcqgue", response.tags().get("zhomp")); - Assertions.assertEquals(2472472449262308145L, response.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, response.serviceLevel()); - Assertions.assertEquals(864325945, response.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); - Assertions.assertTrue(response.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); + Assertions.assertEquals("lj", response.location()); + Assertions.assertEquals("np", response.tags().get("xwfqtyyqiprcl")); + Assertions.assertEquals(1984325244929696235L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); + Assertions.assertEquals(692071358, response.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, response.qosType()); + Assertions.assertFalse(response.coolAccess()); + Assertions.assertEquals(EncryptionType.SINGLE, 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 3790055795d97..cf58895115e53 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\":\"uatbwbqamteuliy\",\"size\":5798834273726815282,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"vmwfauxxep\",\"totalThroughputMibps\":51.94188,\"utilizedThroughputMibps\":47.916176,\"customThroughputMibps\":684125583,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"jqpkzfbo\",\"location\":\"jmcsmyqwixvcpwn\",\"tags\":{\"qtamtyvsknxrw\":\"wzwofalickduo\",\"xn\":\"awnvsbcfhza\",\"zgyufutrwp\":\"hycvdimwrzre\"},\"id\":\"eryekzkdhmeottaw\",\"name\":\"yos\",\"type\":\"wwhnhjtfvpn\"}]}"; + = "{\"value\":[{\"properties\":{\"poolId\":\"xuvj\",\"size\":4375777027571431754,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"qstjc\",\"totalThroughputMibps\":28.492743,\"utilizedThroughputMibps\":96.69005,\"customThroughputMibps\":374098866,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"dhgjnaqyqi\",\"location\":\"lzmvcdsvmwbi\",\"tags\":{\"bxqichgybfzdqe\":\"dtfobvfi\",\"ulrqtbht\":\"ivycpzcvdi\"},\"id\":\"ezp\",\"name\":\"lpryf\",\"type\":\"xmdutzfkgilnou\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,14 +35,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.pools().list("xjeaoqaqbzgyh", "w", com.azure.core.util.Context.NONE); + = manager.pools().list("iqbcbgv", "btsertoxa", com.azure.core.util.Context.NONE); - Assertions.assertEquals("jmcsmyqwixvcpwn", response.iterator().next().location()); - Assertions.assertEquals("wzwofalickduo", response.iterator().next().tags().get("qtamtyvsknxrw")); - Assertions.assertEquals(5798834273726815282L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, response.iterator().next().serviceLevel()); - Assertions.assertEquals(684125583, response.iterator().next().customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, response.iterator().next().qosType()); + Assertions.assertEquals("lzmvcdsvmwbi", response.iterator().next().location()); + Assertions.assertEquals("dtfobvfi", response.iterator().next().tags().get("bxqichgybfzdqe")); + Assertions.assertEquals(4375777027571431754L, response.iterator().next().size()); + Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); + Assertions.assertEquals(374098866, response.iterator().next().customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, response.iterator().next().qosType()); 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 86be1ba7b7e3c..1aa9b8000c7c9 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\":\"htd\",\"subnetId\":\"gbjkvreljeamur\"}") + = BinaryData.fromString("{\"networkSiblingSetId\":\"duoiqt\",\"subnetId\":\"mt\"}") .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("htd", model.networkSiblingSetId()); - Assertions.assertEquals("gbjkvreljeamur", model.subnetId()); + Assertions.assertEquals("duoiqt", model.networkSiblingSetId()); + Assertions.assertEquals("mt", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("htd").withSubnetId("gbjkvreljeamur"); + = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("duoiqt").withSubnetId("mt"); model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("htd", model.networkSiblingSetId()); - Assertions.assertEquals("gbjkvreljeamur", model.subnetId()); + Assertions.assertEquals("duoiqt", model.networkSiblingSetId()); + Assertions.assertEquals("mt", 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 433adaf508734..c72fe7a6230b7 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\":\"i\",\"type\":\"Microsoft.NetApp/netAppAccounts\",\"resourceGroup\":\"wncvjtszcofiz\"}") + QuotaAvailabilityRequest model = BinaryData.fromString( + "{\"name\":\"cp\",\"type\":\"Microsoft.NetApp/netAppAccounts/backupVaults/backups\",\"resourceGroup\":\"kwywzwofalic\"}") .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("i", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); - Assertions.assertEquals("wncvjtszcofiz", model.resourceGroup()); + Assertions.assertEquals("cp", model.name()); + Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS, + model.type()); + Assertions.assertEquals("kwywzwofalic", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("i") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("wncvjtszcofiz"); + QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("cp") + .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS) + .withResourceGroup("kwywzwofalic"); model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("i", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); - Assertions.assertEquals("wncvjtszcofiz", model.resourceGroup()); + Assertions.assertEquals("cp", model.name()); + Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_BACKUP_VAULTS_BACKUPS, + model.type()); + Assertions.assertEquals("kwywzwofalic", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportFilterRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportFilterRequestTests.java index 428663975b5c9..56b85c0b976e2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportFilterRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportFilterRequestTests.java @@ -13,21 +13,21 @@ public final class QuotaReportFilterRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaReportFilterRequest model = BinaryData.fromString( - "{\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"cjefuzmu\",\"usageThresholdPercentage\":1018285327}") + "{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"dsjnka\",\"usageThresholdPercentage\":215049895}") .toObject(QuotaReportFilterRequest.class); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("cjefuzmu", model.quotaTarget()); - Assertions.assertEquals(1018285327, model.usageThresholdPercentage()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("dsjnka", model.quotaTarget()); + Assertions.assertEquals(215049895, model.usageThresholdPercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaReportFilterRequest model = new QuotaReportFilterRequest().withQuotaType(QuotaType.INDIVIDUAL_USER_QUOTA) - .withQuotaTarget("cjefuzmu") - .withUsageThresholdPercentage(1018285327); + QuotaReportFilterRequest model = new QuotaReportFilterRequest().withQuotaType(QuotaType.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("dsjnka") + .withUsageThresholdPercentage(215049895); model = BinaryData.fromObject(model).toObject(QuotaReportFilterRequest.class); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("cjefuzmu", model.quotaTarget()); - Assertions.assertEquals(1018285327, model.usageThresholdPercentage()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("dsjnka", model.quotaTarget()); + Assertions.assertEquals(215049895, model.usageThresholdPercentage()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java index 31dd62347016b..700f0fadced4d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.java @@ -13,13 +13,13 @@ public final class QuotaReportTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaReport model = BinaryData.fromString( - "{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"ggbhcohfwds\",\"quotaLimitUsedInKiBs\":1975392080870414152,\"quotaLimitTotalInKiBs\":3066467447521502887,\"percentageUsed\":84.84821,\"isDerivedQuota\":true}") + "{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"ood\",\"quotaLimitUsedInKiBs\":5126292373343503366,\"quotaLimitTotalInKiBs\":7999873703887931578,\"percentageUsed\":51.56212,\"isDerivedQuota\":false}") .toObject(QuotaReport.class); - Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("ggbhcohfwds", model.quotaTarget()); - Assertions.assertEquals(1975392080870414152L, model.quotaLimitUsedInKiBs()); - Assertions.assertEquals(3066467447521502887L, model.quotaLimitTotalInKiBs()); - Assertions.assertEquals(84.84821F, model.percentageUsed()); - Assertions.assertTrue(model.isDerivedQuota()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("ood", model.quotaTarget()); + Assertions.assertEquals(5126292373343503366L, model.quotaLimitUsedInKiBs()); + Assertions.assertEquals(7999873703887931578L, model.quotaLimitTotalInKiBs()); + Assertions.assertEquals(51.56212F, model.percentageUsed()); + Assertions.assertFalse(model.isDerivedQuota()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java index 0d6ce89571601..0e2a54585281a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.java @@ -11,7 +11,7 @@ public final class RansomwareReportInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RansomwareReportInner model = BinaryData.fromString( - "{\"properties\":{\"eventTime\":\"2021-04-17T11:08:20Z\",\"state\":\"Active\",\"severity\":\"High\",\"clearedCount\":1021951816,\"reportedCount\":434335068,\"suspects\":[{\"extension\":\"lvez\",\"resolution\":\"PotentialThreat\",\"fileCount\":69464261,\"suspectFiles\":[{\"suspectFileName\":\"okerqwkyhkobop\",\"fileTimestamp\":\"2021-07-02T06:13:59Z\"}]},{\"extension\":\"k\",\"resolution\":\"FalsePositive\",\"fileCount\":818081451,\"suspectFiles\":[{\"suspectFileName\":\"rfkbwccsnjvcdwxl\",\"fileTimestamp\":\"2021-03-31T08:41:02Z\"}]}],\"provisioningState\":\"ftnkhtj\"},\"id\":\"i\",\"name\":\"gwfqatmt\",\"type\":\"htmdvy\"}") + "{\"properties\":{\"eventTime\":\"2021-11-05T04:06:51Z\",\"state\":\"Resolved\",\"severity\":\"None\",\"clearedCount\":1828575207,\"reportedCount\":1530472980,\"suspects\":[{\"extension\":\"gplcrpwjxeznoigb\",\"resolution\":\"FalsePositive\",\"fileCount\":509080980,\"suspectFiles\":[{\"suspectFileName\":\"nbsazejjoqkag\",\"fileTimestamp\":\"2021-03-05T04:18:27Z\"}]},{\"extension\":\"ttaugzxnfaazp\",\"resolution\":\"PotentialThreat\",\"fileCount\":1884087819,\"suspectFiles\":[{\"suspectFileName\":\"qjjlwuen\",\"fileTimestamp\":\"2021-04-08T11:28:41Z\"},{\"suspectFileName\":\"yo\",\"fileTimestamp\":\"2021-06-02T18:39:14Z\"}]}],\"provisioningState\":\"rebqaaysjk\"},\"id\":\"qtnqtt\",\"name\":\"zlwfffiakp\",\"type\":\"pqqmted\"}") .toObject(RansomwareReportInner.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java index 46ddf33440876..57a92b1a3fd88 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.java @@ -11,7 +11,7 @@ public final class RansomwareReportPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RansomwareReportProperties model = BinaryData.fromString( - "{\"eventTime\":\"2021-01-15T06:50:48Z\",\"state\":\"Resolved\",\"severity\":\"Moderate\",\"clearedCount\":2142197435,\"reportedCount\":968299480,\"suspects\":[{\"extension\":\"ryuzh\",\"resolution\":\"PotentialThreat\",\"fileCount\":904307607,\"suspectFiles\":[{\"suspectFileName\":\"qqaatjinrvgou\",\"fileTimestamp\":\"2021-06-30T07:48:46Z\"},{\"suspectFileName\":\"ib\",\"fileTimestamp\":\"2021-11-16T12:04:42Z\"}]},{\"extension\":\"ioolvrwxkvtkkgll\",\"resolution\":\"FalsePositive\",\"fileCount\":423959041,\"suspectFiles\":[{\"suspectFileName\":\"yvblmhvkzu\",\"fileTimestamp\":\"2021-11-23T11:34:55Z\"},{\"suspectFileName\":\"vyhgs\",\"fileTimestamp\":\"2021-06-13T17:46:53Z\"},{\"suspectFileName\":\"rqufegxuvwz\",\"fileTimestamp\":\"2021-04-02T15:27:05Z\"}]},{\"extension\":\"lmctlpd\",\"resolution\":\"FalsePositive\",\"fileCount\":1360421335,\"suspectFiles\":[{\"suspectFileName\":\"hrixkwmy\",\"fileTimestamp\":\"2021-05-15T07:36:09Z\"},{\"suspectFileName\":\"veg\",\"fileTimestamp\":\"2021-11-23T01:18:41Z\"},{\"suspectFileName\":\"nai\",\"fileTimestamp\":\"2021-09-08T02:56:48Z\"},{\"suspectFileName\":\"cbdreaxhcexd\",\"fileTimestamp\":\"2021-05-26T13:45:49Z\"}]}],\"provisioningState\":\"ahqkg\"}") + "{\"eventTime\":\"2021-09-01T21:15:43Z\",\"state\":\"Active\",\"severity\":\"Moderate\",\"clearedCount\":1482322760,\"reportedCount\":968506113,\"suspects\":[{\"extension\":\"wau\",\"resolution\":\"PotentialThreat\",\"fileCount\":1587371608,\"suspectFiles\":[{\"suspectFileName\":\"kvi\",\"fileTimestamp\":\"2021-06-16T01:16:58Z\"},{\"suspectFileName\":\"cwxqu\",\"fileTimestamp\":\"2021-09-16T20:46:40Z\"},{\"suspectFileName\":\"hfstotxhojujbyp\",\"fileTimestamp\":\"2021-05-10T17:56:31Z\"}]},{\"extension\":\"uvhixbjxyfwn\",\"resolution\":\"PotentialThreat\",\"fileCount\":729990408,\"suspectFiles\":[{\"suspectFileName\":\"ttpkiwkkbnujrywv\",\"fileTimestamp\":\"2021-04-08T10:27:26Z\"},{\"suspectFileName\":\"fpncurdo\",\"fileTimestamp\":\"2021-04-03T12:46:32Z\"},{\"suspectFileName\":\"thtywub\",\"fileTimestamp\":\"2021-05-27T18:04:18Z\"},{\"suspectFileName\":\"h\",\"fileTimestamp\":\"2021-03-17T00:42:38Z\"}]},{\"extension\":\"fdntwjchrdgoih\",\"resolution\":\"FalsePositive\",\"fileCount\":1518193345,\"suspectFiles\":[{\"suspectFileName\":\"dzjlu\",\"fileTimestamp\":\"2021-10-05T06:38:19Z\"}]}],\"provisioningState\":\"lwg\"}") .toObject(RansomwareReportProperties.class); } } 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 645ad862c25bf..cd2ff47d19730 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\":\"2021-02-13T10:27:06Z\",\"state\":\"Resolved\",\"severity\":\"High\",\"clearedCount\":523480750,\"reportedCount\":851231708,\"suspects\":[{\"extension\":\"sbq\",\"resolution\":\"FalsePositive\",\"fileCount\":1059203016,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"ao\"},\"id\":\"isglrrc\",\"name\":\"ezkhhltnjadhqo\",\"type\":\"wjqo\"}"; + = "{\"properties\":{\"eventTime\":\"2021-07-09T03:58:41Z\",\"state\":\"Resolved\",\"severity\":\"None\",\"clearedCount\":694786659,\"reportedCount\":561629968,\"suspects\":[{\"extension\":\"gsaodkwwnbafocto\",\"resolution\":\"FalsePositive\",\"fileCount\":168068397,\"suspectFiles\":[{}]},{\"extension\":\"sxbgnvkervqchoa\",\"resolution\":\"FalsePositive\",\"fileCount\":346330280,\"suspectFiles\":[{},{}]},{\"extension\":\"vspabdsrgfajgl\",\"resolution\":\"PotentialThreat\",\"fileCount\":1514719220,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"xhjnl\"},\"id\":\"etjdvqydieqqkwa\",\"name\":\"uwdxvqzxoebwgj\",\"type\":\"bibanbau\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RansomwareReport response = manager.ransomwareReports() - .getWithResponse("xqltgrd", "gypxrxvbfihwuhvc", "a", "s", "bxrblmliowxihspn", - com.azure.core.util.Context.NONE) + .getWithResponse("iedfsbwcei", "bv", "ipbwxgooo", "zp", "admskx", 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 a99185a5a4445..5123e084007b2 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-09-30T11:14:47Z\",\"state\":\"Active\",\"severity\":\"Moderate\",\"clearedCount\":896412004,\"reportedCount\":834436934,\"suspects\":[{\"extension\":\"bxubmdna\",\"resolution\":\"FalsePositive\",\"fileCount\":1699844776,\"suspectFiles\":[{}]},{\"extension\":\"jelaqacigele\",\"resolution\":\"PotentialThreat\",\"fileCount\":883742006,\"suspectFiles\":[{},{}]},{\"extension\":\"z\",\"resolution\":\"FalsePositive\",\"fileCount\":1120950278,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"nrlkwzdqy\",\"resolution\":\"PotentialThreat\",\"fileCount\":1893687260,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"ptsoqfyiase\"},\"id\":\"hkrttzrazis\",\"name\":\"ykiue\",\"type\":\"vanbwzohmnrxxbs\"}]}"; + = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-06-26T08:15:23Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":1524104857,\"reportedCount\":949610294,\"suspects\":[{\"extension\":\"eoijyzcqypzqzufg\",\"resolution\":\"FalsePositive\",\"fileCount\":2031045833,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"wtfxpt\",\"resolution\":\"FalsePositive\",\"fileCount\":2019215220,\"suspectFiles\":[{}]},{\"extension\":\"cf\",\"resolution\":\"PotentialThreat\",\"fileCount\":1215741540,\"suspectFiles\":[{},{}]}],\"provisioningState\":\"ocuullojkpoyhgww\"},\"id\":\"uxdbdljzgdyrcvuq\",\"name\":\"sgzlrqhb\",\"type\":\"nq\"}]}"; 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("ueayfbpcmsplb", "rrueqthwmg", "mbscbbx", "gdhxi", com.azure.core.util.Context.NONE); + .list("wtzvpakloz", "xbzrpejplssanb", "ttkgsux", "nrswgkpjhboyik", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java index be8cab0453bf6..a7c1ff1715be2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.java @@ -12,8 +12,8 @@ public final class RansomwareReportsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RansomwareReportsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"eventTime\":\"2021-07-06T23:25:37Z\",\"state\":\"Active\",\"severity\":\"Moderate\",\"clearedCount\":2072620851,\"reportedCount\":539949394,\"suspects\":[{\"extension\":\"xkmcwaekrrjre\",\"resolution\":\"PotentialThreat\",\"fileCount\":1629743975,\"suspectFiles\":[{}]},{\"extension\":\"hjglikk\",\"resolution\":\"PotentialThreat\",\"fileCount\":1050181050,\"suspectFiles\":[{}]},{\"extension\":\"pvuzlmv\",\"resolution\":\"FalsePositive\",\"fileCount\":1732171023,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"lcrpw\",\"resolution\":\"PotentialThreat\",\"fileCount\":879908926,\"suspectFiles\":[{},{}]}],\"provisioningState\":\"brnjwmw\"},\"id\":\"nbsazejjoqkag\",\"name\":\"hsxttaugzxnf\",\"type\":\"azpxdtnkdmkqjjl\"}],\"nextLink\":\"envrkpyouaibrebq\"}") + "{\"value\":[{\"properties\":{\"eventTime\":\"2021-02-17T18:59:40Z\",\"state\":\"Resolved\",\"severity\":\"None\",\"clearedCount\":1523928061,\"reportedCount\":1977365948,\"suspects\":[{\"extension\":\"zhonnxkrlgnyhmo\",\"resolution\":\"PotentialThreat\",\"fileCount\":954408257,\"suspectFiles\":[{},{}]}],\"provisioningState\":\"rrghxjbdhqxvcxgf\"},\"id\":\"dsofbshrns\",\"name\":\"buswdvzyy\",\"type\":\"ycnunvjsrtk\"},{\"properties\":{\"eventTime\":\"2021-01-10T15:25:32Z\",\"state\":\"Active\",\"severity\":\"Moderate\",\"clearedCount\":610729333,\"reportedCount\":1997575188,\"suspects\":[{\"extension\":\"xdyuxzejnt\",\"resolution\":\"FalsePositive\",\"fileCount\":1675293509,\"suspectFiles\":[{}]},{\"extension\":\"l\",\"resolution\":\"PotentialThreat\",\"fileCount\":1456439071,\"suspectFiles\":[{},{},{}]},{\"extension\":\"qmi\",\"resolution\":\"PotentialThreat\",\"fileCount\":1222923392,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"f\"},\"id\":\"aomtbghhavgrvkff\",\"name\":\"vjzhpjbib\",\"type\":\"jmfxumvf\"}],\"nextLink\":\"uyovw\"}") .toObject(RansomwareReportsList.class); - Assertions.assertEquals("envrkpyouaibrebq", model.nextLink()); + Assertions.assertEquals("uyovw", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java index 6bb2da05ef241..3b6a3ede2c8c5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.java @@ -14,19 +14,20 @@ public final class RansomwareSuspectsClearRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RansomwareSuspectsClearRequest model = BinaryData - .fromString("{\"resolution\":\"FalsePositive\",\"extensions\":[\"sj\",\"ixqtn\",\"ttezlw\",\"ffiakp\"]}") + .fromString( + "{\"resolution\":\"FalsePositive\",\"extensions\":[\"kfezzxscyhwz\",\"g\",\"rujbzbomvzzbtdc\",\"vp\"]}") .toObject(RansomwareSuspectsClearRequest.class); Assertions.assertEquals(RansomwareSuspectResolution.FALSE_POSITIVE, model.resolution()); - Assertions.assertEquals("sj", model.extensions().get(0)); + Assertions.assertEquals("kfezzxscyhwz", model.extensions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RansomwareSuspectsClearRequest model = new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.FALSE_POSITIVE) - .withExtensions(Arrays.asList("sj", "ixqtn", "ttezlw", "ffiakp")); + .withExtensions(Arrays.asList("kfezzxscyhwz", "g", "rujbzbomvzzbtdc", "vp")); model = BinaryData.fromObject(model).toObject(RansomwareSuspectsClearRequest.class); Assertions.assertEquals(RansomwareSuspectResolution.FALSE_POSITIVE, model.resolution()); - Assertions.assertEquals("sj", model.extensions().get(0)); + Assertions.assertEquals("kfezzxscyhwz", model.extensions().get(0)); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java index 34341b01a1e7b..d99421f9fb7c8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.java @@ -11,7 +11,7 @@ public final class RansomwareSuspectsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RansomwareSuspects model = BinaryData.fromString( - "{\"extension\":\"pwijnhy\",\"resolution\":\"PotentialThreat\",\"fileCount\":175357143,\"suspectFiles\":[{\"suspectFileName\":\"bfvoowvrv\",\"fileTimestamp\":\"2021-05-22T15:30:25Z\"}]}") + "{\"extension\":\"tsbwtovvtgse\",\"resolution\":\"PotentialThreat\",\"fileCount\":405729519,\"suspectFiles\":[{\"suspectFileName\":\"qknp\",\"fileTimestamp\":\"2021-03-12T06:20:37Z\"},{\"suspectFileName\":\"epttwqmsniff\",\"fileTimestamp\":\"2021-10-31T18:45:45Z\"},{\"suspectFileName\":\"nrojlpijnkr\",\"fileTimestamp\":\"2020-12-27T04:23:31Z\"},{\"suspectFileName\":\"dhcrati\",\"fileTimestamp\":\"2021-03-09T16:30:01Z\"}]}") .toObject(RansomwareSuspects.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java index 7518852c2219a..8f647bca44328 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java @@ -12,14 +12,14 @@ public final class ReestablishReplicationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReestablishReplicationRequest model - = BinaryData.fromString("{\"sourceVolumeId\":\"ao\"}").toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("ao", model.sourceVolumeId()); + = BinaryData.fromString("{\"sourceVolumeId\":\"nvdfznuda\"}").toObject(ReestablishReplicationRequest.class); + Assertions.assertEquals("nvdfznuda", model.sourceVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("ao"); + ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("nvdfznuda"); model = BinaryData.fromObject(model).toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("ao", model.sourceVolumeId()); + Assertions.assertEquals("nvdfznuda", model.sourceVolumeId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java index 72c1ed9d88d76..c0320e4096ed4 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\":\"utvlxhr\",\"isAvailable\":true}") .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("mdy", model.availabilityZone()); - Assertions.assertFalse(model.isAvailable()); + Assertions.assertEquals("utvlxhr", 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 d46cc6ff3cf8f..b85780495a34c 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,10 @@ 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\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"xgvttxp\",\"isAvailable\":true},{\"availabilityZone\":\"zaamrdixtrekid\",\"isAvailable\":false},{\"availabilityZone\":\"kbr\",\"isAvailable\":true},{\"availabilityZone\":\"l\",\"isAvailable\":false}]}") .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(RegionStorageToNetworkProximity.T1AND_ACROSS_T2, model.storageToNetworkProximity()); + Assertions.assertEquals("xgvttxp", 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 e2e8260d93090..b2515ba65994f 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\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bv\",\"isAvailable\":false},{\"availabilityZone\":\"onmcyefoyzb\",\"isAvailable\":false}]},\"id\":\"neo\",\"name\":\"vfkakpold\",\"type\":\"vevboclzh\"}") .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.T1AND_ACROSS_T2, model.storageToNetworkProximity()); + Assertions.assertEquals("bv", 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 b41d1f466b4a5..ab6e6e509ca42 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,12 @@ 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\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"qehbhbcds\",\"isAvailable\":false}]},\"id\":\"randoypmb\",\"name\":\"t\",\"type\":\"ormkfqlwxldyk\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"lnjpnnbmjksibjgs\",\"isAvailable\":true},{\"availabilityZone\":\"ahmrnadzyqegxyi\",\"isAvailable\":false},{\"availabilityZone\":\"bmh\",\"isAvailable\":true}]},\"id\":\"jkgqxnhmbkez\",\"name\":\"jauj\",\"type\":\"aan\"},{\"properties\":{\"storageToNetworkProximity\":\"AcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"kdtaaw\",\"isAvailable\":false},{\"availabilityZone\":\"ka\",\"isAvailable\":true}]},\"id\":\"qmbzmq\",\"name\":\"ratbnxwbjs\",\"type\":\"dbirkfpksokdgo\"}],\"nextLink\":\"wijymr\"}") .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("qehbhbcds", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertFalse(model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals("wijymr", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java index ebda7bc60c16f..f3018cfb5059b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java @@ -14,11 +14,11 @@ public final class ReplicationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationInner model = BinaryData.fromString( - "{\"replicationId\":\"szhedplvw\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"mbes\",\"remoteVolumeRegion\":\"nkww\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-05-13T14:02:05Z\",\"replicationDeletionTime\":\"2021-11-04T18:03:15Z\"}") + "{\"replicationId\":\"ogqxndlkzgxhuri\",\"endpointType\":\"dst\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"xunkbebxmubyynt\",\"remoteVolumeRegion\":\"rbqtkoie\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-12-03T04:31:52Z\",\"replicationDeletionTime\":\"2021-04-19T07:28:36Z\"}") .toObject(ReplicationInner.class); Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replicationSchedule()); - Assertions.assertEquals("mbes", model.remoteVolumeResourceId()); - Assertions.assertEquals("nkww", model.remoteVolumeRegion()); + Assertions.assertEquals(ReplicationSchedule.HOURLY, model.replicationSchedule()); + Assertions.assertEquals("xunkbebxmubyynt", model.remoteVolumeResourceId()); + Assertions.assertEquals("rbqtkoie", model.remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java index 4906f75799a87..6450798394852 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java @@ -14,12 +14,12 @@ public final class ReplicationStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationStatusInner model = BinaryData.fromString( - "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"lylpstdb\",\"errorMessage\":\"xsrz\"}") + "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Broken\",\"totalProgress\":\"blylpstdbh\",\"errorMessage\":\"srzdzucerscdn\"}") .toObject(ReplicationStatusInner.class); Assertions.assertFalse(model.healthy()); - Assertions.assertEquals(VolumeReplicationRelationshipStatus.TRANSFERRING, model.relationshipStatus()); - Assertions.assertEquals(MirrorState.UNINITIALIZED, model.mirrorState()); - Assertions.assertEquals("lylpstdb", model.totalProgress()); - Assertions.assertEquals("xsrz", model.errorMessage()); + Assertions.assertEquals(VolumeReplicationRelationshipStatus.IDLE, model.relationshipStatus()); + Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); + Assertions.assertEquals("blylpstdbh", model.totalProgress()); + Assertions.assertEquals("srzdzucerscdn", model.errorMessage()); } } 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 9e858aa97bab8..dd958d8c69397 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,21 @@ public final class ResourceNameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"vfcdisyirn\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"hcz\"}") + "{\"name\":\"aoqaqbzgyhfwwv\",\"type\":\"Microsoft.NetApp/netAppAccounts\",\"resourceGroup\":\"tbwbqamteuli\"}") .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("vfcdisyirn", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("hcz", model.resourceGroup()); + Assertions.assertEquals("aoqaqbzgyhfwwv", model.name()); + Assertions.assertEquals(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); + Assertions.assertEquals("tbwbqamteuli", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("vfcdisyirn") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("hcz"); + ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("aoqaqbzgyhfwwv") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) + .withResourceGroup("tbwbqamteuli"); model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("vfcdisyirn", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("hcz", model.resourceGroup()); + Assertions.assertEquals("aoqaqbzgyhfwwv", model.name()); + Assertions.assertEquals(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS, model.type()); + Assertions.assertEquals("tbwbqamteuli", 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 0000000000000..59c08fd4a96e9 --- /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\":\"snewmozqvbub\",\"userAssignedIdentity\":\"amhsycxhxzgazt\"}") + .toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("amhsycxhxzgazt", model.userAssignedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretPasswordIdentity model = new SecretPasswordIdentity().withUserAssignedIdentity("amhsycxhxzgazt"); + model = BinaryData.fromObject(model).toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("amhsycxhxzgazt", model.userAssignedIdentity()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SetupInformationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SetupInformationTests.java new file mode 100644 index 0000000000000..2779569bea59f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SetupInformationTests.java @@ -0,0 +1,18 @@ +// Copyright (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.SetupInformation; + +public final class SetupInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SetupInformation model = BinaryData + .fromString( + "{\"setupStatus\":\"NoActionRequired\",\"statusInformation\":\"rucvcrrpcjttbs\",\"command\":\"jeaq\"}") + .toObject(SetupInformation.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java index 6c51bc3761fd9..5998cb9baf94c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java @@ -8,6 +8,7 @@ import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbEncryptionState; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.SmbOplocks; import com.azure.resourcemanager.netapp.models.SmbSettings; import org.junit.jupiter.api.Assertions; @@ -15,21 +16,24 @@ public final class SmbSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SmbSettings model = BinaryData.fromString( - "{\"smbEncryption\":\"Enabled\",\"smbAccessBasedEnumeration\":\"Enabled\",\"smbNonBrowsable\":\"Disabled\"}") + "{\"smbEncryption\":\"Disabled\",\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Enabled\",\"smbOplocks\":\"Enabled\"}") .toObject(SmbSettings.class); - Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbEncryptionState.DISABLED, model.smbEncryption()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbOplocks.ENABLED, model.smbOplocks()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SmbSettings model = new SmbSettings().withSmbEncryption(SmbEncryptionState.ENABLED) - .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) - .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); + SmbSettings model = new SmbSettings().withSmbEncryption(SmbEncryptionState.DISABLED) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbOplocks(SmbOplocks.ENABLED); model = BinaryData.fromObject(model).toObject(SmbSettings.class); - Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbEncryptionState.DISABLED, model.smbEncryption()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbOplocks.ENABLED, model.smbOplocks()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java index 82c691900c580..f6b97e0aab54d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java @@ -12,15 +12,15 @@ public final class SnapshotInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotInner model = BinaryData.fromString( - "{\"properties\":{\"snapshotId\":\"cffgdkzzewk\",\"created\":\"2021-02-28T03:19:05Z\",\"provisioningState\":\"crailvpn\"},\"location\":\"pfuflrw\",\"id\":\"hdlxyjrxsagafcn\",\"name\":\"hgw\",\"type\":\"apnedgfbcvkc\"}") + "{\"properties\":{\"snapshotId\":\"vnhdldwmgxcxr\",\"created\":\"2021-07-11T19:22:13Z\",\"provisioningState\":\"utwu\"},\"location\":\"egrpkhj\",\"id\":\"iyq\",\"name\":\"luicpdggkzzlvmbm\",\"type\":\"axmodfvuef\"}") .toObject(SnapshotInner.class); - Assertions.assertEquals("pfuflrw", model.location()); + Assertions.assertEquals("egrpkhj", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotInner model = new SnapshotInner().withLocation("pfuflrw"); + SnapshotInner model = new SnapshotInner().withLocation("egrpkhj"); model = BinaryData.fromObject(model).toObject(SnapshotInner.class); - Assertions.assertEquals("pfuflrw", model.location()); + Assertions.assertEquals("egrpkhj", model.location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java index 9442c1e98e046..3fde14cef2706 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\":1472660607,\"minute\":704144060,\"usedBytes\":9052954868996953096},\"dailySchedule\":{\"snapshotsToKeep\":385345133,\"hour\":592038420,\"minute\":1472348146,\"usedBytes\":3780645351268640414},\"weeklySchedule\":{\"snapshotsToKeep\":1091959996,\"day\":\"vv\",\"hour\":56804817,\"minute\":1687110835,\"usedBytes\":8523532171145377338},\"monthlySchedule\":{\"snapshotsToKeep\":1314772316,\"daysOfMonth\":\"rbfdpyflubhvjg\",\"hour\":688527355,\"minute\":1255688673,\"usedBytes\":6423285310105847926},\"enabled\":true,\"provisioningState\":\"memhooclutnpq\"},\"etag\":\"mczjkm\",\"location\":\"kyujxsglhsrrr\",\"tags\":{\"rfih\":\"ylmbkzudni\",\"nrefqyh\":\"tjewlpxuzzj\",\"ydiw\":\"otoihiqa\",\"hcspo\":\"brkwpzdqt\"},\"id\":\"aqa\",\"name\":\"sipi\",\"type\":\"tgbebj\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1657506031,\"minute\":2133786614,\"usedBytes\":7846610530099534742},\"dailySchedule\":{\"snapshotsToKeep\":1567820943,\"hour\":306351947,\"minute\":1669612814,\"usedBytes\":793805318813861644},\"weeklySchedule\":{\"snapshotsToKeep\":629314164,\"day\":\"iprnzcalincry\",\"hour\":2069267818,\"minute\":874823918,\"usedBytes\":2068309328340539883},\"monthlySchedule\":{\"snapshotsToKeep\":1996396504,\"daysOfMonth\":\"miymqruqguhfupet\",\"hour\":176903649,\"minute\":1919781103,\"usedBytes\":5045103777171405600},\"enabled\":false,\"provisioningState\":\"lanfkgxsya\"},\"etag\":\"uzowpuohdkcpr\",\"location\":\"kxrzt\",\"tags\":{\"f\":\"hlutixmqrudjizc\",\"fbcpaqktkrumzu\":\"mcrunfhiucn\",\"kxiuxqggvqr\":\"dkyzbfvxov\"},\"id\":\"hyhlwcjsqg\",\"name\":\"jhffbxrqrkij\",\"type\":\"euqlsdxeqztv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,50 +37,50 @@ public void testCreateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SnapshotPolicy response = manager.snapshotPolicies() - .define("rsrrmoucsofldp") - .withRegion("esyds") - .withExistingNetAppAccount("clgsc", "orim") - .withTags(mapOf("ecb", "fo")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1885056673) - .withMinute(853519534) - .withUsedBytes(3873403818939961012L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1173256477) - .withHour(270239439) - .withMinute(1768939163) - .withUsedBytes(7159272851975255119L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(453041096) - .withDay("bsxtkcudfbsfarfs") - .withHour(1371865849) - .withMinute(1864601179) - .withUsedBytes(2835617475342020386L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(979302562) - .withDaysOfMonth("gf") - .withHour(1009446634) - .withMinute(970859098) - .withUsedBytes(5976000115786695513L)) + .define("btqqvyfs") + .withRegion("oabhjxwxqweuip") + .withExistingNetAppAccount("rk", "qsj") + .withTags(mapOf("lkrdpqgfhy", "ksmitnsqxtlt")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2084097115) + .withMinute(490091441) + .withUsedBytes(6411472016983549287L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1766113053) + .withHour(1965121378) + .withMinute(1620956817) + .withUsedBytes(5161127080909380583L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1378223414) + .withDay("byqecroo") + .withHour(747623395) + .withMinute(573826236) + .withUsedBytes(870988023842492870L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1360631428) + .withDaysOfMonth("xxobsmfkwiy") + .withHour(1018773486) + .withMinute(272514672) + .withUsedBytes(3225471395239353225L)) .withEnabled(false) .create(); - Assertions.assertEquals("kyujxsglhsrrr", response.location()); - Assertions.assertEquals("ylmbkzudni", response.tags().get("rfih")); - Assertions.assertEquals(1472660607, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(704144060, response.hourlySchedule().minute()); - Assertions.assertEquals(9052954868996953096L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(385345133, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(592038420, response.dailySchedule().hour()); - Assertions.assertEquals(1472348146, response.dailySchedule().minute()); - Assertions.assertEquals(3780645351268640414L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(1091959996, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("vv", response.weeklySchedule().day()); - Assertions.assertEquals(56804817, response.weeklySchedule().hour()); - Assertions.assertEquals(1687110835, response.weeklySchedule().minute()); - Assertions.assertEquals(8523532171145377338L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1314772316, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("rbfdpyflubhvjg", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(688527355, response.monthlySchedule().hour()); - Assertions.assertEquals(1255688673, response.monthlySchedule().minute()); - Assertions.assertEquals(6423285310105847926L, response.monthlySchedule().usedBytes()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("kxrzt", response.location()); + Assertions.assertEquals("hlutixmqrudjizc", response.tags().get("f")); + Assertions.assertEquals(1657506031, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2133786614, response.hourlySchedule().minute()); + Assertions.assertEquals(7846610530099534742L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(1567820943, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(306351947, response.dailySchedule().hour()); + Assertions.assertEquals(1669612814, response.dailySchedule().minute()); + Assertions.assertEquals(793805318813861644L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(629314164, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iprnzcalincry", response.weeklySchedule().day()); + Assertions.assertEquals(2069267818, response.weeklySchedule().hour()); + Assertions.assertEquals(874823918, response.weeklySchedule().minute()); + Assertions.assertEquals(2068309328340539883L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1996396504, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("miymqruqguhfupet", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(176903649, response.monthlySchedule().hour()); + Assertions.assertEquals(1919781103, response.monthlySchedule().minute()); + Assertions.assertEquals(5045103777171405600L, response.monthlySchedule().usedBytes()); + 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/SnapshotPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java index 741b0bc42b0d1..dbd8fb7266d5e 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("voxczytpr", "nwvroevytlyokrr", "o", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("abzfivf", "kpysthhzagjf", "yyrlhgenu", 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 feb2dedda5757..762023f41183f 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\":1557864687,\"minute\":1683628579,\"usedBytes\":8682401111601182304},\"dailySchedule\":{\"snapshotsToKeep\":48133569,\"hour\":113101666,\"minute\":204216617,\"usedBytes\":294105782539047029},\"weeklySchedule\":{\"snapshotsToKeep\":899609401,\"day\":\"rhrljyoogwxhn\",\"hour\":595356327,\"minute\":188519413,\"usedBytes\":4498449621335160642},\"monthlySchedule\":{\"snapshotsToKeep\":452225212,\"daysOfMonth\":\"fqkfuarenl\",\"hour\":1102967023,\"minute\":1757158898,\"usedBytes\":5063142546295596094},\"enabled\":false,\"provisioningState\":\"vvkyfedevjboslcq\"},\"etag\":\"p\",\"location\":\"khminqcymc\",\"tags\":{\"nvudbchaqdtvqecr\":\"nbdxxewun\"},\"id\":\"ct\",\"name\":\"xxdtddmflh\",\"type\":\"ytxzvtznapxbanno\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1735235828,\"minute\":563018487,\"usedBytes\":3930750995945071444},\"dailySchedule\":{\"snapshotsToKeep\":521840124,\"hour\":1608981359,\"minute\":1937177976,\"usedBytes\":7755780612802608186},\"weeklySchedule\":{\"snapshotsToKeep\":848675168,\"day\":\"xmfqryarvsxzqbg\",\"hour\":298554964,\"minute\":2109063393,\"usedBytes\":8936125037200675281},\"monthlySchedule\":{\"snapshotsToKeep\":1994794374,\"daysOfMonth\":\"dubtlmj\",\"hour\":891755269,\"minute\":1893533667,\"usedBytes\":6746506762194731200},\"enabled\":true,\"provisioningState\":\"kmfd\"},\"etag\":\"yxgbkkqvjcteoedl\",\"location\":\"lskkzpxvj\",\"tags\":{\"xzfsnggytexvzilm\":\"pvocojhpcna\",\"kwwwnckn\":\"iv\",\"weucyrth\":\"zdajlskzptjxu\"},\"id\":\"qlehmcgcjeinu\",\"name\":\"hokamvfej\",\"type\":\"qnttmbq\"}"; 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("ro", "xddbhfhpfpaz", "zoyw", com.azure.core.util.Context.NONE) + .getWithResponse("zrvtx", "cmufunlcpxxv", "ryeyngjgv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("khminqcymc", response.location()); - Assertions.assertEquals("nbdxxewun", response.tags().get("nvudbchaqdtvqecr")); - Assertions.assertEquals(1557864687, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1683628579, response.hourlySchedule().minute()); - Assertions.assertEquals(8682401111601182304L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(48133569, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(113101666, response.dailySchedule().hour()); - Assertions.assertEquals(204216617, response.dailySchedule().minute()); - Assertions.assertEquals(294105782539047029L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(899609401, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("rhrljyoogwxhn", response.weeklySchedule().day()); - Assertions.assertEquals(595356327, response.weeklySchedule().hour()); - Assertions.assertEquals(188519413, response.weeklySchedule().minute()); - Assertions.assertEquals(4498449621335160642L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(452225212, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("fqkfuarenl", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1102967023, response.monthlySchedule().hour()); - Assertions.assertEquals(1757158898, response.monthlySchedule().minute()); - Assertions.assertEquals(5063142546295596094L, response.monthlySchedule().usedBytes()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("lskkzpxvj", response.location()); + Assertions.assertEquals("pvocojhpcna", response.tags().get("xzfsnggytexvzilm")); + Assertions.assertEquals(1735235828, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(563018487, response.hourlySchedule().minute()); + Assertions.assertEquals(3930750995945071444L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(521840124, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1608981359, response.dailySchedule().hour()); + Assertions.assertEquals(1937177976, response.dailySchedule().minute()); + Assertions.assertEquals(7755780612802608186L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(848675168, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xmfqryarvsxzqbg", response.weeklySchedule().day()); + Assertions.assertEquals(298554964, response.weeklySchedule().hour()); + Assertions.assertEquals(2109063393, response.weeklySchedule().minute()); + Assertions.assertEquals(8936125037200675281L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1994794374, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("dubtlmj", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(891755269, response.monthlySchedule().hour()); + Assertions.assertEquals(1893533667, response.monthlySchedule().minute()); + Assertions.assertEquals(6746506762194731200L, 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 292e315062b71..3906bd10c1f56 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\":1481067716,\"minute\":2064585856,\"usedBytes\":1984929575959856707},\"dailySchedule\":{\"snapshotsToKeep\":1612379087,\"hour\":1939182119,\"minute\":315314299,\"usedBytes\":1085790183971993416},\"weeklySchedule\":{\"snapshotsToKeep\":265709427,\"day\":\"dtfgxqbawpcbb\",\"hour\":646542935,\"minute\":1480013268,\"usedBytes\":4845601652796313398},\"monthlySchedule\":{\"snapshotsToKeep\":1733382957,\"daysOfMonth\":\"yuicdhzbdy\",\"hour\":1911202456,\"minute\":1783408160,\"usedBytes\":4716573374509509666},\"enabled\":false,\"provisioningState\":\"mhmwffpl\"},\"etag\":\"u\",\"location\":\"pckc\",\"tags\":{\"oxoyyukp\":\"vwe\"},\"id\":\"aimmoiroqb\",\"name\":\"shbraga\",\"type\":\"yyrmfsvbp\"}]}"; + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1874475356,\"minute\":186975974,\"usedBytes\":6038615490563012340},\"dailySchedule\":{\"snapshotsToKeep\":521620352,\"hour\":407708902,\"minute\":182274815,\"usedBytes\":8129914869412639864},\"weeklySchedule\":{\"snapshotsToKeep\":604437494,\"day\":\"xsvtzarhzvqnsqk\",\"hour\":1074323465,\"minute\":227702310,\"usedBytes\":298111376415348939},\"monthlySchedule\":{\"snapshotsToKeep\":859478865,\"daysOfMonth\":\"kybtglwkzpgajsqj\",\"hour\":892991876,\"minute\":818579433,\"usedBytes\":4113243001402362487},\"enabled\":true,\"provisioningState\":\"rwzxuqrebluimm\"},\"etag\":\"xsfgtdmbvxekr\",\"location\":\"k\",\"tags\":{\"twaokb\":\"ud\",\"sm\":\"vlyttaaknwfrke\"},\"id\":\"p\",\"name\":\"ujd\",\"type\":\"gatolekscbctnan\"}]}"; 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("uxvnsasbcrymodi", "rxklobdxnazpmk", com.azure.core.util.Context.NONE); + = manager.snapshotPolicies().list("ejgvkvebaqszllrz", "smmd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pckc", response.iterator().next().location()); - Assertions.assertEquals("vwe", response.iterator().next().tags().get("oxoyyukp")); - Assertions.assertEquals(1481067716, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(2064585856, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(1984929575959856707L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(1612379087, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1939182119, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(315314299, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(1085790183971993416L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(265709427, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("dtfgxqbawpcbb", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(646542935, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(1480013268, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(4845601652796313398L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(1733382957, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("yuicdhzbdy", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1911202456, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(1783408160, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(4716573374509509666L, response.iterator().next().monthlySchedule().usedBytes()); - Assertions.assertFalse(response.iterator().next().enabled()); + Assertions.assertEquals("k", response.iterator().next().location()); + Assertions.assertEquals("ud", response.iterator().next().tags().get("twaokb")); + Assertions.assertEquals(1874475356, response.iterator().next().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(186975974, response.iterator().next().hourlySchedule().minute()); + Assertions.assertEquals(6038615490563012340L, response.iterator().next().hourlySchedule().usedBytes()); + Assertions.assertEquals(521620352, response.iterator().next().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(407708902, response.iterator().next().dailySchedule().hour()); + Assertions.assertEquals(182274815, response.iterator().next().dailySchedule().minute()); + Assertions.assertEquals(8129914869412639864L, response.iterator().next().dailySchedule().usedBytes()); + Assertions.assertEquals(604437494, response.iterator().next().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("xsvtzarhzvqnsqk", response.iterator().next().weeklySchedule().day()); + Assertions.assertEquals(1074323465, response.iterator().next().weeklySchedule().hour()); + Assertions.assertEquals(227702310, response.iterator().next().weeklySchedule().minute()); + Assertions.assertEquals(298111376415348939L, response.iterator().next().weeklySchedule().usedBytes()); + Assertions.assertEquals(859478865, response.iterator().next().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("kybtglwkzpgajsqj", response.iterator().next().monthlySchedule().daysOfMonth()); + Assertions.assertEquals(892991876, response.iterator().next().monthlySchedule().hour()); + Assertions.assertEquals(818579433, response.iterator().next().monthlySchedule().minute()); + Assertions.assertEquals(4113243001402362487L, 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/SnapshotPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java index 7fc72c3cf227d..0aa78fbab6f2b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java @@ -12,28 +12,28 @@ public final class SnapshotPoliciesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":980473752,\"minute\":740874462,\"usedBytes\":5279516661370439683},\"dailySchedule\":{\"snapshotsToKeep\":385897981,\"hour\":1130828460,\"minute\":518293394,\"usedBytes\":3768237640733727043},\"weeklySchedule\":{\"snapshotsToKeep\":817024636,\"day\":\"wq\",\"hour\":1018889547,\"minute\":1951861279,\"usedBytes\":416295343158305691},\"monthlySchedule\":{\"snapshotsToKeep\":669500000,\"daysOfMonth\":\"aayg\",\"hour\":2007823107,\"minute\":1689077175,\"usedBytes\":3318683648203687085},\"enabled\":false,\"provisioningState\":\"xrtfudxep\"},\"etag\":\"yqagvrvm\",\"location\":\"k\",\"tags\":{\"gwimfn\":\"himdbl\",\"mszkkfo\":\"hfjx\"},\"id\":\"rey\",\"name\":\"kzikfjawneaivxwc\",\"type\":\"elpcirelsfeaenwa\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":737595664,\"minute\":463401012,\"usedBytes\":5606379961327556346},\"dailySchedule\":{\"snapshotsToKeep\":1025445351,\"hour\":868651284,\"minute\":435205940,\"usedBytes\":1846785403940913881},\"weeklySchedule\":{\"snapshotsToKeep\":1294061553,\"day\":\"hyoulpjr\",\"hour\":326673667,\"minute\":114988444,\"usedBytes\":7929823233181377327},\"monthlySchedule\":{\"snapshotsToKeep\":865448266,\"daysOfMonth\":\"sytxitcskfcktqum\",\"hour\":2056764824,\"minute\":344602824,\"usedBytes\":5669658247927404642},\"enabled\":true,\"provisioningState\":\"yf\"},\"etag\":\"dgqggebdu\",\"location\":\"g\",\"tags\":{\"fatpxllrxcyjmoa\":\"idb\",\"arm\":\"su\",\"rw\":\"wdmjsjqbjhhyx\",\"duhpk\":\"yc\"},\"id\":\"kgymareqnajxqug\",\"name\":\"hky\",\"type\":\"ubeddg\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1063119881,\"minute\":1853639964,\"usedBytes\":4954333149944467067},\"dailySchedule\":{\"snapshotsToKeep\":1862326594,\"hour\":1473869810,\"minute\":1723578922,\"usedBytes\":5045179642883767359},\"weeklySchedule\":{\"snapshotsToKeep\":1400063393,\"day\":\"qudf\",\"hour\":1238431927,\"minute\":891607282,\"usedBytes\":5865744490528977328},\"monthlySchedule\":{\"snapshotsToKeep\":745184435,\"daysOfMonth\":\"ayffim\",\"hour\":1942204263,\"minute\":1007625802,\"usedBytes\":2754369051749669721},\"enabled\":true,\"provisioningState\":\"xnevfdnwn\"},\"etag\":\"ewzsyyceuzsoib\",\"location\":\"dpfrxtrthzvaytdw\",\"tags\":{\"vpdtiirqtdqoa\":\"rqubpaxhexiil\",\"eptra\":\"oruzfgsquyfxrxx\"},\"id\":\"xje\",\"name\":\"wlwnwxuqlcv\",\"type\":\"dy\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1248229075,\"minute\":350928008,\"usedBytes\":6903803366514514016},\"dailySchedule\":{\"snapshotsToKeep\":1614496522,\"hour\":77495916,\"minute\":445064797,\"usedBytes\":9027749367936542516},\"weeklySchedule\":{\"snapshotsToKeep\":2091031438,\"day\":\"hemms\",\"hour\":1756222146,\"minute\":145685509,\"usedBytes\":5259241666780286117},\"monthlySchedule\":{\"snapshotsToKeep\":1740728179,\"daysOfMonth\":\"fw\",\"hour\":2087401910,\"minute\":1139569570,\"usedBytes\":9167541690912774024},\"enabled\":true,\"provisioningState\":\"f\"},\"etag\":\"lfoakg\",\"location\":\"fpagaowpulp\",\"tags\":{\"vti\":\"ylsyxkqjnsje\"},\"id\":\"gxsds\",\"name\":\"uem\",\"type\":\"sbzkf\"}],\"nextLink\":\"eyvpnqicvinvkj\"}") + "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":108895877,\"minute\":1925040131,\"usedBytes\":5726286891049833981},\"dailySchedule\":{\"snapshotsToKeep\":2127430069,\"hour\":742564082,\"minute\":1429248323,\"usedBytes\":1003132087876898428},\"weeklySchedule\":{\"snapshotsToKeep\":1199547484,\"day\":\"tchealmf\",\"hour\":149792642,\"minute\":895344141,\"usedBytes\":2951445315314991952},\"monthlySchedule\":{\"snapshotsToKeep\":712155204,\"daysOfMonth\":\"piohgwxrtfu\",\"hour\":301260567,\"minute\":484829518,\"usedBytes\":8172843567981740181},\"enabled\":false,\"provisioningState\":\"rvmnpkukghimdblx\"},\"etag\":\"imfnjhfjx\",\"location\":\"szkkfoqre\",\"tags\":{\"fjawneaivxwczel\":\"zi\",\"r\":\"c\",\"xbjhwuaanozjosph\":\"lsfeaenwabfatkld\",\"ag\":\"oulpjrv\"},\"id\":\"rvimjwosytxitcsk\",\"name\":\"cktqumiekkezzi\",\"type\":\"hlyfjhdgqgg\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":248292806,\"minute\":1747128451,\"usedBytes\":5909328334374777052},\"dailySchedule\":{\"snapshotsToKeep\":277220596,\"hour\":1475802306,\"minute\":1233334035,\"usedBytes\":6620237582798297782},\"weeklySchedule\":{\"snapshotsToKeep\":48002498,\"day\":\"cyjmoadsuvarmy\",\"hour\":1450729079,\"minute\":981222471,\"usedBytes\":21711241553759485},\"monthlySchedule\":{\"snapshotsToKeep\":1682275079,\"daysOfMonth\":\"x\",\"hour\":1337445939,\"minute\":288329779,\"usedBytes\":4790240939770837417},\"enabled\":false,\"provisioningState\":\"kxkgymareqna\"},\"etag\":\"qugjhkycube\",\"location\":\"gssofwq\",\"tags\":{\"i\":\"alkrmn\"},\"id\":\"pxacqqudfn\",\"name\":\"yxbaaabjyvayf\",\"type\":\"imrzrtuzqog\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1754113707,\"minute\":2124595132,\"usedBytes\":3349292627980189663},\"dailySchedule\":{\"snapshotsToKeep\":2065284911,\"hour\":1417389324,\"minute\":473497877,\"usedBytes\":856618567781642953},\"weeklySchedule\":{\"snapshotsToKeep\":1091496648,\"day\":\"soibjudpfrx\",\"hour\":1839855586,\"minute\":747190122,\"usedBytes\":1649253814789212920},\"monthlySchedule\":{\"snapshotsToKeep\":1672690714,\"daysOfMonth\":\"qbrqubpaxhexiili\",\"hour\":1833047663,\"minute\":1539937555,\"usedBytes\":62353218674748426},\"enabled\":false,\"provisioningState\":\"oaxoruzfgsqu\"},\"etag\":\"xrxxlep\",\"location\":\"amxjezwlw\",\"tags\":{\"atdooaojkniod\":\"uqlcvydy\",\"bw\":\"oo\",\"infwjlfltkacjve\":\"ujhemmsbvdkcrodt\"},\"id\":\"kdlfoa\",\"name\":\"ggkfpagaowpul\",\"type\":\"qblylsyxkqj\"}],\"nextLink\":\"jervtia\"}") .toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("himdbl", model.value().get(0).tags().get("gwimfn")); - Assertions.assertEquals(980473752, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(740874462, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(5279516661370439683L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(385897981, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1130828460, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(518293394, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(3768237640733727043L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(817024636, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("wq", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(1018889547, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(1951861279, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(416295343158305691L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(669500000, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("aayg", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(2007823107, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(1689077175, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(3318683648203687085L, model.value().get(0).monthlySchedule().usedBytes()); + Assertions.assertEquals("szkkfoqre", model.value().get(0).location()); + Assertions.assertEquals("zi", model.value().get(0).tags().get("fjawneaivxwczel")); + Assertions.assertEquals(108895877, model.value().get(0).hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1925040131, model.value().get(0).hourlySchedule().minute()); + Assertions.assertEquals(5726286891049833981L, model.value().get(0).hourlySchedule().usedBytes()); + Assertions.assertEquals(2127430069, model.value().get(0).dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(742564082, model.value().get(0).dailySchedule().hour()); + Assertions.assertEquals(1429248323, model.value().get(0).dailySchedule().minute()); + Assertions.assertEquals(1003132087876898428L, model.value().get(0).dailySchedule().usedBytes()); + Assertions.assertEquals(1199547484, model.value().get(0).weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("tchealmf", model.value().get(0).weeklySchedule().day()); + Assertions.assertEquals(149792642, model.value().get(0).weeklySchedule().hour()); + Assertions.assertEquals(895344141, model.value().get(0).weeklySchedule().minute()); + Assertions.assertEquals(2951445315314991952L, model.value().get(0).weeklySchedule().usedBytes()); + Assertions.assertEquals(712155204, model.value().get(0).monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("piohgwxrtfu", model.value().get(0).monthlySchedule().daysOfMonth()); + Assertions.assertEquals(301260567, model.value().get(0).monthlySchedule().hour()); + Assertions.assertEquals(484829518, model.value().get(0).monthlySchedule().minute()); + Assertions.assertEquals(8172843567981740181L, model.value().get(0).monthlySchedule().usedBytes()); Assertions.assertFalse(model.value().get(0).enabled()); - Assertions.assertEquals("eyvpnqicvinvkj", model.nextLink()); + Assertions.assertEquals("jervtia", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java index bc5442e2924d2..0f881685a2841 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java @@ -18,73 +18,72 @@ public final class SnapshotPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1598005613,\"minute\":1083170526,\"usedBytes\":5889064558086386603},\"dailySchedule\":{\"snapshotsToKeep\":1838860649,\"hour\":11863753,\"minute\":1364703724,\"usedBytes\":5676956114589904637},\"weeklySchedule\":{\"snapshotsToKeep\":1397433575,\"day\":\"qgxy\",\"hour\":1746293745,\"minute\":1907336189,\"usedBytes\":7994634529123000792},\"monthlySchedule\":{\"snapshotsToKeep\":484454898,\"daysOfMonth\":\"cxozapvhelxp\",\"hour\":599775917,\"minute\":1207488512,\"usedBytes\":1729923694834862702},\"enabled\":false,\"provisioningState\":\"bcuejrjxgci\"},\"etag\":\"brh\",\"location\":\"xsdqrhzoymibmrqy\",\"tags\":{\"zdtmhrkwofy\":\"hwflu\",\"iwbwoenwashrtdtk\":\"voqacpiexpbt\",\"kulpiujwaasi\":\"nqxwbp\",\"qlpqwcciuq\":\"qiiobyuqer\"},\"id\":\"bdbutauvf\",\"name\":\"tkuwhhmhykojo\",\"type\":\"afnn\"}") + "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1949252963,\"minute\":612337028,\"usedBytes\":3371705957020271141},\"dailySchedule\":{\"snapshotsToKeep\":703095811,\"hour\":1882166065,\"minute\":341443712,\"usedBytes\":4262007788493519907},\"weeklySchedule\":{\"snapshotsToKeep\":200151668,\"day\":\"i\",\"hour\":473954492,\"minute\":812505700,\"usedBytes\":5977240495404401854},\"monthlySchedule\":{\"snapshotsToKeep\":2064087160,\"daysOfMonth\":\"uszdtmhrkwof\",\"hour\":1026914225,\"minute\":1655642589,\"usedBytes\":3128403191057057060},\"enabled\":false,\"provisioningState\":\"pbtg\"},\"etag\":\"bwoenwashrt\",\"location\":\"kcnqxwbpo\",\"tags\":{\"jwaa\":\"pi\",\"pqwcciuqgbdbutau\":\"ipqiiobyuqerpq\"},\"id\":\"fbtkuwhhmhyk\",\"name\":\"joxafnndlpi\",\"type\":\"hkoymkcdyhbp\"}") .toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.location()); - Assertions.assertEquals("hwflu", model.tags().get("zdtmhrkwofy")); - Assertions.assertEquals(1598005613, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1083170526, model.hourlySchedule().minute()); - Assertions.assertEquals(5889064558086386603L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1838860649, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(11863753, model.dailySchedule().hour()); - Assertions.assertEquals(1364703724, model.dailySchedule().minute()); - Assertions.assertEquals(5676956114589904637L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1397433575, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qgxy", model.weeklySchedule().day()); - Assertions.assertEquals(1746293745, model.weeklySchedule().hour()); - Assertions.assertEquals(1907336189, model.weeklySchedule().minute()); - Assertions.assertEquals(7994634529123000792L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(484454898, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("cxozapvhelxp", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(599775917, model.monthlySchedule().hour()); - Assertions.assertEquals(1207488512, model.monthlySchedule().minute()); - Assertions.assertEquals(1729923694834862702L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("kcnqxwbpo", model.location()); + Assertions.assertEquals("pi", model.tags().get("jwaa")); + Assertions.assertEquals(1949252963, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(612337028, model.hourlySchedule().minute()); + Assertions.assertEquals(3371705957020271141L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(703095811, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1882166065, model.dailySchedule().hour()); + Assertions.assertEquals(341443712, model.dailySchedule().minute()); + Assertions.assertEquals(4262007788493519907L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(200151668, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("i", model.weeklySchedule().day()); + Assertions.assertEquals(473954492, model.weeklySchedule().hour()); + Assertions.assertEquals(812505700, model.weeklySchedule().minute()); + Assertions.assertEquals(5977240495404401854L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(2064087160, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("uszdtmhrkwof", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1026914225, model.monthlySchedule().hour()); + Assertions.assertEquals(1655642589, model.monthlySchedule().minute()); + Assertions.assertEquals(3128403191057057060L, model.monthlySchedule().usedBytes()); Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("xsdqrhzoymibmrqy") - .withTags(mapOf("zdtmhrkwofy", "hwflu", "iwbwoenwashrtdtk", "voqacpiexpbt", "kulpiujwaasi", "nqxwbp", - "qlpqwcciuq", "qiiobyuqer")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1598005613) - .withMinute(1083170526) - .withUsedBytes(5889064558086386603L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1838860649) - .withHour(11863753) - .withMinute(1364703724) - .withUsedBytes(5676956114589904637L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1397433575) - .withDay("qgxy") - .withHour(1746293745) - .withMinute(1907336189) - .withUsedBytes(7994634529123000792L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(484454898) - .withDaysOfMonth("cxozapvhelxp") - .withHour(599775917) - .withMinute(1207488512) - .withUsedBytes(1729923694834862702L)) + SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("kcnqxwbpo") + .withTags(mapOf("jwaa", "pi", "pqwcciuqgbdbutau", "ipqiiobyuqerpq")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1949252963) + .withMinute(612337028) + .withUsedBytes(3371705957020271141L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(703095811) + .withHour(1882166065) + .withMinute(341443712) + .withUsedBytes(4262007788493519907L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(200151668) + .withDay("i") + .withHour(473954492) + .withMinute(812505700) + .withUsedBytes(5977240495404401854L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(2064087160) + .withDaysOfMonth("uszdtmhrkwof") + .withHour(1026914225) + .withMinute(1655642589) + .withUsedBytes(3128403191057057060L)) .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.location()); - Assertions.assertEquals("hwflu", model.tags().get("zdtmhrkwofy")); - Assertions.assertEquals(1598005613, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1083170526, model.hourlySchedule().minute()); - Assertions.assertEquals(5889064558086386603L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1838860649, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(11863753, model.dailySchedule().hour()); - Assertions.assertEquals(1364703724, model.dailySchedule().minute()); - Assertions.assertEquals(5676956114589904637L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1397433575, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qgxy", model.weeklySchedule().day()); - Assertions.assertEquals(1746293745, model.weeklySchedule().hour()); - Assertions.assertEquals(1907336189, model.weeklySchedule().minute()); - Assertions.assertEquals(7994634529123000792L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(484454898, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("cxozapvhelxp", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(599775917, model.monthlySchedule().hour()); - Assertions.assertEquals(1207488512, model.monthlySchedule().minute()); - Assertions.assertEquals(1729923694834862702L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("kcnqxwbpo", model.location()); + Assertions.assertEquals("pi", model.tags().get("jwaa")); + Assertions.assertEquals(1949252963, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(612337028, model.hourlySchedule().minute()); + Assertions.assertEquals(3371705957020271141L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(703095811, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1882166065, model.dailySchedule().hour()); + Assertions.assertEquals(341443712, model.dailySchedule().minute()); + Assertions.assertEquals(4262007788493519907L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(200151668, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("i", model.weeklySchedule().day()); + Assertions.assertEquals(473954492, model.weeklySchedule().hour()); + Assertions.assertEquals(812505700, model.weeklySchedule().minute()); + Assertions.assertEquals(5977240495404401854L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(2064087160, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("uszdtmhrkwof", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1026914225, model.monthlySchedule().hour()); + Assertions.assertEquals(1655642589, model.monthlySchedule().minute()); + Assertions.assertEquals(3128403191057057060L, model.monthlySchedule().usedBytes()); Assertions.assertFalse(model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java index cc13d9fa5f6f3..6e7dd718f755c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java @@ -18,72 +18,72 @@ public final class SnapshotPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyPatch model = BinaryData.fromString( - "{\"location\":\"orzihle\",\"id\":\"jswsrmslyz\",\"name\":\"zbchckqqzqioxiy\",\"type\":\"iizynkedyatrwyh\",\"tags\":{\"itsmypyyn\":\"bzyh\",\"nzgmwznmabik\":\"cdpu\",\"xbldtlwwrlkdmtn\":\"sorgj\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1063361933,\"minute\":1941310787,\"usedBytes\":2765803061420771171},\"dailySchedule\":{\"snapshotsToKeep\":2005759666,\"hour\":36323388,\"minute\":427983093,\"usedBytes\":4877471072225031792},\"weeklySchedule\":{\"snapshotsToKeep\":1628620903,\"day\":\"bnnhadoocrkvcik\",\"hour\":600474862,\"minute\":1533049967,\"usedBytes\":3968582438542794420},\"monthlySchedule\":{\"snapshotsToKeep\":1810691305,\"daysOfMonth\":\"ezikywggxkal\",\"hour\":1147972125,\"minute\":1870481937,\"usedBytes\":5796358058175213416},\"enabled\":true,\"provisioningState\":\"ccjzkzivgvv\"}}") + "{\"location\":\"w\",\"id\":\"mslyzrpzbchckqqz\",\"name\":\"ox\",\"type\":\"suiizynkedyat\",\"tags\":{\"mypyynpcdpu\":\"hqmibzyhwit\",\"sorgj\":\"nzgmwznmabik\",\"vokotllxdyh\":\"xbldtlwwrlkdmtn\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":427983093,\"minute\":1135624729,\"usedBytes\":2098330743858549719},\"dailySchedule\":{\"snapshotsToKeep\":1820306867,\"hour\":886343303,\"minute\":195703706,\"usedBytes\":4404179597869624816},\"weeklySchedule\":{\"snapshotsToKeep\":948301726,\"day\":\"cikhnv\",\"hour\":703916773,\"minute\":254959284,\"usedBytes\":3042621608153642217},\"monthlySchedule\":{\"snapshotsToKeep\":1862318440,\"daysOfMonth\":\"kywggxkallatmel\",\"hour\":1138450132,\"minute\":1750624466,\"usedBytes\":4740858947759401461},\"enabled\":true,\"provisioningState\":\"ivgvvcna\"}}") .toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("orzihle", model.location()); - Assertions.assertEquals("bzyh", model.tags().get("itsmypyyn")); - Assertions.assertEquals(1063361933, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1941310787, model.hourlySchedule().minute()); - Assertions.assertEquals(2765803061420771171L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(2005759666, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(36323388, model.dailySchedule().hour()); - Assertions.assertEquals(427983093, model.dailySchedule().minute()); - Assertions.assertEquals(4877471072225031792L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1628620903, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("bnnhadoocrkvcik", model.weeklySchedule().day()); - Assertions.assertEquals(600474862, model.weeklySchedule().hour()); - Assertions.assertEquals(1533049967, model.weeklySchedule().minute()); - Assertions.assertEquals(3968582438542794420L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1810691305, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("ezikywggxkal", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1147972125, model.monthlySchedule().hour()); - Assertions.assertEquals(1870481937, model.monthlySchedule().minute()); - Assertions.assertEquals(5796358058175213416L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("w", model.location()); + Assertions.assertEquals("hqmibzyhwit", model.tags().get("mypyynpcdpu")); + Assertions.assertEquals(427983093, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1135624729, model.hourlySchedule().minute()); + Assertions.assertEquals(2098330743858549719L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1820306867, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(886343303, model.dailySchedule().hour()); + Assertions.assertEquals(195703706, model.dailySchedule().minute()); + Assertions.assertEquals(4404179597869624816L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(948301726, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cikhnv", model.weeklySchedule().day()); + Assertions.assertEquals(703916773, model.weeklySchedule().hour()); + Assertions.assertEquals(254959284, model.weeklySchedule().minute()); + Assertions.assertEquals(3042621608153642217L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1862318440, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("kywggxkallatmel", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1138450132, model.monthlySchedule().hour()); + Assertions.assertEquals(1750624466, model.monthlySchedule().minute()); + Assertions.assertEquals(4740858947759401461L, model.monthlySchedule().usedBytes()); Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("orzihle") - .withTags(mapOf("itsmypyyn", "bzyh", "nzgmwznmabik", "cdpu", "xbldtlwwrlkdmtn", "sorgj")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1063361933) - .withMinute(1941310787) - .withUsedBytes(2765803061420771171L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(2005759666) - .withHour(36323388) - .withMinute(427983093) - .withUsedBytes(4877471072225031792L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1628620903) - .withDay("bnnhadoocrkvcik") - .withHour(600474862) - .withMinute(1533049967) - .withUsedBytes(3968582438542794420L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1810691305) - .withDaysOfMonth("ezikywggxkal") - .withHour(1147972125) - .withMinute(1870481937) - .withUsedBytes(5796358058175213416L)) + SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("w") + .withTags(mapOf("mypyynpcdpu", "hqmibzyhwit", "sorgj", "nzgmwznmabik", "vokotllxdyh", "xbldtlwwrlkdmtn")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(427983093) + .withMinute(1135624729) + .withUsedBytes(2098330743858549719L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1820306867) + .withHour(886343303) + .withMinute(195703706) + .withUsedBytes(4404179597869624816L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(948301726) + .withDay("cikhnv") + .withHour(703916773) + .withMinute(254959284) + .withUsedBytes(3042621608153642217L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1862318440) + .withDaysOfMonth("kywggxkallatmel") + .withHour(1138450132) + .withMinute(1750624466) + .withUsedBytes(4740858947759401461L)) .withEnabled(true); model = BinaryData.fromObject(model).toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("orzihle", model.location()); - Assertions.assertEquals("bzyh", model.tags().get("itsmypyyn")); - Assertions.assertEquals(1063361933, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1941310787, model.hourlySchedule().minute()); - Assertions.assertEquals(2765803061420771171L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(2005759666, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(36323388, model.dailySchedule().hour()); - Assertions.assertEquals(427983093, model.dailySchedule().minute()); - Assertions.assertEquals(4877471072225031792L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1628620903, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("bnnhadoocrkvcik", model.weeklySchedule().day()); - Assertions.assertEquals(600474862, model.weeklySchedule().hour()); - Assertions.assertEquals(1533049967, model.weeklySchedule().minute()); - Assertions.assertEquals(3968582438542794420L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1810691305, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("ezikywggxkal", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1147972125, model.monthlySchedule().hour()); - Assertions.assertEquals(1870481937, model.monthlySchedule().minute()); - Assertions.assertEquals(5796358058175213416L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals("w", model.location()); + Assertions.assertEquals("hqmibzyhwit", model.tags().get("mypyynpcdpu")); + Assertions.assertEquals(427983093, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1135624729, model.hourlySchedule().minute()); + Assertions.assertEquals(2098330743858549719L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1820306867, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(886343303, model.dailySchedule().hour()); + Assertions.assertEquals(195703706, model.dailySchedule().minute()); + Assertions.assertEquals(4404179597869624816L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(948301726, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cikhnv", model.weeklySchedule().day()); + Assertions.assertEquals(703916773, model.weeklySchedule().hour()); + Assertions.assertEquals(254959284, model.weeklySchedule().minute()); + Assertions.assertEquals(3042621608153642217L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1862318440, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("kywggxkallatmel", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1138450132, model.monthlySchedule().hour()); + Assertions.assertEquals(1750624466, model.monthlySchedule().minute()); + Assertions.assertEquals(4740858947759401461L, model.monthlySchedule().usedBytes()); Assertions.assertTrue(model.enabled()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java index 9b9ca6df0eefa..b8015de4b2ffd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java @@ -16,67 +16,67 @@ public final class SnapshotPolicyPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":1324529031,\"minute\":906567669,\"usedBytes\":735752608656011593},\"dailySchedule\":{\"snapshotsToKeep\":1638328793,\"hour\":1909436106,\"minute\":103737339,\"usedBytes\":5424299492153823992},\"weeklySchedule\":{\"snapshotsToKeep\":426200809,\"day\":\"eqnovvqfovl\",\"hour\":1752726450,\"minute\":450264224,\"usedBytes\":85714511864404008},\"monthlySchedule\":{\"snapshotsToKeep\":188945883,\"daysOfMonth\":\"dsytgadgvr\",\"hour\":890415173,\"minute\":884783389,\"usedBytes\":8790170709983104417},\"enabled\":false,\"provisioningState\":\"rwlqu\"}") + "{\"hourlySchedule\":{\"snapshotsToKeep\":1428565378,\"minute\":722591670,\"usedBytes\":379328521097919644},\"dailySchedule\":{\"snapshotsToKeep\":436930302,\"hour\":217402337,\"minute\":1985211204,\"usedBytes\":8169204764307144926},\"weeklySchedule\":{\"snapshotsToKeep\":450264224,\"day\":\"w\",\"hour\":1405607916,\"minute\":200190444,\"usedBytes\":4579993960866529408},\"monthlySchedule\":{\"snapshotsToKeep\":703854152,\"daysOfMonth\":\"gvraeaen\",\"hour\":999689633,\"minute\":1893939111,\"usedBytes\":5418047259495493586},\"enabled\":false,\"provisioningState\":\"uijfqk\"}") .toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(1324529031, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(906567669, model.hourlySchedule().minute()); - Assertions.assertEquals(735752608656011593L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1638328793, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1909436106, model.dailySchedule().hour()); - Assertions.assertEquals(103737339, model.dailySchedule().minute()); - Assertions.assertEquals(5424299492153823992L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(426200809, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("eqnovvqfovl", model.weeklySchedule().day()); - Assertions.assertEquals(1752726450, model.weeklySchedule().hour()); - Assertions.assertEquals(450264224, model.weeklySchedule().minute()); - Assertions.assertEquals(85714511864404008L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(188945883, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("dsytgadgvr", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(890415173, model.monthlySchedule().hour()); - Assertions.assertEquals(884783389, model.monthlySchedule().minute()); - Assertions.assertEquals(8790170709983104417L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals(1428565378, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(722591670, model.hourlySchedule().minute()); + Assertions.assertEquals(379328521097919644L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(436930302, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(217402337, model.dailySchedule().hour()); + Assertions.assertEquals(1985211204, model.dailySchedule().minute()); + Assertions.assertEquals(8169204764307144926L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(450264224, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("w", model.weeklySchedule().day()); + Assertions.assertEquals(1405607916, model.weeklySchedule().hour()); + Assertions.assertEquals(200190444, model.weeklySchedule().minute()); + Assertions.assertEquals(4579993960866529408L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(703854152, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("gvraeaen", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(999689633, model.monthlySchedule().hour()); + Assertions.assertEquals(1893939111, model.monthlySchedule().minute()); + Assertions.assertEquals(5418047259495493586L, model.monthlySchedule().usedBytes()); Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SnapshotPolicyProperties model = new SnapshotPolicyProperties() - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1324529031) - .withMinute(906567669) - .withUsedBytes(735752608656011593L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1638328793) - .withHour(1909436106) - .withMinute(103737339) - .withUsedBytes(5424299492153823992L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(426200809) - .withDay("eqnovvqfovl") - .withHour(1752726450) - .withMinute(450264224) - .withUsedBytes(85714511864404008L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(188945883) - .withDaysOfMonth("dsytgadgvr") - .withHour(890415173) - .withMinute(884783389) - .withUsedBytes(8790170709983104417L)) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1428565378) + .withMinute(722591670) + .withUsedBytes(379328521097919644L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(436930302) + .withHour(217402337) + .withMinute(1985211204) + .withUsedBytes(8169204764307144926L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(450264224) + .withDay("w") + .withHour(1405607916) + .withMinute(200190444) + .withUsedBytes(4579993960866529408L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(703854152) + .withDaysOfMonth("gvraeaen") + .withHour(999689633) + .withMinute(1893939111) + .withUsedBytes(5418047259495493586L)) .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(1324529031, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(906567669, model.hourlySchedule().minute()); - Assertions.assertEquals(735752608656011593L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1638328793, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1909436106, model.dailySchedule().hour()); - Assertions.assertEquals(103737339, model.dailySchedule().minute()); - Assertions.assertEquals(5424299492153823992L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(426200809, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("eqnovvqfovl", model.weeklySchedule().day()); - Assertions.assertEquals(1752726450, model.weeklySchedule().hour()); - Assertions.assertEquals(450264224, model.weeklySchedule().minute()); - Assertions.assertEquals(85714511864404008L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(188945883, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("dsytgadgvr", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(890415173, model.monthlySchedule().hour()); - Assertions.assertEquals(884783389, model.monthlySchedule().minute()); - Assertions.assertEquals(8790170709983104417L, model.monthlySchedule().usedBytes()); + Assertions.assertEquals(1428565378, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(722591670, model.hourlySchedule().minute()); + Assertions.assertEquals(379328521097919644L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(436930302, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(217402337, model.dailySchedule().hour()); + Assertions.assertEquals(1985211204, model.dailySchedule().minute()); + Assertions.assertEquals(8169204764307144926L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(450264224, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("w", model.weeklySchedule().day()); + Assertions.assertEquals(1405607916, model.weeklySchedule().hour()); + Assertions.assertEquals(200190444, model.weeklySchedule().minute()); + Assertions.assertEquals(4579993960866529408L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(703854152, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("gvraeaen", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(999689633, model.monthlySchedule().hour()); + Assertions.assertEquals(1893939111, model.monthlySchedule().minute()); + Assertions.assertEquals(5418047259495493586L, model.monthlySchedule().usedBytes()); Assertions.assertFalse(model.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java index 9f5d32582bc59..811debeeeda95 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java @@ -12,7 +12,7 @@ public final class SnapshotPropertiesTests { public void testDeserialize() throws Exception { SnapshotProperties model = BinaryData .fromString( - "{\"snapshotId\":\"vpk\",\"created\":\"2021-07-30T07:38:12Z\",\"provisioningState\":\"vdrhvoo\"}") + "{\"snapshotId\":\"sbpfvmwyhr\",\"created\":\"2021-01-24T04:18:46Z\",\"provisioningState\":\"ft\"}") .toObject(SnapshotProperties.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java index 4edee4200f05d..4c0080fd07173 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java @@ -13,18 +13,18 @@ public final class SnapshotRestoreFilesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotRestoreFiles model - = BinaryData.fromString("{\"filePaths\":[\"cpwi\",\"zvqtmnubexkp\"],\"destinationPath\":\"smond\"}") + = BinaryData.fromString("{\"filePaths\":[\"vmkcx\",\"zapvhelx\"],\"destinationPath\":\"glyatddckcbcuej\"}") .toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("cpwi", model.filePaths().get(0)); - Assertions.assertEquals("smond", model.destinationPath()); + Assertions.assertEquals("vmkcx", model.filePaths().get(0)); + Assertions.assertEquals("glyatddckcbcuej", model.destinationPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotRestoreFiles model = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("cpwi", "zvqtmnubexkp")) - .withDestinationPath("smond"); + SnapshotRestoreFiles model = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("vmkcx", "zapvhelx")) + .withDestinationPath("glyatddckcbcuej"); model = BinaryData.fromObject(model).toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("cpwi", model.filePaths().get(0)); - Assertions.assertEquals("smond", model.destinationPath()); + Assertions.assertEquals("vmkcx", model.filePaths().get(0)); + Assertions.assertEquals("glyatddckcbcuej", model.destinationPath()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java index 2c621b839bf42..6391807a4ae64 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 @@ -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.snapshots() - .delete("wkpqhjpenuygbq", "qqekewvnqvcdlgu", "ucmfdj", "nlaxpunjqikcz", "vitac", - com.azure.core.util.Context.NONE); + manager.snapshots().delete("aewse", "vesk", "xegqphr", "fn", "hctmjtsgh", 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 3e12c5aea7b04..2884c173c735a 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\":\"ktsysidfvclglxn\",\"created\":\"2021-09-07T01:07:02Z\",\"provisioningState\":\"tkbu\"},\"location\":\"qogsfikayian\",\"id\":\"arujt\",\"name\":\"iqxf\",\"type\":\"yjqtt\"}"; + = "{\"properties\":{\"snapshotId\":\"pphepifexl\",\"created\":\"2021-01-07T13:48:28Z\",\"provisioningState\":\"ccjclykcgxvrpjlv\"},\"location\":\"zuodacpun\",\"id\":\"tepdjxqes\",\"name\":\"oy\",\"type\":\"uiylpc\"}"; 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("razftxejwabmdujt", "vcopex", "m", "urbuhhlkyqltq", "rogtuwkf", + .getWithResponse("uqqoaj", "eiyglesrwvaexhdc", "rceqnkbrupob", "hdmljz", "cvumepjpbi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qogsfikayian", response.location()); + Assertions.assertEquals("zuodacpun", 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 336b265940a95..9c5ef375a8a27 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\":\"u\",\"created\":\"2021-03-03T11:10:41Z\",\"provisioningState\":\"hrszi\"},\"location\":\"oyuelyetn\",\"id\":\"bf\",\"name\":\"yggagflnlgmt\",\"type\":\"wahzjmucftbyr\"}]}"; + = "{\"value\":[{\"properties\":{\"snapshotId\":\"uytuszxhmtvtv\",\"created\":\"2021-11-02T07:58:42Z\",\"provisioningState\":\"iukvzwydwt\"},\"location\":\"haokgkskjiv\",\"id\":\"shajqf\",\"name\":\"kpeexpgeumilh\",\"type\":\"uitrdexyiono\"}]}"; 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("xmfcsserxhtv", "oxhlw", "tsjgqrsx", "p", com.azure.core.util.Context.NONE); + PagedIterable response = manager.snapshots() + .list("bcbcpz", "rpzeqac", "ldtzmpypefcp", "zshnuqndaizup", com.azure.core.util.Context.NONE); - Assertions.assertEquals("oyuelyetn", response.iterator().next().location()); + Assertions.assertEquals("haokgkskjiv", response.iterator().next().location()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java index 6543dff1aa355..586763738f8bb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java @@ -12,9 +12,9 @@ public final class SnapshotsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"snapshotId\":\"bobzdopcjwvnhd\",\"created\":\"2021-11-29T05:13:59Z\",\"provisioningState\":\"gx\"},\"location\":\"xrslpm\",\"id\":\"wuoegrpk\",\"name\":\"jw\",\"type\":\"iyq\"},{\"properties\":{\"snapshotId\":\"i\",\"created\":\"2021-04-15T16:21:59Z\",\"provisioningState\":\"gk\"},\"location\":\"zl\",\"id\":\"bmpaxmodfvu\",\"name\":\"fy\",\"type\":\"sbpfvmwyhr\"}],\"nextLink\":\"uyfta\"}") + "{\"value\":[{\"properties\":{\"snapshotId\":\"pwiyzvqtm\",\"created\":\"2021-09-22T09:26:58Z\",\"provisioningState\":\"xkp\"},\"location\":\"ksmond\",\"id\":\"quxvypomgkop\",\"name\":\"whojvp\",\"type\":\"jqg\"}],\"nextLink\":\"smocmbq\"}") .toObject(SnapshotsList.class); - Assertions.assertEquals("xrslpm", model.value().get(0).location()); - Assertions.assertEquals("uyfta", model.nextLink()); + Assertions.assertEquals("ksmond", model.value().get(0).location()); + Assertions.assertEquals("smocmbq", model.nextLink()); } } 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 1156fc639f75f..9b7e15f439bea 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,8 @@ public void testRestoreFiles() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .restoreFiles("lrohkpig", "fusuckzmkwklsno", "axmqeqal", "hjnhgwydyynfsvk", "gbv", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("anarfdlpukhpyrne")) - .withDestinationPath("jcpeogkhnmg"), + .restoreFiles("ninbdbzsxcwqqrs", "pcbbprtugav", "zbcyksiv", "fogdrtbfcm", "rftsjcwjjxs", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("bawvif")).withDestinationPath("kecifhocjxwklo"), 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 c4ae76f7dfef8..e88b1708b8d13 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\":\"jln\",\"size\":7832118523787674776,\"parentPath\":\"kknhxkizvytnrzv\",\"provisioningState\":\"jraaeranokqguk\"},\"id\":\"qnvb\",\"name\":\"oylaxxul\",\"type\":\"disdosfjbjsvgj\"}") + "{\"properties\":{\"path\":\"kpdxphlk\",\"size\":8827053042318274582,\"parentPath\":\"zvyfijdkzuqnwsi\",\"provisioningState\":\"uqoly\"},\"id\":\"luqw\",\"name\":\"ulsutrjbhxy\",\"type\":\"fhyqezvqqugdrft\"}") .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("jln", model.path()); - Assertions.assertEquals(7832118523787674776L, model.size()); - Assertions.assertEquals("kknhxkizvytnrzv", model.parentPath()); + Assertions.assertEquals("kpdxphlk", model.path()); + Assertions.assertEquals(8827053042318274582L, model.size()); + Assertions.assertEquals("zvyfijdkzuqnwsi", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("jln").withSize(7832118523787674776L).withParentPath("kknhxkizvytnrzv"); + SubvolumeInfoInner model = new SubvolumeInfoInner().withPath("kpdxphlk") + .withSize(8827053042318274582L) + .withParentPath("zvyfijdkzuqnwsi"); model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("jln", model.path()); - Assertions.assertEquals(7832118523787674776L, model.size()); - Assertions.assertEquals("kknhxkizvytnrzv", model.parentPath()); + Assertions.assertEquals("kpdxphlk", model.path()); + Assertions.assertEquals(8827053042318274582L, model.size()); + Assertions.assertEquals("zvyfijdkzuqnwsi", 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 e6b5ea10c6629..52ebf719bd03b 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\":\"xveabf\",\"name\":\"nmwmqtibx\",\"type\":\"jddtvqct\",\"properties\":{\"path\":\"ijaeukm\",\"parentPath\":\"ieekpndzaa\",\"size\":7283307395522118208,\"bytesUsed\":6361487186249709697,\"permissions\":\"wig\",\"creationTimeStamp\":\"2021-01-11T14:04:16Z\",\"accessedTimeStamp\":\"2021-03-01T10:31:46Z\",\"modifiedTimeStamp\":\"2021-02-22T09:02:50Z\",\"changedTimeStamp\":\"2021-08-03T00:24:18Z\",\"provisioningState\":\"beybpmzznrtffyaq\"}}") + "{\"id\":\"t\",\"name\":\"agttm\",\"type\":\"magoaqylkjz\",\"properties\":{\"path\":\"uazjcgmxitpfinz\",\"parentPath\":\"dltkrlg\",\"size\":1755624181033644415,\"bytesUsed\":7645914908879729151,\"permissions\":\"qgu\",\"creationTimeStamp\":\"2021-08-11T14:10:25Z\",\"accessedTimeStamp\":\"2021-12-05T12:23:33Z\",\"modifiedTimeStamp\":\"2021-03-17T13:59:32Z\",\"changedTimeStamp\":\"2021-07-11T07:34:42Z\",\"provisioningState\":\"urelyujlfyoump\"}}") .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("ijaeukm", model.path()); - Assertions.assertEquals("ieekpndzaa", model.parentPath()); - Assertions.assertEquals(7283307395522118208L, model.size()); - Assertions.assertEquals(6361487186249709697L, model.bytesUsed()); - Assertions.assertEquals("wig", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T14:04:16Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T10:31:46Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T09:02:50Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-03T00:24:18Z"), model.changedTimestamp()); - Assertions.assertEquals("beybpmzznrtffyaq", model.provisioningState()); + Assertions.assertEquals("uazjcgmxitpfinz", model.path()); + Assertions.assertEquals("dltkrlg", model.parentPath()); + Assertions.assertEquals(1755624181033644415L, model.size()); + Assertions.assertEquals(7645914908879729151L, model.bytesUsed()); + Assertions.assertEquals("qgu", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T14:10:25Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T12:23:33Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T13:59:32Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T07:34:42Z"), model.changedTimestamp()); + Assertions.assertEquals("urelyujlfyoump", 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 85728f16b2377..ce921def8cde6 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\":\"mhh\",\"parentPath\":\"oqaqhvseufuq\",\"size\":3020354173137847735,\"bytesUsed\":1938884126679882706,\"permissions\":\"qlsismjqfrddg\",\"creationTimeStamp\":\"2021-11-04T14:38:26Z\",\"accessedTimeStamp\":\"2021-07-22T03:14:28Z\",\"modifiedTimeStamp\":\"2021-11-01T12:33:10Z\",\"changedTimeStamp\":\"2021-02-24T16:08:22Z\",\"provisioningState\":\"ju\"}") + "{\"path\":\"yec\",\"parentPath\":\"digp\",\"size\":2451535498226197931,\"bytesUsed\":1037126378625413919,\"permissions\":\"xucycijoclxi\",\"creationTimeStamp\":\"2021-03-25T03:30:21Z\",\"accessedTimeStamp\":\"2021-08-12T23:35:09Z\",\"modifiedTimeStamp\":\"2021-04-16T10:05:10Z\",\"changedTimeStamp\":\"2021-07-31T02:50:48Z\",\"provisioningState\":\"dnrqjbtxj\"}") .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("mhh", model.path()); - Assertions.assertEquals("oqaqhvseufuq", model.parentPath()); - Assertions.assertEquals(3020354173137847735L, model.size()); - Assertions.assertEquals(1938884126679882706L, model.bytesUsed()); - Assertions.assertEquals("qlsismjqfrddg", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T14:38:26Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T03:14:28Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T12:33:10Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T16:08:22Z"), model.changedTimestamp()); - Assertions.assertEquals("ju", model.provisioningState()); + Assertions.assertEquals("yec", model.path()); + Assertions.assertEquals("digp", model.parentPath()); + Assertions.assertEquals(2451535498226197931L, model.size()); + Assertions.assertEquals(1037126378625413919L, model.bytesUsed()); + Assertions.assertEquals("xucycijoclxi", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T03:30:21Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T23:35:09Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T10:05:10Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T02:50:48Z"), model.changedTimestamp()); + Assertions.assertEquals("dnrqjbtxj", 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 c0c29bbbc4255..7d654251ba10c 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,17 +11,17 @@ public final class SubvolumePatchParamsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SubvolumePatchParams model = BinaryData.fromString("{\"size\":2282885407091220390,\"path\":\"bg\"}") + SubvolumePatchParams model = BinaryData.fromString("{\"size\":7130735893149807397,\"path\":\"g\"}") .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(2282885407091220390L, model.size()); - Assertions.assertEquals("bg", model.path()); + Assertions.assertEquals(7130735893149807397L, model.size()); + Assertions.assertEquals("g", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchParams model = new SubvolumePatchParams().withSize(2282885407091220390L).withPath("bg"); + SubvolumePatchParams model = new SubvolumePatchParams().withSize(7130735893149807397L).withPath("g"); model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(2282885407091220390L, model.size()); - Assertions.assertEquals("bg", model.path()); + Assertions.assertEquals(7130735893149807397L, model.size()); + Assertions.assertEquals("g", 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 245237c0cfc6d..85f0542d31b0d 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,18 +12,18 @@ public final class SubvolumePatchRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":4806267712213844002,\"path\":\"hchrphkmcrjdqn\"}}") + = BinaryData.fromString("{\"properties\":{\"size\":3191392767848356163,\"path\":\"lmdgglmepjp\"}}") .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(4806267712213844002L, model.size()); - Assertions.assertEquals("hchrphkmcrjdqn", model.path()); + Assertions.assertEquals(3191392767848356163L, model.size()); + Assertions.assertEquals("lmdgglmepjp", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumePatchRequest model - = new SubvolumePatchRequest().withSize(4806267712213844002L).withPath("hchrphkmcrjdqn"); + = new SubvolumePatchRequest().withSize(3191392767848356163L).withPath("lmdgglmepjp"); model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(4806267712213844002L, model.size()); - Assertions.assertEquals("hchrphkmcrjdqn", model.path()); + Assertions.assertEquals(3191392767848356163L, model.size()); + Assertions.assertEquals("lmdgglmepjp", 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 273d572013cc0..9e67b46c60103 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\":\"hryvy\",\"size\":303966764138451179,\"parentPath\":\"lxgccknfnwmbtm\",\"provisioningState\":\"dvjdhttza\"}") + "{\"path\":\"ve\",\"size\":798811341522580180,\"parentPath\":\"uowtljvfwhrea\",\"provisioningState\":\"hyxvrqt\"}") .toObject(SubvolumeProperties.class); - Assertions.assertEquals("hryvy", model.path()); - Assertions.assertEquals(303966764138451179L, model.size()); - Assertions.assertEquals("lxgccknfnwmbtm", model.parentPath()); + Assertions.assertEquals("ve", model.path()); + Assertions.assertEquals(798811341522580180L, model.size()); + Assertions.assertEquals("uowtljvfwhrea", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("hryvy") - .withSize(303966764138451179L) - .withParentPath("lxgccknfnwmbtm"); + SubvolumeProperties model + = new SubvolumeProperties().withPath("ve").withSize(798811341522580180L).withParentPath("uowtljvfwhrea"); model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("hryvy", model.path()); - Assertions.assertEquals(303966764138451179L, model.size()); - Assertions.assertEquals("lxgccknfnwmbtm", model.parentPath()); + Assertions.assertEquals("ve", model.path()); + Assertions.assertEquals(798811341522580180L, model.size()); + Assertions.assertEquals("uowtljvfwhrea", 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 eb99abf1e144b..e974e9ee4d77c 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\":\"kvlbpktgdstyoua\",\"size\":5294070244867656096,\"parentPath\":\"esw\",\"provisioningState\":\"Succeeded\"},\"id\":\"uteyxeyguq\",\"name\":\"gijiitnspxlzd\",\"type\":\"sygrijwa\"}"; + = "{\"properties\":{\"path\":\"mebgszplu\",\"size\":1343401456195725400,\"parentPath\":\"dzzmssgpgv\",\"provisioningState\":\"Succeeded\"},\"id\":\"wztlvvwsnmrkky\",\"name\":\"trepw\",\"type\":\"wfkcauxuvavcpf\"}"; 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("clid") - .withExistingVolume("qumq", "jgydzul", "dsaeuzanhsfnh", "enwphpzfngq") - .withPath("jwjj") - .withSize(971806524293082500L) - .withParentPath("qrkuor") + .define("aj") + .withExistingVolume("bwjjirmuydgf", "tmdofgeoag", "uoft", "xodwxm") + .withPath("g") + .withSize(6618101144590929737L) + .withParentPath("mdmze") .create(); - Assertions.assertEquals("kvlbpktgdstyoua", response.path()); - Assertions.assertEquals(5294070244867656096L, response.size()); - Assertions.assertEquals("esw", response.parentPath()); + Assertions.assertEquals("mebgszplu", response.path()); + Assertions.assertEquals(1343401456195725400L, response.size()); + Assertions.assertEquals("dzzmssgpgv", 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 81b9fb32f00f8..7748e2164a4f2 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 @@ -28,7 +28,8 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.subvolumes() - .delete("u", "maxljalfihcj", "obcancdexxqcw", "a", "fgvaknokzwj", com.azure.core.util.Context.NONE); + .delete("axqvjweiwtczkddn", "ovbooqbmdqrxy", "laetscflwtjdtlr", "e", "ooy", + 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 79efd701b6db4..1971208aece33 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\":\"bpbhfckdvezcrcss\",\"name\":\"hddubbnqfbl\",\"type\":\"alehpav\",\"properties\":{\"path\":\"giqjtiogq\",\"parentPath\":\"minict\",\"size\":2122953188568413933,\"bytesUsed\":2129922320838456618,\"permissions\":\"gspnbonhpczykm\",\"creationTimeStamp\":\"2021-05-22T20:01:11Z\",\"accessedTimeStamp\":\"2021-09-13T07:20:13Z\",\"modifiedTimeStamp\":\"2021-10-08T19:32:51Z\",\"changedTimeStamp\":\"2020-12-29T11:11:48Z\",\"provisioningState\":\"Succeeded\"}}"; + = "{\"id\":\"zytijcx\",\"name\":\"ondegjdydhqkkk\",\"type\":\"uckcatuqbhpow\",\"properties\":{\"path\":\"tpzdlyseidto\",\"parentPath\":\"atprytgrhzbq\",\"size\":3632836437809163215,\"bytesUsed\":2591346939889679604,\"permissions\":\"tvcshtkutzcttb\",\"creationTimeStamp\":\"2021-08-09T18:30:06Z\",\"accessedTimeStamp\":\"2021-09-16T08:25:28Z\",\"modifiedTimeStamp\":\"2021-11-01T15:46:17Z\",\"changedTimeStamp\":\"2021-08-02T20:21:18Z\",\"provisioningState\":\"Succeeded\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testGetMetadata() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeModel response = manager.subvolumes() - .getMetadata("uykbbmn", "aglt", "xoe", "onql", "fwmyymv", com.azure.core.util.Context.NONE); + .getMetadata("eo", "pajtfeyvkbd", "dd", "rhd", "cxbeuuqutkzwtjww", com.azure.core.util.Context.NONE); - Assertions.assertEquals("giqjtiogq", response.path()); - Assertions.assertEquals("minict", response.parentPath()); - Assertions.assertEquals(2122953188568413933L, response.size()); - Assertions.assertEquals(2129922320838456618L, response.bytesUsed()); - Assertions.assertEquals("gspnbonhpczykm", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-22T20:01:11Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T07:20:13Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-08T19:32:51Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T11:11:48Z"), response.changedTimestamp()); + Assertions.assertEquals("tpzdlyseidto", response.path()); + Assertions.assertEquals("atprytgrhzbq", response.parentPath()); + Assertions.assertEquals(3632836437809163215L, response.size()); + Assertions.assertEquals(2591346939889679604L, response.bytesUsed()); + Assertions.assertEquals("tvcshtkutzcttb", response.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T18:30:06Z"), response.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T08:25:28Z"), response.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T15:46:17Z"), response.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T20:21:18Z"), 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 95c357d71daec..afa5b2ecb39a9 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\":\"it\",\"size\":4058109521871769098,\"parentPath\":\"b\",\"provisioningState\":\"cdb\"},\"id\":\"fzndscxmxeatkd\",\"name\":\"mwnrdj\",\"type\":\"ibqbnaomhjrm\"}"; + = "{\"properties\":{\"path\":\"egvyieztkutnj\",\"size\":958081204322104339,\"parentPath\":\"krehyhtmj\",\"provisioningState\":\"uif\"},\"id\":\"lxfary\",\"name\":\"vjlgdez\",\"type\":\"jqwahoyi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .getWithResponse("ephblkwqpatvbqs", "tcjb", "tvivuzqym", "uo", "o", com.azure.core.util.Context.NONE) + .getWithResponse("xiqahr", "gpx", "ibplnupoyryefqm", "ovyzt", "lnomfpb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("it", response.path()); - Assertions.assertEquals(4058109521871769098L, response.size()); - Assertions.assertEquals("b", response.parentPath()); + Assertions.assertEquals("egvyieztkutnj", response.path()); + Assertions.assertEquals(958081204322104339L, response.size()); + Assertions.assertEquals("krehyhtmj", 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 8a480fe81fc3a..1519ce5add831 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\":\"pqvyb\",\"size\":7615541920567165904,\"parentPath\":\"x\",\"provisioningState\":\"kcvtl\"},\"id\":\"seskvcuar\",\"name\":\"rhunlp\",\"type\":\"rykycndzfqivjr\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"pvwdtgckzdqiq\",\"size\":9117547988453900571,\"parentPath\":\"rkwxo\",\"provisioningState\":\"wxsuy\"},\"id\":\"nhrfgslgl\",\"name\":\"pryjfzih\",\"type\":\"io\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.subvolumes() - .listByVolume("zrltixldzyyf", "tpq", "ixymmpujivyql", "juvsmbmslzoyovw", com.azure.core.util.Context.NONE); + .listByVolume("cuxd", "zcqipsdudgcozzo", "ehxlantolamlb", "juxkqll", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pqvyb", response.iterator().next().path()); - Assertions.assertEquals(7615541920567165904L, response.iterator().next().size()); - Assertions.assertEquals("x", response.iterator().next().parentPath()); + Assertions.assertEquals("pvwdtgckzdqiq", response.iterator().next().path()); + Assertions.assertEquals(9117547988453900571L, response.iterator().next().size()); + Assertions.assertEquals("rkwxo", 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 972038eabdcc5..7aa12315c51c1 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\":\"lkdghr\",\"size\":4652163287873378004,\"parentPath\":\"lwxezwzhokvbwnh\",\"provisioningState\":\"qlgehg\"},\"id\":\"ipifhpfeoajvg\",\"name\":\"xtxj\",\"type\":\"sheafid\"},{\"properties\":{\"path\":\"gsresmkssj\",\"size\":7013131157216511761,\"parentPath\":\"xfkfwegprhptill\",\"provisioningState\":\"biqtgdq\"},\"id\":\"mcwsldrizetpwb\",\"name\":\"a\",\"type\":\"llibphbqzmizak\"},{\"properties\":{\"path\":\"nkjpdnjzha\",\"size\":6459322743109308428,\"parentPath\":\"jlmuoyxprimrsopt\",\"provisioningState\":\"cjmeislstvasy\"},\"id\":\"xdza\",\"name\":\"mweoohgu\",\"type\":\"fuzboyjathwtzolb\"}],\"nextLink\":\"mwmdxmebwjscjpa\"}") + "{\"value\":[{\"properties\":{\"path\":\"psznga\",\"size\":112993676904216885,\"parentPath\":\"kvec\",\"provisioningState\":\"jcngoadyed\"},\"id\":\"rgjfoknubnoi\",\"name\":\"pkpztrg\",\"type\":\"gxvcoqrasw\"},{\"properties\":{\"path\":\"xpqitweialwvs\",\"size\":2529635671942446169,\"parentPath\":\"acaqtyltcoqcu\",\"provisioningState\":\"dsxzakuejkmvb\"},\"id\":\"tjo\",\"name\":\"qcvov\",\"type\":\"uf\"},{\"properties\":{\"path\":\"jmlbemyejiriux\",\"size\":4147367262822658771,\"parentPath\":\"rtudawlpjfel\",\"provisioningState\":\"rpptcbgqnzmnhiil\"},\"id\":\"lwcjgckbbcccgzpr\",\"name\":\"oxnyuffatsg\",\"type\":\"tipwcxbyubhiqd\"},{\"properties\":{\"path\":\"rnpnuhzafccnuh\",\"size\":8191030026051932484,\"parentPath\":\"lbuigv\",\"provisioningState\":\"atvcrkdlbnbq\"},\"id\":\"h\",\"name\":\"syhzlwx\",\"type\":\"eaovurexdnds\"}],\"nextLink\":\"weaderzm\"}") .toObject(SubvolumesList.class); - Assertions.assertEquals("lkdghr", model.value().get(0).path()); - Assertions.assertEquals(4652163287873378004L, model.value().get(0).size()); - Assertions.assertEquals("lwxezwzhokvbwnh", model.value().get(0).parentPath()); - Assertions.assertEquals("mwmdxmebwjscjpa", model.nextLink()); + Assertions.assertEquals("psznga", model.value().get(0).path()); + Assertions.assertEquals(112993676904216885L, model.value().get(0).size()); + Assertions.assertEquals("kvec", model.value().get(0).parentPath()); + Assertions.assertEquals("weaderzm", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java index 659d0cd02676c..91b01590acdab 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.java @@ -11,7 +11,7 @@ public final class SuspectFileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SuspectFile model - = BinaryData.fromString("{\"suspectFileName\":\"qp\",\"fileTimestamp\":\"2020-12-27T18:10:38Z\"}") + = BinaryData.fromString("{\"suspectFileName\":\"nasx\",\"fileTimestamp\":\"2021-04-04T10:13:31Z\"}") .toObject(SuspectFile.class); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java index 8b31398a02ed9..c09cf87bead69 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponseInnerTests.java @@ -11,9 +11,8 @@ public final class SvmPeerCommandResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SvmPeerCommandResponseInner model - = BinaryData.fromString("{\"properties\":{\"svmPeeringCommand\":\"dxunkbebxmubyyn\"}}") - .toObject(SvmPeerCommandResponseInner.class); - Assertions.assertEquals("dxunkbebxmubyyn", model.properties().svmPeeringCommand()); + SvmPeerCommandResponseInner model = BinaryData.fromString("{\"properties\":{\"svmPeeringCommand\":\"zx\"}}") + .toObject(SvmPeerCommandResponseInner.class); + Assertions.assertEquals("zx", model.properties().svmPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponsePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponsePropertiesTests.java index 76519b53b6bd2..2b09d4ff8ea96 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponsePropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerCommandResponsePropertiesTests.java @@ -11,8 +11,8 @@ public final class SvmPeerCommandResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SvmPeerCommandResponseProperties model - = BinaryData.fromString("{\"svmPeeringCommand\":\"lrb\"}").toObject(SvmPeerCommandResponseProperties.class); - Assertions.assertEquals("lrb", model.svmPeeringCommand()); + SvmPeerCommandResponseProperties model = BinaryData.fromString("{\"svmPeeringCommand\":\"vithh\"}") + .toObject(SvmPeerCommandResponseProperties.class); + Assertions.assertEquals("vithh", model.svmPeeringCommand()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerInnerTests.java new file mode 100644 index 0000000000000..f10fb6b97dfa1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerInnerTests.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.fluent.models.SvmPeerInner; + +public final class SvmPeerInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SvmPeerInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Updating\",\"acceptCommand\":\"pmhbrbq\",\"anfSvmName\":\"govpbbtte\",\"externalSvmResourceId\":\"oknssqyzqedikdf\",\"status\":\"Error\",\"peerTypes\":[\"Cache\",\"Replication\"],\"hybridReplicationResourceIds\":[\"eihfq\",\"ggwfiwz\"],\"externalCacheConnectionResourceIds\":[\"jpbyephmgtv\"]},\"id\":\"vrcmyfqipgxhnpo\",\"name\":\"yqwcabvnuil\",\"type\":\"ey\"}") + .toObject(SvmPeerInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerListResultTests.java new file mode 100644 index 0000000000000..aed2bae97d824 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerListResultTests.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.SvmPeerListResult; +import org.junit.jupiter.api.Assertions; + +public final class SvmPeerListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SvmPeerListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"acceptCommand\":\"splzga\",\"anfSvmName\":\"cshhv\",\"externalSvmResourceId\":\"wgnxkympqanxrj\",\"status\":\"Error\",\"peerTypes\":[\"Replication\",\"Cache\"],\"hybridReplicationResourceIds\":[\"ypnyghshxc\",\"lhkgmnsghp\"],\"externalCacheConnectionResourceIds\":[\"phdrw\",\"jkhvyomacluzvxnq\",\"hrpq\",\"df\"]},\"id\":\"kois\",\"name\":\"css\",\"type\":\"fxuifmcsypobk\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"acceptCommand\":\"zsylollgt\",\"anfSvmName\":\"zzydmxzjijpvua\",\"externalSvmResourceId\":\"kihcirlde\",\"status\":\"Pending\",\"peerTypes\":[\"Cache\"],\"hybridReplicationResourceIds\":[\"b\",\"kjanur\",\"nqbnqb\"],\"externalCacheConnectionResourceIds\":[\"xqltgrd\",\"gypxrxvbfihwuhvc\",\"a\",\"s\"]},\"id\":\"xrblmliowxihs\",\"name\":\"nxw\",\"type\":\"agnepzwaklsb\"}],\"nextLink\":\"qqqagwwrxaomzi\"}") + .toObject(SvmPeerListResult.class); + Assertions.assertEquals("qqqagwwrxaomzi", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerPropertiesTests.java new file mode 100644 index 0000000000000..e6de71ecd07f8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeerPropertiesTests.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.SvmPeerProperties; + +public final class SvmPeerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SvmPeerProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Canceled\",\"acceptCommand\":\"paugmrmfjlrxwt\",\"anfSvmName\":\"ukhfkvc\",\"externalSvmResourceId\":\"izmoaeds\",\"status\":\"Pending\",\"peerTypes\":[\"Cache\"],\"hybridReplicationResourceIds\":[\"wcgyeewxeiqb\"],\"externalCacheConnectionResourceIds\":[\"g\",\"mguaml\"]}") + .toObject(SvmPeerProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeersGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeersGetWithResponseMockTests.java new file mode 100644 index 0000000000000..23dfcfb7c7e64 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeersGetWithResponseMockTests.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.SvmPeer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SvmPeersGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Failed\",\"acceptCommand\":\"dueurgmcdcpkshl\",\"anfSvmName\":\"ermhzicsbfdjhyaa\",\"externalSvmResourceId\":\"yukibxigl\",\"status\":\"Error\",\"peerTypes\":[\"Cache\",\"Replication\",\"Replication\"],\"hybridReplicationResourceIds\":[\"piilhvtozy\",\"gjjnxkbylhyyx\"],\"externalCacheConnectionResourceIds\":[\"klvqzrwtrdgscn\",\"q\",\"on\"]},\"id\":\"nwxlwm\",\"name\":\"zyohxpthc\",\"type\":\"opvkvtwfves\"}"; + + 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)); + + SvmPeer response = manager.svmPeers() + .getWithResponse("thojvlirknucos", "wrdtnagzlgpy", "ixihzqj", "tsmuydqftt", + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeersListByParentMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeersListByParentMockTests.java new file mode 100644 index 0000000000000..a5c8f51874f71 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SvmPeersListByParentMockTests.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.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.SvmPeer; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class SvmPeersListByParentMockTests { + @Test + public void testListByParent() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"acceptCommand\":\"mugpyvao\",\"anfSvmName\":\"kluwz\",\"externalSvmResourceId\":\"ygz\",\"status\":\"Pending\",\"peerTypes\":[\"Replication\",\"Replication\",\"Replication\",\"Replication\"],\"hybridReplicationResourceIds\":[\"bg\",\"qisqsqkp\",\"mioyjpn\"],\"externalCacheConnectionResourceIds\":[\"iqcpszpmcvq\",\"vrdmvxyrxdh\"]},\"id\":\"qojbxao\",\"name\":\"cgbzxm\",\"type\":\"t\"}]}"; + + 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.svmPeers().listByParent("bpbokhmml", "dyarnggcjfwblq", "xka", com.azure.core.util.Context.NONE); + + } +} 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 d263fc3ff1e15..93def47a34d4e 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,24 @@ public final class UpdateNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"wumuaslzk\",\"subnetId\":\"rrwoycqucwyhahn\",\"networkSiblingSetStateId\":\"mdr\",\"networkFeatures\":\"Basic_Standard\"}") + "{\"networkSiblingSetId\":\"xls\",\"subnetId\":\"ihmxrfdsajredn\",\"networkSiblingSetStateId\":\"yyshtuwgmevua\",\"networkFeatures\":\"Standard\"}") .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("wumuaslzk", model.networkSiblingSetId()); - Assertions.assertEquals("rrwoycqucwyhahn", model.subnetId()); - Assertions.assertEquals("mdr", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); + Assertions.assertEquals("xls", model.networkSiblingSetId()); + Assertions.assertEquals("ihmxrfdsajredn", model.subnetId()); + Assertions.assertEquals("yyshtuwgmevua", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD, model.networkFeatures()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("wumuaslzk") - .withSubnetId("rrwoycqucwyhahn") - .withNetworkSiblingSetStateId("mdr") - .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD); + UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("xls") + .withSubnetId("ihmxrfdsajredn") + .withNetworkSiblingSetStateId("yyshtuwgmevua") + .withNetworkFeatures(NetworkFeatures.STANDARD); model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("wumuaslzk", model.networkSiblingSetId()); - Assertions.assertEquals("rrwoycqucwyhahn", model.subnetId()); - Assertions.assertEquals("mdr", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); + Assertions.assertEquals("xls", model.networkSiblingSetId()); + Assertions.assertEquals("ihmxrfdsajredn", model.subnetId()); + Assertions.assertEquals("yyshtuwgmevua", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD, 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 27f21dc8f197a..8ef7963a34778 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\":\"fnmdxotn\",\"localizedValue\":\"dgug\"}").toObject(UsageName.class); - Assertions.assertEquals("fnmdxotn", model.value()); - Assertions.assertEquals("dgug", model.localizedValue()); + UsageName model = BinaryData.fromString("{\"value\":\"rucpcunnuz\",\"localizedValue\":\"umoenodnaie\"}") + .toObject(UsageName.class); + Assertions.assertEquals("rucpcunnuz", model.value()); + Assertions.assertEquals("umoenodnaie", 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 b40432041c06a..93f146d23aaa7 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\":2136201648,\"limit\":1242659668,\"unit\":\"rkyui\"}") + = BinaryData.fromString("{\"currentValue\":445948894,\"limit\":2130759062,\"unit\":\"ndnelqkaadlknw\"}") .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 db891a3b8b1f6..15bf93b919c48 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\":\"flrzpas\",\"name\":{\"value\":\"i\",\"localizedValue\":\"mzdlyjdfqwmkyo\"},\"properties\":{\"currentValue\":1748884059,\"limit\":2092771919,\"unit\":\"zslzojhp\"}}") + "{\"id\":\"idszl\",\"name\":{\"value\":\"oithg\",\"localizedValue\":\"vfltgvdi\"},\"properties\":{\"currentValue\":1145070705,\"limit\":1034478088,\"unit\":\"wetwkdr\"}}") .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 879906d0b2fe4..e99083aa2d736 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\":\"hpsvfu\",\"name\":{\"value\":\"tlwexxwlalniexz\",\"localizedValue\":\"zpgepqty\"},\"properties\":{\"currentValue\":1567146664,\"limit\":1790855590,\"unit\":\"akchzyvlixqnrk\"}},{\"id\":\"kjibnxmysuxswqrn\",\"name\":{\"value\":\"wijpsttexoqqpwc\",\"localizedValue\":\"ufmhrunc\"},\"properties\":{\"currentValue\":1162689425,\"limit\":432418961,\"unit\":\"cdqzhlctddu\"}},{\"id\":\"ndy\",\"name\":{\"value\":\"hrqbnjjrcg\",\"localizedValue\":\"ydcwboxjumv\"},\"properties\":{\"currentValue\":1101777200,\"limit\":843913557,\"unit\":\"raiouaubrjtl\"}}],\"nextLink\":\"xfuojrn\"}") + "{\"value\":[{\"id\":\"yifrkgwltxeqipx\",\"name\":{\"value\":\"yimsfayorpr\",\"localizedValue\":\"kj\"},\"properties\":{\"currentValue\":535821892,\"limit\":1435976070,\"unit\":\"nsmjkwynqxaekqs\"}},{\"id\":\"vwjtqpkevmyltjc\",\"name\":{\"value\":\"xklurcclfgxannno\",\"localizedValue\":\"zposewxigpxvkqm\"},\"properties\":{\"currentValue\":1232927415,\"limit\":1730803743,\"unit\":\"fdfa\"}}],\"nextLink\":\"yzyzeyuu\"}") .toObject(UsagesListResult.class); - Assertions.assertEquals("xfuojrn", model.nextLink()); + Assertions.assertEquals("yzyzeyuu", 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 db91733c8a808..ccb40902be926 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\":\"d3b48d88-e9fd-4d8d-b188-194f2288fb59\",\"clientId\":\"1a97fb2e-5ffa-4e43-923d-e7d1aa83e213\"}") + "{\"principalId\":\"7aa1dfc6-a5ec-4d55-ae89-62cc5c99b08f\",\"clientId\":\"1e35b65e-345a-43be-a9ad-4a993503c073\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java index e102be46d9194..9bed0daa86bb1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java @@ -12,11 +12,11 @@ public final class VolumeBackupsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeBackups model = BinaryData.fromString( - "{\"volumeName\":\"dsyuuximerqfob\",\"volumeResourceId\":\"znkbykutwpfhpagm\",\"backupsCount\":1165571898,\"policyEnabled\":true}") + "{\"volumeName\":\"usdsttwv\",\"volumeResourceId\":\"vbbejdcng\",\"backupsCount\":9453165,\"policyEnabled\":false}") .toObject(VolumeBackups.class); - Assertions.assertEquals("dsyuuximerqfob", model.volumeName()); - Assertions.assertEquals("znkbykutwpfhpagm", model.volumeResourceId()); - Assertions.assertEquals(1165571898, model.backupsCount()); - Assertions.assertTrue(model.policyEnabled()); + Assertions.assertEquals("usdsttwv", model.volumeName()); + Assertions.assertEquals("vbbejdcng", model.volumeResourceId()); + Assertions.assertEquals(9453165, model.backupsCount()); + Assertions.assertFalse(model.policyEnabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java index 3c370dff7227c..cd4c771a74b75 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,8 @@ 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("tzxpuamwabzxrv", "cush", "phai", com.azure.core.util.Context.NONE); + manager.volumeGroups() + .delete("uawvcmjzk", "iidisczskoswoqiq", "zugamxzkrrcoiis", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeNamespacePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeNamespacePropertiesTests.java new file mode 100644 index 0000000000000..cc3c858cb7e3c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeNamespacePropertiesTests.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.OriginVolume; +import com.azure.resourcemanager.netapp.models.VolumeNamespaceProperties; +import org.junit.jupiter.api.Assertions; + +public final class VolumeNamespacePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumeNamespaceProperties model + = BinaryData.fromString("{\"originVolume\":\"Disabled\"}").toObject(VolumeNamespaceProperties.class); + Assertions.assertEquals(OriginVolume.DISABLED, model.originVolume()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumeNamespaceProperties model = new VolumeNamespaceProperties().withOriginVolume(OriginVolume.DISABLED); + model = BinaryData.fromObject(model).toObject(VolumeNamespaceProperties.class); + Assertions.assertEquals(OriginVolume.DISABLED, model.originVolume()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchNamespacePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchNamespacePropertiesTests.java new file mode 100644 index 0000000000000..ccce2a97224ef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchNamespacePropertiesTests.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.OriginVolume; +import com.azure.resourcemanager.netapp.models.VolumePatchNamespaceProperties; +import org.junit.jupiter.api.Assertions; + +public final class VolumePatchNamespacePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VolumePatchNamespaceProperties model + = BinaryData.fromString("{\"originVolume\":\"Disabled\"}").toObject(VolumePatchNamespaceProperties.class); + Assertions.assertEquals(OriginVolume.DISABLED, model.originVolume()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VolumePatchNamespaceProperties model + = new VolumePatchNamespaceProperties().withOriginVolume(OriginVolume.DISABLED); + model = BinaryData.fromObject(model).toObject(VolumePatchNamespaceProperties.class); + Assertions.assertEquals(OriginVolume.DISABLED, model.originVolume()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java index e4954078d1750..6e98e4be89117 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java @@ -16,31 +16,31 @@ public final class VolumePatchPropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"hin\",\"policyEnforced\":false,\"backupVaultId\":\"mifthnzdnd\"},\"snapshot\":{\"snapshotPolicyId\":\"nayqi\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Enabled\"}}") + "{\"backup\":{\"backupPolicyId\":\"jervnaenqpehi\",\"policyEnforced\":false,\"backupVaultId\":\"gmifthnzd\"},\"snapshot\":{\"snapshotPolicyId\":\"l\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\"}}") .toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("hin", model.backup().backupPolicyId()); + Assertions.assertEquals("jervnaenqpehi", model.backup().backupPolicyId()); Assertions.assertFalse(model.backup().policyEnforced()); - Assertions.assertEquals("mifthnzdnd", model.backup().backupVaultId()); - Assertions.assertEquals("nayqi", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, + Assertions.assertEquals("gmifthnzd", model.backup().backupVaultId()); + Assertions.assertEquals("l", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, model.ransomwareProtection().desiredRansomwareProtectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesDataProtection model = new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("hin") + .withBackup(new VolumeBackupProperties().withBackupPolicyId("jervnaenqpehi") .withPolicyEnforced(false) - .withBackupVaultId("mifthnzdnd")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("nayqi")) + .withBackupVaultId("gmifthnzd")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("l")) .withRansomwareProtection(new RansomwareProtectionPatchSettings() - .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED)); + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED)); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("hin", model.backup().backupPolicyId()); + Assertions.assertEquals("jervnaenqpehi", model.backup().backupPolicyId()); Assertions.assertFalse(model.backup().policyEnforced()); - Assertions.assertEquals("mifthnzdnd", model.backup().backupVaultId()); - Assertions.assertEquals("nayqi", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, + Assertions.assertEquals("gmifthnzd", model.backup().backupVaultId()); + Assertions.assertEquals("l", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, model.ransomwareProtection().desiredRansomwareProtectionState()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java index ae03a5d6509c0..e3c2a97822081 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java @@ -15,103 +15,103 @@ public final class VolumePatchPropertiesExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":928990245,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"lyt\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1854550992,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"ovasrruvwbhsqfsu\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1379318840,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"zbexilzznfqqnvw\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":930552751,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"rjerv\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]}") + "{\"rules\":[{\"ruleIndex\":530731867,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"ewwwfbkrvrnsv\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":475216783,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"gjb\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1394705984,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"l\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1133541665,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"ybn\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]}") .toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(928990245, model.rules().get(0).ruleIndex()); - Assertions.assertTrue(model.rules().get(0).unixReadOnly()); - Assertions.assertTrue(model.rules().get(0).unixReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertFalse(model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); + Assertions.assertEquals(530731867, model.rules().get(0).ruleIndex()); + Assertions.assertFalse(model.rules().get(0).unixReadOnly()); + Assertions.assertFalse(model.rules().get(0).unixReadWrite()); + Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadWrite()); Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.rules().get(0).cifs()); - Assertions.assertTrue(model.rules().get(0).nfsv3()); + Assertions.assertFalse(model.rules().get(0).nfsv3()); Assertions.assertFalse(model.rules().get(0).nfsv41()); - Assertions.assertEquals("lyt", model.rules().get(0).allowedClients()); - Assertions.assertTrue(model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); + Assertions.assertEquals("ewwwfbkrvrnsv", model.rules().get(0).allowedClients()); + Assertions.assertFalse(model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesExportPolicy model = new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(928990245) - .withUnixReadOnly(true) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false) + new ExportPolicyRule().withRuleIndex(530731867) + .withUnixReadOnly(false) + .withUnixReadWrite(false) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(true) + .withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(true) .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(true) + .withKerberos5PReadWrite(false) .withCifs(true) - .withNfsv3(true) + .withNfsv3(false) .withNfsv41(false) - .withAllowedClients("lyt") - .withHasRootAccess(true) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1854550992) + .withAllowedClients("ewwwfbkrvrnsv") + .withHasRootAccess(false) + .withChownMode(ChownMode.UNRESTRICTED), + new ExportPolicyRule().withRuleIndex(475216783) .withUnixReadOnly(true) .withUnixReadWrite(true) .withKerberos5ReadOnly(true) .withKerberos5ReadWrite(false) .withKerberos5IReadOnly(true) .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(false) + .withKerberos5PReadOnly(true) .withKerberos5PReadWrite(true) - .withCifs(false) - .withNfsv3(true) + .withCifs(true) + .withNfsv3(false) .withNfsv41(true) - .withAllowedClients("ovasrruvwbhsqfsu") + .withAllowedClients("gjb") .withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1379318840) - .withUnixReadOnly(true) - .withUnixReadWrite(true) + .withChownMode(ChownMode.UNRESTRICTED), + new ExportPolicyRule().withRuleIndex(1394705984) + .withUnixReadOnly(false) + .withUnixReadWrite(false) .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(true) .withKerberos5PReadWrite(false) - .withCifs(false) + .withCifs(true) .withNfsv3(true) .withNfsv41(false) - .withAllowedClients("zbexilzznfqqnvw") - .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(930552751) - .withUnixReadOnly(true) + .withAllowedClients("l") + .withHasRootAccess(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1133541665) + .withUnixReadOnly(false) .withUnixReadWrite(true) - .withKerberos5ReadOnly(false) + .withKerberos5ReadOnly(true) .withKerberos5ReadWrite(false) .withKerberos5IReadOnly(true) .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(false) - .withCifs(false) + .withKerberos5PReadOnly(true) + .withKerberos5PReadWrite(true) + .withCifs(true) .withNfsv3(true) .withNfsv41(true) - .withAllowedClients("rjerv") - .withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED))); + .withAllowedClients("ybn") + .withHasRootAccess(true) + .withChownMode(ChownMode.UNRESTRICTED))); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(928990245, model.rules().get(0).ruleIndex()); - Assertions.assertTrue(model.rules().get(0).unixReadOnly()); - Assertions.assertTrue(model.rules().get(0).unixReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertFalse(model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); + Assertions.assertEquals(530731867, model.rules().get(0).ruleIndex()); + Assertions.assertFalse(model.rules().get(0).unixReadOnly()); + Assertions.assertFalse(model.rules().get(0).unixReadWrite()); + Assertions.assertFalse(model.rules().get(0).kerberos5ReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertTrue(model.rules().get(0).kerberos5IReadWrite()); Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.rules().get(0).cifs()); - Assertions.assertTrue(model.rules().get(0).nfsv3()); + Assertions.assertFalse(model.rules().get(0).nfsv3()); Assertions.assertFalse(model.rules().get(0).nfsv41()); - Assertions.assertEquals("lyt", model.rules().get(0).allowedClients()); - Assertions.assertTrue(model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); + Assertions.assertEquals("ewwwfbkrvrnsv", model.rules().get(0).allowedClients()); + Assertions.assertFalse(model.rules().get(0).hasRootAccess()); + Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java index 35c4d2e7b9c1a..a44092fe020de 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java @@ -6,16 +6,21 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; import com.azure.resourcemanager.netapp.models.ChownMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; import com.azure.resourcemanager.netapp.models.ExportPolicyRule; +import com.azure.resourcemanager.netapp.models.OriginVolume; import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; 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.SmbOplocks; import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; +import com.azure.resourcemanager.netapp.models.VolumePatchNamespaceProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; @@ -26,152 +31,149 @@ public final class VolumePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchProperties model = BinaryData.fromString( - "{\"serviceLevel\":\"StandardZRS\",\"usageThreshold\":1865985112447305959,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":2006567111,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"igvpgylg\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":613009021,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"gucnapkte\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":207287294,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"pppcqeqxo\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"ctobg\"],\"throughputMibps\":62.614918,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"zpostmgrcfbu\",\"policyEnforced\":true,\"backupVaultId\":\"qjhhkxbpv\"},\"snapshot\":{\"snapshotPolicyId\":\"jhxxjyn\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":4307954737438243119,\"defaultGroupQuotaInKiBs\":4478371279557844955,\"unixPermissions\":\"zvszj\",\"coolAccess\":true,\"coolnessPeriod\":34322019,\"coolAccessRetrievalPolicy\":\"Default\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + "{\"serviceLevel\":\"Flexible\",\"usageThreshold\":7589955596249884886,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":24250609,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"c\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1519896216,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"llwptfdy\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"ceopzfqrhhuaopp\"],\"throughputMibps\":30.051893,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"ol\",\"policyEnforced\":true,\"backupVaultId\":\"zxctobgb\"},\"snapshot\":{\"snapshotPolicyId\":\"oizpostmgrcfbun\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Enabled\"}},\"isDefaultQuotaEnabled\":false,\"asyncDirectoryDelete\":{\"status\":\"Disabled\",\"trashBinName\":\"pvjymjhxxjyng\"},\"defaultUserQuotaInKiBs\":7751853531137098645,\"defaultGroupQuotaInKiBs\":1111219125512367618,\"unixPermissions\":\"wbxqzvszjfau\",\"coolAccess\":true,\"coolnessPeriod\":1631327314,\"coolAccessRetrievalPolicy\":\"Never\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Enabled\",\"smbNonBrowsable\":\"Enabled\",\"smbOplocks\":\"Disabled\",\"geoNamespaceProperties\":{\"originVolume\":\"Enabled\"}}") .toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(1865985112447305959L, model.usageThreshold()); - Assertions.assertEquals(2006567111, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); + Assertions.assertEquals(7589955596249884886L, model.usageThreshold()); + Assertions.assertEquals(24250609, model.exportPolicy().rules().get(0).ruleIndex()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadWrite()); Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadWrite()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).cifs()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv3()); Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("igvpgylg", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertEquals("c", model.exportPolicy().rules().get(0).allowedClients()); Assertions.assertTrue(model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals("ctobg", model.protocolTypes().get(0)); - Assertions.assertEquals(62.614918F, model.throughputMibps()); - Assertions.assertEquals("zpostmgrcfbu", model.dataProtection().backup().backupPolicyId()); + Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); + Assertions.assertEquals("ceopzfqrhhuaopp", model.protocolTypes().get(0)); + Assertions.assertEquals(30.051893F, model.throughputMibps()); + Assertions.assertEquals("ol", model.dataProtection().backup().backupPolicyId()); Assertions.assertTrue(model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("qjhhkxbpv", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("jhxxjyn", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + Assertions.assertEquals("zxctobgb", model.dataProtection().backup().backupVaultId()); + Assertions.assertEquals("oizpostmgrcfbun", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); - Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4307954737438243119L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4478371279557844955L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("zvszj", model.unixPermissions()); + Assertions.assertFalse(model.isDefaultQuotaEnabled()); + Assertions.assertEquals(AsyncDirectoryDeleteStatus.DISABLED, model.asyncDirectoryDelete().status()); + Assertions.assertEquals("pvjymjhxxjyng", model.asyncDirectoryDelete().trashBinName()); + Assertions.assertEquals(7751853531137098645L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1111219125512367618L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("wbxqzvszjfau", model.unixPermissions()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(34322019, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(1631327314, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.NEVER, model.coolAccessRetrievalPolicy()); Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertFalse(model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertTrue(model.snapshotDirectoryVisible()); + Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbOplocks.DISABLED, model.smbOplocks()); + Assertions.assertEquals(OriginVolume.ENABLED, model.geoNamespaceProperties().originVolume()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withUsageThreshold(1865985112447305959L) + VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.FLEXIBLE) + .withUsageThreshold(7589955596249884886L) .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(2006567111) + new ExportPolicyRule().withRuleIndex(24250609) .withUnixReadOnly(false) .withUnixReadWrite(false) .withKerberos5ReadOnly(false) .withKerberos5ReadWrite(true) .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(false) - .withAllowedClients("igvpgylg") - .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(613009021) - .withUnixReadOnly(false) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(true) .withKerberos5IReadWrite(false) .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(true) - .withCifs(false) + .withCifs(true) .withNfsv3(true) .withNfsv41(false) - .withAllowedClients("gucnapkte") - .withHasRootAccess(false) + .withAllowedClients("c") + .withHasRootAccess(true) .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(207287294) - .withUnixReadOnly(false) + new ExportPolicyRule().withRuleIndex(1519896216) + .withUnixReadOnly(true) .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true) + .withKerberos5ReadOnly(false) + .withKerberos5ReadWrite(true) + .withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(false) .withKerberos5PReadOnly(true) .withKerberos5PReadWrite(true) - .withCifs(true) + .withCifs(false) .withNfsv3(false) .withNfsv41(false) - .withAllowedClients("pppcqeqxo") + .withAllowedClients("llwptfdy") .withHasRootAccess(true) .withChownMode(ChownMode.RESTRICTED)))) - .withProtocolTypes(Arrays.asList("ctobg")) - .withThroughputMibps(62.614918F) + .withProtocolTypes(Arrays.asList("ceopzfqrhhuaopp")) + .withThroughputMibps(30.051893F) .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("zpostmgrcfbu") + .withBackup(new VolumeBackupProperties().withBackupPolicyId("ol") .withPolicyEnforced(true) - .withBackupVaultId("qjhhkxbpv")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("jhxxjyn")) + .withBackupVaultId("zxctobgb")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("oizpostmgrcfbun")) .withRansomwareProtection(new RansomwareProtectionPatchSettings() - .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED))) - .withIsDefaultQuotaEnabled(true) - .withDefaultUserQuotaInKiBs(4307954737438243119L) - .withDefaultGroupQuotaInKiBs(4478371279557844955L) - .withUnixPermissions("zvszj") + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED))) + .withIsDefaultQuotaEnabled(false) + .withAsyncDirectoryDelete(new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.DISABLED) + .withTrashBinName("pvjymjhxxjyng")) + .withDefaultUserQuotaInKiBs(7751853531137098645L) + .withDefaultGroupQuotaInKiBs(1111219125512367618L) + .withUnixPermissions("wbxqzvszjfau") .withCoolAccess(true) - .withCoolnessPeriod(34322019) - .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) + .withCoolnessPeriod(1631327314) + .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.NEVER) .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.AUTO) - .withSnapshotDirectoryVisible(false) - .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); + .withSnapshotDirectoryVisible(true) + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbOplocks(SmbOplocks.DISABLED) + .withGeoNamespaceProperties(new VolumePatchNamespaceProperties().withOriginVolume(OriginVolume.ENABLED)); model = BinaryData.fromObject(model).toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(1865985112447305959L, model.usageThreshold()); - Assertions.assertEquals(2006567111, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); + Assertions.assertEquals(7589955596249884886L, model.usageThreshold()); + Assertions.assertEquals(24250609, model.exportPolicy().rules().get(0).ruleIndex()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadWrite()); Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadWrite()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.exportPolicy().rules().get(0).cifs()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv3()); Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("igvpgylg", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertEquals("c", model.exportPolicy().rules().get(0).allowedClients()); Assertions.assertTrue(model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals("ctobg", model.protocolTypes().get(0)); - Assertions.assertEquals(62.614918F, model.throughputMibps()); - Assertions.assertEquals("zpostmgrcfbu", model.dataProtection().backup().backupPolicyId()); + Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); + Assertions.assertEquals("ceopzfqrhhuaopp", model.protocolTypes().get(0)); + Assertions.assertEquals(30.051893F, model.throughputMibps()); + Assertions.assertEquals("ol", model.dataProtection().backup().backupPolicyId()); Assertions.assertTrue(model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("qjhhkxbpv", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("jhxxjyn", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + Assertions.assertEquals("zxctobgb", model.dataProtection().backup().backupVaultId()); + Assertions.assertEquals("oizpostmgrcfbun", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); - Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4307954737438243119L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4478371279557844955L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("zvszj", model.unixPermissions()); + Assertions.assertFalse(model.isDefaultQuotaEnabled()); + Assertions.assertEquals(AsyncDirectoryDeleteStatus.DISABLED, model.asyncDirectoryDelete().status()); + Assertions.assertEquals("pvjymjhxxjyng", model.asyncDirectoryDelete().trashBinName()); + Assertions.assertEquals(7751853531137098645L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1111219125512367618L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("wbxqzvszjfau", model.unixPermissions()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(34322019, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(1631327314, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.NEVER, model.coolAccessRetrievalPolicy()); Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertFalse(model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertTrue(model.snapshotDirectoryVisible()); + Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbOplocks.DISABLED, model.smbOplocks()); + Assertions.assertEquals(OriginVolume.ENABLED, model.geoNamespaceProperties().originVolume()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java index 55db1f82bb00d..b7ef3cb136c2b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java @@ -5,17 +5,22 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDelete; +import com.azure.resourcemanager.netapp.models.AsyncDirectoryDeleteStatus; import com.azure.resourcemanager.netapp.models.ChownMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; import com.azure.resourcemanager.netapp.models.ExportPolicyRule; +import com.azure.resourcemanager.netapp.models.OriginVolume; import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; 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.SmbOplocks; import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePatch; +import com.azure.resourcemanager.netapp.models.VolumePatchNamespaceProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; @@ -28,7 +33,7 @@ public final class VolumePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatch model = BinaryData.fromString( - "{\"location\":\"ow\",\"id\":\"przqlveu\",\"name\":\"upjm\",\"type\":\"fxobbcsws\",\"tags\":{\"fgb\":\"riplrbpbewtg\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\",\"zg\":\"j\"},\"properties\":{\"serviceLevel\":\"Standard\",\"usageThreshold\":4114340895697399622,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":351214213,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"hprwmdyv\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1285325454,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"mefqsgzvahapjyzh\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":141640204,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"vzunluthnnprnxi\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1819249918,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"gpw\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"bsjyofdx\"],\"throughputMibps\":7.019162,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"touwaboekqv\",\"policyEnforced\":false,\"backupVaultId\":\"smv\"},\"snapshot\":{\"snapshotPolicyId\":\"yjsflhhcaalnji\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":4035973624859613630,\"defaultGroupQuotaInKiBs\":1491917692598460988,\"unixPermissions\":\"slyjpkiid\",\"coolAccess\":true,\"coolnessPeriod\":1841035114,\"coolAccessRetrievalPolicy\":\"Default\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}}") + "{\"location\":\"ow\",\"id\":\"przqlveu\",\"name\":\"upjm\",\"type\":\"fxobbcsws\",\"tags\":{\"fgb\":\"riplrbpbewtg\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\",\"zg\":\"j\"},\"properties\":{\"serviceLevel\":\"Standard\",\"usageThreshold\":4114340895697399622,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":351214213,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"hprwmdyv\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1285325454,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"mefqsgzvahapjyzh\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":141640204,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"vzunluthnnprnxi\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1819249918,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"gpw\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"protocolTypes\":[\"bsjyofdx\"],\"throughputMibps\":7.019162,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"touwaboekqv\",\"policyEnforced\":false,\"backupVaultId\":\"smv\"},\"snapshot\":{\"snapshotPolicyId\":\"yjsflhhcaalnji\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\"}},\"isDefaultQuotaEnabled\":true,\"asyncDirectoryDelete\":{\"status\":\"Disabled\",\"trashBinName\":\"aq\"},\"defaultUserQuotaInKiBs\":5415322759533569883,\"defaultGroupQuotaInKiBs\":4510412851989639823,\"unixPermissions\":\"idzyexznelixhnr\",\"coolAccess\":true,\"coolnessPeriod\":1975568377,\"coolAccessRetrievalPolicy\":\"OnRead\",\"coolAccessTieringPolicy\":\"SnapshotOnly\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Enabled\",\"smbOplocks\":\"Disabled\",\"geoNamespaceProperties\":{\"originVolume\":\"Enabled\"}}}") .toObject(VolumePatch.class); Assertions.assertEquals("ow", model.location()); Assertions.assertEquals("riplrbpbewtg", model.tags().get("fgb")); @@ -58,16 +63,20 @@ public void testDeserialize() throws Exception { Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4035973624859613630L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1491917692598460988L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("slyjpkiid", model.unixPermissions()); + Assertions.assertEquals(AsyncDirectoryDeleteStatus.DISABLED, model.asyncDirectoryDelete().status()); + Assertions.assertEquals("aq", model.asyncDirectoryDelete().trashBinName()); + Assertions.assertEquals(5415322759533569883L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(4510412851989639823L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("idzyexznelixhnr", model.unixPermissions()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(1841035114, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertFalse(model.snapshotDirectoryVisible()); + Assertions.assertEquals(1975568377, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(CoolAccessTieringPolicy.SNAPSHOT_ONLY, model.coolAccessTieringPolicy()); + Assertions.assertTrue(model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbOplocks.DISABLED, model.smbOplocks()); + Assertions.assertEquals(OriginVolume.ENABLED, model.geoNamespaceProperties().originVolume()); } @org.junit.jupiter.api.Test @@ -147,16 +156,20 @@ public void testSerialize() throws Exception { .withRansomwareProtection(new RansomwareProtectionPatchSettings() .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED))) .withIsDefaultQuotaEnabled(true) - .withDefaultUserQuotaInKiBs(4035973624859613630L) - .withDefaultGroupQuotaInKiBs(1491917692598460988L) - .withUnixPermissions("slyjpkiid") + .withAsyncDirectoryDelete( + new AsyncDirectoryDelete().withStatus(AsyncDirectoryDeleteStatus.DISABLED).withTrashBinName("aq")) + .withDefaultUserQuotaInKiBs(5415322759533569883L) + .withDefaultGroupQuotaInKiBs(4510412851989639823L) + .withUnixPermissions("idzyexznelixhnr") .withCoolAccess(true) - .withCoolnessPeriod(1841035114) - .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) - .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.AUTO) - .withSnapshotDirectoryVisible(false) + .withCoolnessPeriod(1975568377) + .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) + .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.SNAPSHOT_ONLY) + .withSnapshotDirectoryVisible(true) .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); + .withSmbNonBrowsable(SmbNonBrowsable.ENABLED) + .withSmbOplocks(SmbOplocks.DISABLED) + .withGeoNamespaceProperties(new VolumePatchNamespaceProperties().withOriginVolume(OriginVolume.ENABLED)); model = BinaryData.fromObject(model).toObject(VolumePatch.class); Assertions.assertEquals("ow", model.location()); Assertions.assertEquals("riplrbpbewtg", model.tags().get("fgb")); @@ -186,16 +199,20 @@ public void testSerialize() throws Exception { Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4035973624859613630L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1491917692598460988L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("slyjpkiid", model.unixPermissions()); + Assertions.assertEquals(AsyncDirectoryDeleteStatus.DISABLED, model.asyncDirectoryDelete().status()); + Assertions.assertEquals("aq", model.asyncDirectoryDelete().trashBinName()); + Assertions.assertEquals(5415322759533569883L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(4510412851989639823L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("idzyexznelixhnr", model.unixPermissions()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(1841035114, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertFalse(model.snapshotDirectoryVisible()); + Assertions.assertEquals(1975568377, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(CoolAccessTieringPolicy.SNAPSHOT_ONLY, model.coolAccessTieringPolicy()); + Assertions.assertTrue(model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbOplocks.DISABLED, model.smbOplocks()); + Assertions.assertEquals(OriginVolume.ENABLED, model.geoNamespaceProperties().originVolume()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java index 2323e040a665d..900c8879a3f0e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java @@ -15,28 +15,28 @@ public final class VolumeQuotaRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":7851173611055432996,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"ty\"},\"location\":\"evxccedcp\",\"tags\":{\"vnhltiugcx\":\"yodnwzxltj\",\"y\":\"avvwxqi\",\"djrkvfgbvfvpd\":\"unyowxwl\"},\"id\":\"odacizs\",\"name\":\"q\",\"type\":\"hkr\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"quotaSizeInKiBs\":6540094820562857174,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"gofel\"},\"location\":\"grqmqhldvrii\",\"tags\":{\"ueluqhhahhxvrhmz\":\"nalghfkvtvsexso\",\"ughftqsx\":\"wpjgwws\"},\"id\":\"qxujxukndxd\",\"name\":\"grjguufzd\",\"type\":\"syqtfi\"}") .toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("evxccedcp", model.location()); - Assertions.assertEquals("yodnwzxltj", model.tags().get("vnhltiugcx")); - Assertions.assertEquals(7851173611055432996L, model.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("ty", model.quotaTarget()); + Assertions.assertEquals("grqmqhldvrii", model.location()); + Assertions.assertEquals("nalghfkvtvsexso", model.tags().get("ueluqhhahhxvrhmz")); + Assertions.assertEquals(6540094820562857174L, model.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("gofel", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("evxccedcp") - .withTags(mapOf("vnhltiugcx", "yodnwzxltj", "y", "avvwxqi", "djrkvfgbvfvpd", "unyowxwl")) - .withQuotaSizeInKiBs(7851173611055432996L) - .withQuotaType(QuotaType.DEFAULT_USER_QUOTA) - .withQuotaTarget("ty"); + VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("grqmqhldvrii") + .withTags(mapOf("ueluqhhahhxvrhmz", "nalghfkvtvsexso", "ughftqsx", "wpjgwws")) + .withQuotaSizeInKiBs(6540094820562857174L) + .withQuotaType(QuotaType.INDIVIDUAL_GROUP_QUOTA) + .withQuotaTarget("gofel"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("evxccedcp", model.location()); - Assertions.assertEquals("yodnwzxltj", model.tags().get("vnhltiugcx")); - Assertions.assertEquals(7851173611055432996L, model.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("ty", model.quotaTarget()); + Assertions.assertEquals("grqmqhldvrii", model.location()); + Assertions.assertEquals("nalghfkvtvsexso", model.tags().get("ueluqhhahhxvrhmz")); + Assertions.assertEquals(6540094820562857174L, model.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("gofel", model.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java index 7f66865d679dc..0e7a2d7acd336 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java @@ -15,27 +15,25 @@ public final class VolumeQuotaRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulePatch model = BinaryData.fromString( - "{\"tags\":{\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\",\"kmokz\":\"vncjabudurgk\"},\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":3751920609197992678,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"uwqlgzrfzeey\"}}") + "{\"tags\":{\"zqzudph\":\"o\"},\"properties\":{\"provisioningState\":\"Canceled\",\"quotaSizeInKiBs\":6272990611779774689,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"wcvtbvkayhmtnvyq\"}}") .toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("hvxndzwmkrefajpj", model.tags().get("rwkq")); - Assertions.assertEquals(3751920609197992678L, model.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("uwqlgzrfzeey", model.quotaTarget()); + Assertions.assertEquals("o", model.tags().get("zqzudph")); + Assertions.assertEquals(6272990611779774689L, model.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("wcvtbvkayhmtnvyq", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulePatch model = new VolumeQuotaRulePatch() - .withTags(mapOf("rwkq", "hvxndzwmkrefajpj", "sjabibs", "yhgbijtjivfx", "bjxbkzbzk", "stawfsdjpvkv", "kmokz", - "vncjabudurgk")) - .withQuotaSizeInKiBs(3751920609197992678L) - .withQuotaType(QuotaType.INDIVIDUAL_GROUP_QUOTA) - .withQuotaTarget("uwqlgzrfzeey"); + VolumeQuotaRulePatch model = new VolumeQuotaRulePatch().withTags(mapOf("zqzudph", "o")) + .withQuotaSizeInKiBs(6272990611779774689L) + .withQuotaType(QuotaType.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("wcvtbvkayhmtnvyq"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("hvxndzwmkrefajpj", model.tags().get("rwkq")); - Assertions.assertEquals(3751920609197992678L, model.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("uwqlgzrfzeey", model.quotaTarget()); + Assertions.assertEquals("o", model.tags().get("zqzudph")); + Assertions.assertEquals(6272990611779774689L, model.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("wcvtbvkayhmtnvyq", model.quotaTarget()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java index 2ee6d795bbba1..a7ffb78504c2f 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\":7604143524646488762,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"csypobkdqzrdzsyl\"},\"location\":\"lgtrczzy\",\"tags\":{\"defxrdc\":\"zjijpvuaurkihcir\"},\"id\":\"xnbkkj\",\"name\":\"nurnnq\",\"type\":\"nqbpi\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":2696548406156739524,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"pofqpmbhy\"},\"location\":\"sdrmmttjxophgerh\",\"tags\":{\"qilrixysfn\":\"gohtwz\",\"rympmlq\":\"msqywwwmhkruwae\"},\"id\":\"in\",\"name\":\"zduewihapfjii\",\"type\":\"njdiqfliejhpcl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,20 +34,20 @@ public void testCreate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .define("gmsplzgaufcshhv") - .withRegion("xrjkixtwb") - .withExistingVolume("uivedwcgyeewxeiq", "psmgo", "guamlj", "l") - .withTags(mapOf("lhkgmnsghp", "ypnyghshxc", "ac", "ycphdrwjjkhvyo")) - .withQuotaSizeInKiBs(4375872771324072302L) - .withQuotaType(QuotaType.INDIVIDUAL_GROUP_QUOTA) - .withQuotaTarget("q") + .define("buhoduchv") + .withRegion("hwlkaaggkrehb") + .withExistingVolume("yihpqadagrh", "dicxdw", "jfowxwy", "vcxjsgbipcukdvek") + .withTags(mapOf("eoagsqta", "uybffljfiim")) + .withQuotaSizeInKiBs(6901949455012898630L) + .withQuotaType(QuotaType.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("yjdusspysze") .create(); - Assertions.assertEquals("lgtrczzy", response.location()); - Assertions.assertEquals("zjijpvuaurkihcir", response.tags().get("defxrdc")); - Assertions.assertEquals(7604143524646488762L, response.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("csypobkdqzrdzsyl", response.quotaTarget()); + Assertions.assertEquals("sdrmmttjxophgerh", response.location()); + Assertions.assertEquals("gohtwz", response.tags().get("qilrixysfn")); + Assertions.assertEquals(2696548406156739524L, response.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, response.quotaType()); + Assertions.assertEquals("pofqpmbhy", 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 9b7119e46c7fc..cf8f96667936f 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 @@ -28,7 +28,8 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumeQuotaRules() - .delete("hoi", "lwgniiprglvawu", "z", "ufypiv", "sbbjpmcu", com.azure.core.util.Context.NONE); + .delete("vgmfalkzazmgok", "dgjqafkmkro", "zrthqet", "pqrtvaoznqni", "iezeagm", + 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 f49dbf66eb94f..7025a7b2126cc 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\":\"Accepted\",\"quotaSizeInKiBs\":4378456940205498641,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"xhikkflrmymyin\"},\"location\":\"lhrisw\",\"tags\":{\"ctotiowlx\":\"iiiovgqcgxuugq\"},\"id\":\"e\",\"name\":\"dptjgwdtgukranb\",\"type\":\"wphqlkccuzgygqw\"}"; + = "{\"properties\":{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":4319782707602321563,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"gglmvoka\"},\"location\":\"ztjctibpvbkae\",\"tags\":{\"dfwakwseivmak\":\"mzy\"},\"id\":\"hysowljuxlkbect\",\"name\":\"tfjmskdchmaiub\",\"type\":\"vlzw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .getWithResponse("fykhvuhxepmru", "znabaobns", "ujdjltymkmvg", "ihywartspph", "ixkykxd", - com.azure.core.util.Context.NONE) + .getWithResponse("sa", "cdrnxsl", "vlzladl", "x", "pbqhvfdqqjwkr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lhrisw", response.location()); - Assertions.assertEquals("iiiovgqcgxuugq", response.tags().get("ctotiowlx")); - Assertions.assertEquals(4378456940205498641L, response.quotaSizeInKiBs()); + Assertions.assertEquals("ztjctibpvbkae", response.location()); + Assertions.assertEquals("mzy", response.tags().get("dfwakwseivmak")); + Assertions.assertEquals(4319782707602321563L, response.quotaSizeInKiBs()); Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("xhikkflrmymyin", response.quotaTarget()); + Assertions.assertEquals("gglmvoka", 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 b09f8040f9687..786a7638d9c62 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\":\"Succeeded\",\"quotaSizeInKiBs\":2272430712766624779,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"rjgeih\"},\"location\":\"lg\",\"tags\":{\"gt\":\"iwzcxmjpbyeph\",\"myqwcab\":\"ljvrcmyfqipgxhnp\",\"aswlp\":\"nuilee\",\"lrxw\":\"ugmrmf\"},\"id\":\"oauk\",\"name\":\"fkvcisi\",\"type\":\"moaedsxj\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":2368733559524744070,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"xzvsgeafgf\"},\"location\":\"ehxlzsxezppk\",\"tags\":{\"jlpzeqtoyrp\":\"aesky\",\"owgw\":\"ixlajmllpquevham\",\"kxpkzwaq\":\"tmk\"},\"id\":\"ofqovchiqbplv\",\"name\":\"idu\",\"type\":\"ztekxbyjgmsfep\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListByVolume() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.volumeQuotaRules() - .listByVolume("kmifoxxkub", "phavpmhbrb", "gvgovpbbttefjo", "nssqyzqed", com.azure.core.util.Context.NONE); + .listByVolume("eituugedhfpjs", "lzmb", "syjdeolctae", "fsyrledjc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lg", response.iterator().next().location()); - Assertions.assertEquals("iwzcxmjpbyeph", response.iterator().next().tags().get("gt")); - Assertions.assertEquals(2272430712766624779L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("rjgeih", response.iterator().next().quotaTarget()); + Assertions.assertEquals("ehxlzsxezppk", response.iterator().next().location()); + Assertions.assertEquals("aesky", response.iterator().next().tags().get("jlpzeqtoyrp")); + Assertions.assertEquals(2368733559524744070L, response.iterator().next().quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.INDIVIDUAL_GROUP_QUOTA, response.iterator().next().quotaType()); + Assertions.assertEquals("xzvsgeafgf", response.iterator().next().quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java index 4a07b4a8ded6e..268cf46f34ef7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java @@ -13,13 +13,13 @@ public final class VolumeQuotaRulesListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":3361403308892839308,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"lbjbsyb\"},\"location\":\"wrv\",\"tags\":{\"paslthaqfxssmwu\":\"gmfpgvmp\",\"zpdrhneu\":\"wbdsr\",\"ircgpikpz\":\"owqkdwytisi\",\"rmbzo\":\"mejzanlfzxia\"},\"id\":\"okixrjqcir\",\"name\":\"zpfrla\",\"type\":\"szrnwo\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":2655439268574784215,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"lwbtlhf\"},\"location\":\"jcdh\",\"tags\":{\"rqmq\":\"jvfbgofelja\",\"tvsexsowuel\":\"ldvriiiojnalghfk\",\"wws\":\"qhhahhxvrhmzkwpj\",\"qxujxukndxd\":\"ughftqsx\"},\"id\":\"grjguufzd\",\"name\":\"syqtfi\",\"type\":\"whbotzingamv\"},{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":7578366703491273982,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"phqamvdkfwynwcvt\"},\"location\":\"kayh\",\"tags\":{\"kzwpcnpw\":\"vyqia\"},\"id\":\"cjaesgvvs\",\"name\":\"cyajguqf\",\"type\":\"wygzlvdnkfxusem\"}],\"nextLink\":\"zrmuhapfcqdps\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":3810518074680949543,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"zcjaesgvvsccy\"},\"location\":\"g\",\"tags\":{\"lvdnkfx\":\"hwyg\",\"apfcqdpsq\":\"semdwzrmu\",\"celve\":\"qvpsvuoymg\",\"erqwkyhkobopg\":\"rypqlmfeo\"},\"id\":\"edkowepbqpcrfk\",\"name\":\"wccsnjvcdwxlpqek\",\"type\":\"tn\"},{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":768157718472448573,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"fq\"},\"location\":\"mtdh\",\"tags\":{\"zywkb\":\"vypgikdg\",\"rvqqaatj\":\"rryuzhlhkjo\",\"ioolvrwxkvtkkgll\":\"nrvgoupmfiibfgg\"},\"id\":\"wjygvjayvblmhvk\",\"name\":\"uhbxvvy\",\"type\":\"gsopbyrqufegxu\"},{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":3007330955006974455,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"tlpdn\"},\"location\":\"tvgbmhrixkwmy\",\"tags\":{\"dreaxh\":\"jvegrhbpnaixexcc\",\"tpwijnh\":\"exdrrvqahqkg\",\"vmtgjqppy\":\"jsvfycxzbfvoowv\",\"ronzmyhgfip\":\"s\"},\"id\":\"sxkm\",\"name\":\"waekrrjreafxtsgu\",\"type\":\"hjglikk\"}],\"nextLink\":\"slol\"}") .toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("wrv", model.value().get(0).location()); - Assertions.assertEquals("gmfpgvmp", model.value().get(0).tags().get("paslthaqfxssmwu")); - Assertions.assertEquals(3361403308892839308L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("lbjbsyb", model.value().get(0).quotaTarget()); - Assertions.assertEquals("zrmuhapfcqdps", model.nextLink()); + Assertions.assertEquals("g", model.value().get(0).location()); + Assertions.assertEquals("hwyg", model.value().get(0).tags().get("lvdnkfx")); + Assertions.assertEquals(3810518074680949543L, model.value().get(0).quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("zcjaesgvvsccy", model.value().get(0).quotaTarget()); + Assertions.assertEquals("slol", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java index 42ba40a1733c3..57dece8182df1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java @@ -13,21 +13,21 @@ public final class VolumeQuotaRulesPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":4257608581453488752,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"p\"}") + "{\"provisioningState\":\"Canceled\",\"quotaSizeInKiBs\":4169097582837090824,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"gamv\"}") .toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(4257608581453488752L, model.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("p", model.quotaTarget()); + Assertions.assertEquals(4169097582837090824L, model.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("gamv", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(4257608581453488752L) - .withQuotaType(QuotaType.INDIVIDUAL_USER_QUOTA) - .withQuotaTarget("p"); + VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(4169097582837090824L) + .withQuotaType(QuotaType.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("gamv"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(4257608581453488752L, model.quotaSizeInKiBs()); - Assertions.assertEquals(QuotaType.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("p", model.quotaTarget()); + Assertions.assertEquals(4169097582837090824L, model.quotaSizeInKiBs()); + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("gamv", model.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java index 6a005780b27dc..1260e5e63838e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java @@ -11,14 +11,14 @@ public final class VolumeRevertTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"olpsslqlf\"}").toObject(VolumeRevert.class); - Assertions.assertEquals("olpsslqlf", model.snapshotId()); + VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"lbg\"}").toObject(VolumeRevert.class); + Assertions.assertEquals("lbg", model.snapshotId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeRevert model = new VolumeRevert().withSnapshotId("olpsslqlf"); + VolumeRevert model = new VolumeRevert().withSnapshotId("lbg"); model = BinaryData.fromObject(model).toObject(VolumeRevert.class); - Assertions.assertEquals("olpsslqlf", model.snapshotId()); + Assertions.assertEquals("lbg", model.snapshotId()); } } 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 5dcf4aab916cc..012542143ddf8 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\":\"tefypococtfjgti\"}}"; + String responseStr = "{\"properties\":{\"svmPeeringCommand\":\"sbrcary\"}}"; 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("ofshfphwpnulaiyw", "e", "ywhslwkojpllndnp", "wrpqafgfugsnnf", + .authorizeExternalReplication("fnqt", "jtoma", "swbnfddepldwqjns", "zygleexahvm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("tefypococtfjgti", response.properties().svmPeeringCommand()); + Assertions.assertEquals("sbrcary", 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 96d461799d15e..8f8b1cd313f69 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("pkt", "qylkmqpzoyhlf", "cgwgcloxoebqinji", "nwjfu", - new AuthorizeRequest().withRemoteVolumeResourceId("lafcbahh"), com.azure.core.util.Context.NONE); + .authorizeReplication("o", "zqocarku", "lbcnndt", "nx", + new AuthorizeRequest().withRemoteVolumeResourceId("qytl"), 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 a24333d4fa36e..fc7fa52c43614 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,8 @@ public void testBreakFileLocks() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakFileLocks("df", "pyogtieyuj", "vczkcnyxrxmunjd", "vg", - new BreakFileLocksRequest().withClientIp("kvxlxpa").withConfirmRunningDisruptiveOperation(true), + .breakFileLocks("dmvr", "cm", "erndbrnyeofltfnn", "rkadjfynnfmuiiir", + new BreakFileLocksRequest().withClientIp("fohyk").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 843d725cbbf50..64d2387ce7a27 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,7 +29,7 @@ public void testBreakReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .breakReplication("uydzvk", "vxcnqmxqps", "okmvkhlggd", "bemzqkzszuwi", + .breakReplication("sqqzlgcndhz", "rr", "cfsrhkhgsn", "uww", 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 8d92e0a2d0d5e..d266754cdc178 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 @@ -27,7 +27,9 @@ public void testDeleteReplication() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes().deleteReplication("gox", "jiuqhibtozi", "qw", "edmurrxxge", com.azure.core.util.Context.NONE); + manager.volumes() + .deleteReplication("jrliiz", "ixlqfhefkwabsolr", "nqqlmgnl", "xsjxtelexhvuqboz", + 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 ae09453d41e52..f229e0645e995 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 @@ -27,8 +27,7 @@ public void testFinalizeRelocation() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes() - .finalizeRelocation("tjvidt", "gepuslvyjtc", "uwkasiz", "esfuught", com.azure.core.util.Context.NONE); + manager.volumes().finalizeRelocation("dfpdqwtygevg", "mseharx", "fv", "n", 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 13385e5008500..f4a19ac04b712 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,8 @@ public final class VolumesListGetGroupIdListForLdapUserMockTests { @Test public void testListGetGroupIdListForLdapUser() throws Exception { - String responseStr = "{\"groupIdsForLdapUser\":[\"mhha\",\"wjrmzvuporqzd\"]}"; + String responseStr + = "{\"groupIdsForLdapUser\":[\"aapezkiswqjmdghs\",\"parybjufpt\",\"jczjnciuiyqv\",\"daswvpp\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +32,9 @@ public void testListGetGroupIdListForLdapUser() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GetGroupIdListForLdapUserResponse response = manager.volumes() - .listGetGroupIdListForLdapUser("ivbgkcv", "hpzvuqdflvoniyp", "pubcpzgpxtivhjk", "idibgqjxgpn", - new GetGroupIdListForLdapUserRequest().withUsername("hgovfgp"), com.azure.core.util.Context.NONE); + .listGetGroupIdListForLdapUser("bbcbrwji", "tgnjizbeewoiymrv", "bjuyrsrziuctixg", "d", + new GetGroupIdListForLdapUserRequest().withUsername("uifr"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("mhha", response.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("aapezkiswqjmdghs", 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 44624fccb3f7a..3ff83ae9df76a 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\":\"DefaultUserQuota\",\"quotaTarget\":\"tdysnaquflq\",\"quotaLimitUsedInKiBs\":916252434412250119,\"quotaLimitTotalInKiBs\":2375561114046069968,\"percentageUsed\":39.401108,\"isDerivedQuota\":false},{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"zeqyjleziun\",\"quotaLimitUsedInKiBs\":3532081676281641207,\"quotaLimitTotalInKiBs\":7427972208909281693,\"percentageUsed\":67.25863,\"isDerivedQuota\":true},{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"amlbnseqacjjvpil\",\"quotaLimitUsedInKiBs\":8003115860813519069,\"quotaLimitTotalInKiBs\":6303016777741328727,\"percentageUsed\":5.943304,\"isDerivedQuota\":true}]}}"; + = "{\"properties\":{\"quotaReportRecords\":[{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"dphmtybkcgsuth\",\"quotaLimitUsedInKiBs\":2477920211121414375,\"quotaLimitTotalInKiBs\":6838769588307133617,\"percentageUsed\":38.84325,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"fciatxtjrr\",\"quotaLimitUsedInKiBs\":8335518650939106212,\"quotaLimitTotalInKiBs\":1243318555464904284,\"percentageUsed\":42.417995,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"foxcx\",\"quotaLimitUsedInKiBs\":6867854399558382335,\"quotaLimitTotalInKiBs\":2363438907660178299,\"percentageUsed\":55.35607,\"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("dohzjq", "tu", "o", "gebx", + .listQuotaReport("rymdwmf", "hpycvjqdvdwkq", "ldrlefgnaavua", "n", new QuotaReportFilterRequest().withQuotaType(QuotaType.INDIVIDUAL_USER_QUOTA) - .withQuotaTarget("fepbnwgfmxjgc") - .withUsageThresholdPercentage(1926103431), + .withQuotaTarget("outnpdctuhspfefy") + .withUsageThresholdPercentage(1763830342), com.azure.core.util.Context.NONE); - Assertions.assertEquals(QuotaType.DEFAULT_USER_QUOTA, + Assertions.assertEquals(QuotaType.DEFAULT_GROUP_QUOTA, response.properties().quotaReportRecords().get(0).quotaType()); - Assertions.assertEquals("tdysnaquflq", response.properties().quotaReportRecords().get(0).quotaTarget()); - Assertions.assertEquals(916252434412250119L, + Assertions.assertEquals("dphmtybkcgsuth", response.properties().quotaReportRecords().get(0).quotaTarget()); + Assertions.assertEquals(2477920211121414375L, response.properties().quotaReportRecords().get(0).quotaLimitUsedInKiBs()); - Assertions.assertEquals(2375561114046069968L, + Assertions.assertEquals(6838769588307133617L, response.properties().quotaReportRecords().get(0).quotaLimitTotalInKiBs()); - Assertions.assertEquals(39.401108F, response.properties().quotaReportRecords().get(0).percentageUsed()); + Assertions.assertEquals(38.84325F, response.properties().quotaReportRecords().get(0).percentageUsed()); Assertions.assertFalse(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 dfe3ad4c48eff..eeac5d8749af0 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\":\"hnykz\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"x\",\"remoteVolumeRegion\":\"mzqwmvtxnjmxmcu\",\"mirrorState\":\"Broken\",\"replicationCreationTime\":\"2021-02-28T12:20:49Z\",\"replicationDeletionTime\":\"2021-11-16T20:15:57Z\"}]}"; + = "{\"value\":[{\"replicationId\":\"njkgvfnmx\",\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"tibtyi\",\"remoteVolumeRegion\":\"yvp\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-09-27T16:43:18Z\",\"replicationDeletionTime\":\"2021-01-06T10:29:15Z\"}]}"; 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("mk", "svth", "wpztekovmribia", "tgplucfota", + .listReplications("ezxlhdjzqdca", "wvpsoz", "iihjriybmrzo", "pnx", new ListReplicationsRequest().withExclude(Exclude.NONE), 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("x", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("mzqwmvtxnjmxmcu", response.iterator().next().remoteVolumeRegion()); + Assertions.assertEquals(EndpointType.SRC, response.iterator().next().endpointType()); + Assertions.assertEquals(ReplicationSchedule.HOURLY, response.iterator().next().replicationSchedule()); + Assertions.assertEquals("tibtyi", response.iterator().next().remoteVolumeResourceId()); + Assertions.assertEquals("yvp", 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 e99210a0c1348..ee31fdb137b99 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\":\"uahokq\",\"passphrase\":\"bkau\"}}"; + String responseStr + = "{\"properties\":{\"clusterPeeringCommand\":\"mhmpty\",\"passphrase\":\"lkfbnrqqxvztpb\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +32,14 @@ public void testPeerExternalCluster() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - ClusterPeerCommandResponse response = manager.volumes() - .peerExternalCluster("ahmnxhkxjqirw", "weooxffifhxwrs", "ewmozqvbu", "qmamhsycxhxzga", - new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses( - Arrays.asList("taboidvmf", "hppubowsepdfgkmt", "herngb")), - com.azure.core.util.Context.NONE); + ClusterPeerCommandResponse response + = manager.volumes() + .peerExternalCluster( + "kywymxgaabj", "dtfohfaog", "vkiwrsiwdyjqu", "ykcrraue", new PeerClusterForVolumeMigrationRequest() + .withPeerIpAddresses(Arrays.asList("csuehogddac", "cbgydlqi")), + com.azure.core.util.Context.NONE); - Assertions.assertEquals("uahokq", response.properties().clusterPeeringCommand()); - Assertions.assertEquals("bkau", response.properties().passphrase()); + Assertions.assertEquals("mhmpty", response.properties().clusterPeeringCommand()); + Assertions.assertEquals("lkfbnrqqxvztpb", 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 c09a7b122a026..db78dd971a341 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("rjvzuyt", "rmlmuowo", "bauiropi", "nszonwpngaj", - new PoolChangeRequest().withNewPoolResourceId("n"), com.azure.core.util.Context.NONE); + .poolChange("sjjzyvoaqajuveh", "ptdmkrrbhmpful", "be", "gybpmfb", + new PoolChangeRequest().withNewPoolResourceId("ununm"), 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 c2418c71a5f35..3ba0d789b544a 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 @@ -27,9 +27,7 @@ public void testReInitializeReplication() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes() - .reInitializeReplication("zpofoiyjwpfilk", "kkholvdndvia", "ogphuartvtiu", "yefchnm", - com.azure.core.util.Context.NONE); + manager.volumes().reInitializeReplication("hd", "z", "yckzex", "xak", 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 92dd45a8e2731..30937a71dec98 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\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"xauzlwvsgmwohqfz\",\"errorMessage\":\"vux\"}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"fp\",\"errorMessage\":\"qi\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testReplicationStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("lxxhljfp", "picrmnzhrgmqgjsx", "pqcbfrmbodthsq", "gvriibakclac", + .replicationStatusWithResponse("hefsb", "xlb", "xomeikjclwzacn", "wpfsuqtaaz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.healthy()); - Assertions.assertEquals(VolumeReplicationRelationshipStatus.TRANSFERRING, response.relationshipStatus()); + Assertions.assertFalse(response.healthy()); + Assertions.assertEquals(VolumeReplicationRelationshipStatus.IDLE, response.relationshipStatus()); Assertions.assertEquals(MirrorState.UNINITIALIZED, response.mirrorState()); - Assertions.assertEquals("xauzlwvsgmwohqfz", response.totalProgress()); - Assertions.assertEquals("vux", response.errorMessage()); + Assertions.assertEquals("fp", response.totalProgress()); + Assertions.assertEquals("qi", 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 9745721df15de..d55c098699f57 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("lxynpdkvgf", "buiyji", "uzphdugnei", "n", com.azure.core.util.Context.NONE); + .resyncReplication("qnoowsbedenrex", "xbhxvucnulgmnhj", "vdyznf", "jsvkskmqozzkivy", + 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 d6b727d5d6cb9..74a80d20a1a75 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("oiquvrehmrnjhvs", "jztczytqj", "w", "auunfprnjletlx", - new VolumeRevert().withSnapshotId("rpddouifamo"), com.azure.core.util.Context.NONE); + .revert("ke", "bgvopemt", "oqujlyegqavn", "gflqqbtnyjp", new VolumeRevert().withSnapshotId("xdb"), + 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 71f71d49071cf..fed1f657b5712 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("qfecjxeygtuhx", "ic", "uewmrswnjlxuzrhw", "usxjbaqehg", - com.azure.core.util.Context.NONE); + .revertRelocation("x", "mbpjptnvwjh", "sidqpxlbtpakft", "gatwmykyu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java index 20d4ada89b888..8f1f7aa8096ae 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java @@ -12,27 +12,27 @@ public final class WeeklyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WeeklySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1024892279,\"day\":\"wwiftohqkvpuv\",\"hour\":491288629,\"minute\":710710602,\"usedBytes\":8295901406246697833}") + "{\"snapshotsToKeep\":1095781686,\"day\":\"hqkvpuvksgplsak\",\"hour\":34213968,\"minute\":1486406311,\"usedBytes\":44531628104673471}") .toObject(WeeklySchedule.class); - Assertions.assertEquals(1024892279, model.snapshotsToKeep()); - Assertions.assertEquals("wwiftohqkvpuv", model.day()); - Assertions.assertEquals(491288629, model.hour()); - Assertions.assertEquals(710710602, model.minute()); - Assertions.assertEquals(8295901406246697833L, model.usedBytes()); + Assertions.assertEquals(1095781686, model.snapshotsToKeep()); + Assertions.assertEquals("hqkvpuvksgplsak", model.day()); + Assertions.assertEquals(34213968, model.hour()); + Assertions.assertEquals(1486406311, model.minute()); + Assertions.assertEquals(44531628104673471L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(1024892279) - .withDay("wwiftohqkvpuv") - .withHour(491288629) - .withMinute(710710602) - .withUsedBytes(8295901406246697833L); + WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(1095781686) + .withDay("hqkvpuvksgplsak") + .withHour(34213968) + .withMinute(1486406311) + .withUsedBytes(44531628104673471L); model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(1024892279, model.snapshotsToKeep()); - Assertions.assertEquals("wwiftohqkvpuv", model.day()); - Assertions.assertEquals(491288629, model.hour()); - Assertions.assertEquals(710710602, model.minute()); - Assertions.assertEquals(8295901406246697833L, model.usedBytes()); + Assertions.assertEquals(1095781686, model.snapshotsToKeep()); + Assertions.assertEquals("hqkvpuvksgplsak", model.day()); + Assertions.assertEquals(34213968, model.hour()); + Assertions.assertEquals(1486406311, model.minute()); + Assertions.assertEquals(44531628104673471L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml index 3ccb9ec4bec04..6689da1853219 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: 2371f14ab26ab99500de46ac5c507476a8e0fc61 +commit: 2018b22fbcb54e17e2fba877d0e2a5841fd1eb45 repo: Azure/azure-rest-api-specs additionalDirectories: